Skip to main content
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": "1000006",
  "buy_token_id": "1000001",
  "visible": true
}'
{
  "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 TRC10↔TRC10 trading pair on the TRON DEX.
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 — TRC10 token ID being sold, as a numeric string (for example, “1000006”).
  • buy_token_id — TRC10 token ID being purchased, as a numeric string.
  • visible — optional boolean. Some node builds require visible: true.

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.

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair' \
  --header 'Content-Type: application/json' \
  --data '{
    "sell_token_id": "1000006",
    "buy_token_id": "1000001",
    "visible": true
  }'

Body

application/json
sell_token_id
string
required

TRC10 token ID being sold, as a numeric string (e.g., '1000006').

buy_token_id
string
required

TRC10 token ID being purchased, as a numeric string.

visible
boolean
default:true

Optional. Some node builds require visible: true for this endpoint.

Response

Market price for trading pair

sell_token_id
string

Token ID being sold

buy_token_id
string

Token ID being purchased

prices
object[]

Array of recent price points