> ## 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/exchangewithdraw | TRON

> TRON API method that removes liquidity from an existing exchange trading pair on the TRON decentralized exchange. Returns a transaction object containing:.

TRON API method that removes liquidity from an existing exchange trading pair on the TRON decentralized exchange.

## Parameters

* `owner_address` — the address withdrawing liquidity (base58 with `visible: true`, or hex with `visible: false`).
* `exchange_id` — unique identifier of the exchange pair to remove liquidity from.
* `token_id` — TRC10 token ID being withdrawn; use `_` to denote TRX.
* `quant` — integer amount to withdraw (token base units; if TRX, specify in sun).
* `permission_id` — optional permission ID for multi‑signature accounts.

## Response

Returns a transaction object containing:

* `txID` — unique transaction identifier
* `raw_data` — raw transaction data including contract details
* `raw_data_hex` — hexadecimal representation of raw transaction data

## Use case

The `wallet/exchangewithdraw` method is used for:

* Removing liquidity from trading pairs to claim earned fees
* Withdrawing capital from underperforming or deprecated markets
* Rebalancing liquidity provider positions across different pairs
* Exiting liquidity positions before market volatility or impermanent loss

## curl example

```shell Shell theme={"system"}
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/exchangewithdraw' \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH",
  "exchange_id": 1,
  "token_id": "1000001",
  "quant": 250000000000,
  "visible": true
}'
```

<Info>
  * balances must be integers (do not quote numbers). When withdrawing TRX (using `token_id: "_"`), provide `quant` in sun (1 TRX = 1,000,000 sun).
  * the call returns an unsigned transaction; sign and broadcast it. On mainnet, the exchange must exist, token must match the pair, and you must have sufficient LP position to withdraw.
</Info>


## OpenAPI

````yaml openapi/tron_node_api/exchangewithdraw.json post /95e61622bf6a8af293978377718e3b77/wallet/exchangewithdraw
openapi: 3.0.0
info:
  title: TRON API
  version: 1.0.0
servers:
  - url: https://tron-mainnet.core.chainstack.com
security: []
paths:
  /95e61622bf6a8af293978377718e3b77/wallet/exchangewithdraw:
    post:
      summary: Remove liquidity from an exchange pair
      description: >-
        Removes liquidity from an existing exchange trading pair on the TRON
        decentralized exchange
      operationId: exchangeWithdraw
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - owner_address
                - exchange_id
                - token_id
                - quant
              properties:
                owner_address:
                  type: string
                  description: The address withdrawing liquidity from the exchange pair
                exchange_id:
                  type: integer
                  description: >-
                    Unique identifier of the exchange pair to remove liquidity
                    from
                token_id:
                  type: string
                  description: >-
                    Token ID being withdrawn from the liquidity pool. Use '_' to
                    denote TRX.
                quant:
                  type: integer
                  description: >-
                    Amount to withdraw as an integer (token base units; if TRX,
                    specify in sun)
                permission_id:
                  type: integer
                  description: Optional permission ID for multi-signature accounts
                visible:
                  type: boolean
                  description: Whether to return human-readable addresses
                  default: false
            examples:
              default:
                summary: Withdraw TRC10 tokens from liquidity pool
                value:
                  owner_address: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
                  exchange_id: 1
                  token_id: '1000001'
                  quant: 250000000000
                  visible: true
      responses:
        '200':
          description: Successful response with transaction details
          content:
            application/json:
              schema:
                type: object
                properties:
                  txID:
                    type: string
                    description: Unique transaction identifier
                  raw_data:
                    type: object
                    description: Raw transaction data including contract details
                    properties:
                      contract:
                        type: array
                        items:
                          type: object
                          properties:
                            parameter:
                              type: object
                              properties:
                                value:
                                  type: object
                                  properties:
                                    owner_address:
                                      type: string
                                    exchange_id:
                                      type: integer
                                    token_id:
                                      type: string
                                    quant:
                                      type: string
                                type_url:
                                  type: string
                            type:
                              type: string
                      ref_block_bytes:
                        type: string
                      ref_block_hash:
                        type: string
                      expiration:
                        type: integer
                      timestamp:
                        type: integer
                  raw_data_hex:
                    type: string
                    description: Hexadecimal representation of raw transaction data
              examples:
                success:
                  summary: Successful response
                  value:
                    txID: >-
                      b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3
                    raw_data:
                      contract:
                        - parameter:
                            value:
                              owner_address: TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH
                              exchange_id: 1
                              token_id: '1000001'
                              quant: '250000000000'
                            type_url: >-
                              type.googleapis.com/protocol.ExchangeWithdrawContract
                          type: ExchangeWithdrawContract
                      ref_block_bytes: ab92
                      ref_block_hash: f5d4c3b2a3
                      expiration: 1672531380000
                      timestamp: 1672531320000
                    raw_data_hex: >-
                      0a02ab921220f5d4c3b2a340e0ebe2f6e30f5a68081112620a32747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e45786368616e67655769746864726177436f6e747261637412280a154c7971797a56474c5631737266b7dd4afc8eagg615352220832353030303030303030
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  Error:
                    type: string
              examples:
                error:
                  summary: Error response
                  value:
                    Error: Exchange not found or insufficient liquidity to withdraw

````