POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
exchangewithdraw
Remove liquidity from an exchange pair
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
}'
{
  "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"
}
TRON API method that removes liquidity from an existing exchange trading pair on the TRON decentralized exchange.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • owner_address — the address withdrawing liquidity from the exchange pair
  • exchange_id — unique identifier of the exchange pair to remove liquidity from
  • token_id — token ID being withdrawn from the liquidity pool
  • quant — amount of tokens to withdraw from the liquidity pool
  • 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

Body

application/json
owner_address
string
required

The address withdrawing liquidity from the exchange pair

exchange_id
integer
required

Unique identifier of the exchange pair to remove liquidity from

token_id
string
required

Token ID being withdrawn from the liquidity pool

quant
string
required

Amount of tokens to withdraw from the liquidity pool

permission_id
integer

Optional permission ID for multi-signature accounts

visible
boolean
default:false

Whether to return human-readable addresses

Response

Successful response with transaction details

txID
string

Unique transaction identifier

raw_data
object

Raw transaction data including contract details

raw_data_hex
string

Hexadecimal representation of raw transaction data