> For the complete documentation index, see [llms.txt](https://traveloapi.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://traveloapi.gitbook.io/api/digital-gold-api/untitled.md). Agents can also search and read this documentation through its [MCP server](https://traveloapi.gitbook.io/api/~gitbook/mcp).

# Buy Digital Gold

## Buy Digital Gold

<mark style="color:blue;">`GET`</mark> `https://traveloapi.com/yourapi/digitalgold/buyGold`&#x20;

#### Path Parameters

| Name      | Type   | Description                                         |
| --------- | ------ | --------------------------------------------------- |
| gatkey    | string | gatkey (provided by traveloapi)Pass gatkey with url |
| mobile    | string | Mobile Number Of Customer                           |
| id        | string | pass id from Customer registration response         |
| buy\_type | string | amount/grams                                        |
| amount    | string | amount                                              |

{% tabs %}
{% tab title="200 " %}

```javascript
{"statuscode":"TXN","status":"Transaction Successful","data":{"tx_id":12243600,"sg_rate":"3143.56","partner_rate":"3143.56","gold_amount":"0.0154","buy_price":"50","pre_gst_buy_price":48.54,"gst_amount":1.46,"user_id":"2478179","total_grams":0.0154,"total_amount":"50"}}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "message": "Invalid Request",
    "status": "error",
    
}
```

{% endtab %}
{% endtabs %}
