Skip to main content

Symbol Price Ticker

Description

Returns the latest trade price.

HTTP Request

GET /fapi/v1/ticker/price

Weight

1 (for a single symbol) 2 (for all symbols)

Request Parameters

NameTypeRequiredDescription
symbolSTRINGNOTrading pair

Response Example

{
"symbol": "BTCUSDT",
"price": "6000.01",
"time": 1589437530011
}

OR (if no symbol is sent)

[
{
"symbol": "BTCUSDT",
"price": "6000.01",
"time": 1589437530011
}
]

Code Examples

cURL

# Single symbol
curl -s "https://api-sepolia.ztdx.io/fapi/v1/ticker/price?symbol=BTCUSDT"

# All symbols
curl -s "https://api-sepolia.ztdx.io/fapi/v1/ticker/price"

Python

import requests

base_url = "https://api.ztdx.io"

# Single symbol
response = requests.get(f"{base_url}/fapi/v1/ticker/price", params={"symbol": "BTCUSDT"})
data = response.json()
print(f"{data['symbol']}: {data['price']}")

# All symbols
response = requests.get(f"{base_url}/fapi/v1/ticker/price")
for ticker in response.json()[:5]:
print(f"{ticker['symbol']}: {ticker['price']}")