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
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair"
payload = {
"sell_token_id": "1000006",
"buy_token_id": "1000001",
"visible": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sell_token_id: '1000006', buy_token_id: '1000001', visible: true})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sell_token_id' => '1000006',
'buy_token_id' => '1000001',
'visible' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair"
payload := strings.NewReader("{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair")
.header("Content-Type", "application/json")
.body("{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}"
response = http.request(request)
puts response.read_body{
"sell_token_id": "<string>",
"buy_token_id": "<string>",
"prices": [
{
"sell_token_quantity": "<string>",
"buy_token_quantity": "<string>",
"timestamp": 123
}
]
}{
"Error": "class org.tron.core.exception.BadItemException : sellTokenId is not a valid number"
}TRON node API
wallet/getmarketpricebypair | TRON
TRON API method that retrieves the current market price for a specific TRC10↔TRC10 trading pair on the TRON DEX. TRON via Chainstack.
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
}
'import requests
url = "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair"
payload = {
"sell_token_id": "1000006",
"buy_token_id": "1000001",
"visible": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sell_token_id: '1000006', buy_token_id: '1000001', visible: true})
};
fetch('https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sell_token_id' => '1000006',
'buy_token_id' => '1000001',
'visible' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair"
payload := strings.NewReader("{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair")
.header("Content-Type", "application/json")
.body("{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getmarketpricebypair")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sell_token_id\": \"1000006\",\n \"buy_token_id\": \"1000001\",\n \"visible\": true\n}"
response = http.request(request)
puts response.read_body{
"sell_token_id": "<string>",
"buy_token_id": "<string>",
"prices": [
{
"sell_token_quantity": "<string>",
"buy_token_quantity": "<string>",
"timestamp": 123
}
]
}{
"Error": "class org.tron.core.exception.BadItemException : sellTokenId is not a valid number"
}TRON API method that retrieves the current market price for a specific TRC10↔TRC10 trading pair on the TRON DEX.
Get your 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 requirevisible: true.
Response
sell_token_id— token ID being soldbuy_token_id— token ID being purchasedprices— array of recent price points containing:sell_token_quantity— quantity of sell tokenbuy_token_quantity— quantity of buy tokentimestamp— when this price point was recorded
Use case
Thewallet/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
Last modified on June 22, 2026
Was this page helpful?