# GetExchangeById

Query exchange pair based on id.

This method will use `30` [Compute Units](/v1/about/billing.md).

***

## **Parameters**

* `id` - int32 - Transaction Pair ID

## **Returns**

| Field                  | Type   | Description          |
| ---------------------- | ------ | -------------------- |
| exchange\_id           | int64  | Exchange pair ID     |
| creator\_address       | string | Creator address      |
| create\_time           | int64  | Creation time        |
| first\_token\_id       | string | First token ID       |
| first\_token\_balance  | int64  | First token balance  |
| second\_token\_id      | string | Second token ID      |
| second\_token\_balance | int64  | Second token balance |

```json
// Result
{
  "exchange_id": 1,
  "creator_address": "410ca7c49aa44d26aabfe7f594c645cf9f17a4ff70",
  "create_time": 1575754887000,
  "first_token_id": "31303030303033",
  "first_token_balance": 9,
  "second_token_id": "5f",
  "second_token_balance": 240000000
}
```

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

```bash
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/wallet/getexchangebyid \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"id":1}'
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.validationcloud.io/v1/tron/tron-full-node-http-api/dex-exchange/getexchangebyid.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
