List of tickers [Private]
Get information on specific traded pairs. Returns an array of trading pairs objects.
Method name: | /v2/ticker |
Request type: | GET |
To call private endpoints, you need to get a JWT token or an API key for authentication.
Here you can learn in detail how to successfully authenticate.
Tickers are needed to reflect market trends .
In the request it is possible to specify specific pairs of assets separated by a comma (then only the tickers of these pairs will be returned in response) or do not specify specific pairs - then all available tickers will be returned from the endpoint.
Tickers contained next indicators of crypto pairs: the percentage change in the price over the last 24 hours, the current price of the asset in the pair, the price equivalent to the stable currency, the highest and lowest value of the price in 24 hours, the amount of liquidity for each of the assets in the pair, the best purchase price and sale of the asset.
Exemplary request
Example path | Description |
---|---|
/v2/ticker | Returns information about all pairs. |
/v2/ticker?pairs=BTC_USDT,ETH_USDT | Returns information about BTC_USDT and ETH_USDT markets. |
const url = BASE_URL;
const path = "/v2/ticker?pairs=BTC_USDT,ETH_USDT";
const body = {};
const options = {
method: "GET",
headers: {
accept: "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ${data.accessToken}` // data.accessToken - generated a JWT token via /v2/auth/login.
},
body: JSON.stringify(body),
};
fetch(url + path, options)
.then((response) => response.json())
.then((showResponse) => console.log(showResponse.data));
import requests
url = BASE_URL
path = "/v2/ticker?pairs=BTC_USDT,ETH_USDT"
headers = {
"accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer " + data.accessToken # data.accessToken - generated a JWT token via /v2/auth/login.
}
body = {};
request = requests.get(url + path, headers=headers, json=body)
print(request.json())
How to call private endpoints here
Response
{
"data": [
{
"pair": "BTC_USDT", // Traded pair
"percentagePriceChange": "-0.03490931899641581", // Relative price change, in percent
"price": "27900", // Current median price
"equivalentPrice": "", // TBD
"high": "29059.69", // Highest price
"low": "27900", // Lowest price
"baseVolume": "2.9008499999999993", // Traded volume as base
"quoteVolume": "82251.41477976", // Traded volume as quote
"bestBidPrice": "27926.91", // The best bid price now
"bestAskPrice": "27970.02", // The best ask price now
"priceChange": "-973.9700000000012" // Absolute price change
},
{
"pair": "ETH_USDT",
"percentagePriceChange": "0.00",
"price": "0",
"equivalentPrice": "",
"high": "0",
"low": "0",
"baseVolume": "0",
"quoteVolume": "0",
"bestBidPrice": "0",
"bestAskPrice": "0",
"priceChange": "0"
}
]
}
Updated 9 months ago