> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wallet/getexchangebyid | TRON

> TRON API method that retrieves detailed information about a specific exchange trading pair by its unique identifier. Returns an exchange object containing:.

TRON API method that retrieves detailed information about a specific exchange trading pair by its unique identifier.

## Parameters

* `id` — the unique exchange ID to query

## Response

Returns an exchange object containing:

* `exchange_id` — unique identifier for the exchange pair
* `creator_address` — address that created the exchange pair
* `create_time` — timestamp when the exchange was created
* `first_token_id` — token ID of the first token in the pair
* `first_token_balance` — current balance of the first token
* `second_token_id` — token ID of the second token in the pair
* `second_token_balance` — current balance of the second token

## Use case

The `wallet/getexchangebyid` method is used for:

* Retrieving specific exchange pair details for trading interfaces
* Checking current liquidity balances before executing trades
* Monitoring individual exchange pair performance and metrics
* Validating exchange pair existence before performing operations


## OpenAPI

````yaml openapi/tron_node_api/getexchangebyid.json post /95e61622bf6a8af293978377718e3b77/wallet/getexchangebyid
openapi: 3.0.0
info:
  title: TRON API
  version: 1.0.0
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/getexchangebyid:
    post:
      summary: Get exchange pair details by ID
      description: >-
        Retrieves detailed information about a specific exchange trading pair by
        its unique identifier
      operationId: getExchangeById
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - id
              properties:
                id:
                  type: integer
                  description: The unique exchange ID to query
                visible:
                  type: boolean
                  description: Whether to return human-readable addresses
                  default: false
            examples:
              default:
                summary: Get exchange by ID
                value:
                  id: 1
                  visible: true
      responses:
        '200':
          description: Successful response with exchange details
          content:
            application/json:
              schema:
                type: object
                properties:
                  exchange_id:
                    type: integer
                    description: Unique identifier for the exchange pair
                  creator_address:
                    type: string
                    description: Address that created the exchange pair
                  create_time:
                    type: integer
                    description: Timestamp when the exchange was created
                  first_token_id:
                    type: string
                    description: Token ID of the first token in the pair
                  first_token_balance:
                    type: string
                    description: Current balance of the first token
                  second_token_id:
                    type: string
                    description: Token ID of the second token in the pair
                  second_token_balance:
                    type: string
                    description: Current balance of the second token
              examples:
                success:
                  summary: Successful response
                  value:
                    exchange_id: 1
                    creator_address: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
                    create_time: 1672531200000
                    first_token_id: '1000001'
                    first_token_balance: '1000000000000'
                    second_token_id: _
                    second_token_balance: '5000000000'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  Error:
                    type: string
              examples:
                error:
                  summary: Error response
                  value:
                    Error: Exchange not found

````