Access all trading pairs
GET: https://openapi.sun.io/v2/allpairs?ver=3
Parameters:
page_size : int, size of each page, max 500
page_num: int, number of the page, starting from 0
token_address: optional; return only the data containing the specific token address
orderBy: optional; return the data ordered by the specific item (price, quote_volume or
base_volume)
desc: optional; true = decreasing order; false = increasing order
Return format:
{
“data”: [{
“TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR_TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6tf”:
//key: ids of base_token and quote_token
{
“quote_id”: “TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR”,
“quote_decimal”: “6”, //precision of quote_token
“quote_name”: “Wrapped TRX”, //name of quote_token
“quote_symbol”: “WTRX”, //symbol of quote_token
“base_id”: “TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t”, //address of base_token
“base_decimal”: “6”, //precision of base_token
“base_name”: “Tether USD”, //name of base_token
“base_symbol”: “USDT”, //symbol of base_token
“price”: “0.938196997790940827”, //price of quote_token, calculated in base_token
“quote_volume”: “0”, //total amount of quote_token traded in the last 24 hours
(minimum unit)
“base_volume”: “0” //total amount of base_token traded in the last 24 hours
(minimum unit)
}
}],
“err_msg”: “”,
“err_no”: 0,
“total_num”: 143 //total number of entries
}
Note:
Maximum number of requests to the API is 1 request per user per second