POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
getmarketpricebypair
wallet/getmarketpricebypair
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair \
  --header 'Content-Type: application/json' \
  --data '{
  "sell_token_id": "",
  "buy_token_id": "1002000"
}'
{
  "sell_token_id": "<string>",
  "buy_token_id": "<string>",
  "prices": [
    {
      "sell_token_quantity": "<string>",
      "buy_token_quantity": "<string>",
      "timestamp": 123
    }
  ]
}
TRON API method that retrieves the current market price for a specific trading pair on the TRON DEX. This provides real-time pricing information for TRX and TRC-10 token trading pairs.
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

  • sell_token_id — token ID being sold (use empty string for TRX)
  • buy_token_id — token ID being purchased (use empty string for TRX)

Response

  • sell_token_id — token ID being sold
  • buy_token_id — token ID being purchased
  • prices — array of recent price points containing:
    • sell_token_quantity — quantity of sell token
    • buy_token_quantity — quantity of buy token
    • timestamp — when this price point was recorded

Use case

The wallet/getmarketpricebypair method is used for:
  • Getting current market rates for trading pair price calculations.
  • Building price tracking and charting applications for TRON DEX.
  • Implementing automated trading strategies based on market prices.
  • Displaying real-time pricing information in trading interfaces.
  • Analyzing price trends and market volatility for specific token pairs.
Trading pairs on TRON DEX consist of TRX and TRC-10 tokens. Use an empty string for token ID when referring to TRX. The prices array contains recent transaction data that reflects the actual trading activity and market-determined prices.

Body

application/json

Response

200 - application/json

Market price for trading pair

The response is of type object.