How to obtain ticker data for a specific crypto asset?

Created by TradingAPI Support, Modified on Sat, 28 Sep at 4:33 AM by TradingAPI Support

To use the TradingAPI REST API to obtain data for a specific ticker, follow these steps:

  1. Endpoint: Use the Tickers endpoint: https://tradingapi.rest/v1/ticker/{exchange}
  2. Replace {exchange} with the name of the exchange you want to get data from (e.g., "gate").
  3. Required Parameters:
    • base: The base currency of the trading pair (e.g., "BTC")
    • quote: The quote currency of the trading pair (e.g., "USDT")
  4. Required Headers:
    • X-API-KEY: Your API key
    • User-Agent: (optional) Your custom User Agent


import requests

url = "https://tradingapi.rest/v1/ticker/gate"  # Example using Gate.io exchange
params = {
    "base": "BTC",
    "quote": "USDT"
}
headers = {
    "X-API-KEY": "YOUR-API-KEY",
    "User-Agent": "YOUR-USER-AGENT"
}

response = requests.get(url, params=params, headers=headers)
data = response.json()
print(data)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article