24hr Ticker Price Change Statistics
Description
24-hour price change statistics.
HTTP Request
GET /fapi/v1/ticker/24hr
Weight
1 (for a single symbol) 40 (for all symbols)
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | NO | Trading pair |
Response Example
{
"symbol": "BTCUSDT",
"priceChange": "-94.99999800",
"priceChangePercent": "-95.960",
"weightedAvgPrice": "0.29628482",
"lastPrice": "4.00000200",
"lastQty": "200.00000000",
"openPrice": "99.00000000",
"highPrice": "100.00000000",
"lowPrice": "0.10000000",
"volume": "8913.30000000",
"quoteVolume": "15.30000000",
"openTime": 1499783499040,
"closeTime": 1499869899040,
"firstId": 28385, // First trade ID
"lastId": 28460, // Last trade ID
"count": 76 // Total number of trades
}
OR (if no symbol is sent)
[
{
"symbol": "BTCUSDT",
...
}
]
Code Examples
cURL
curl -s "https://api-sepolia.ztdx.io/fapi/v1/ticker/24hr?symbol=BTCUSDT"
Python
import requests
base_url = "https://api.ztdx.io"
response = requests.get(f"{base_url}/fapi/v1/ticker/24hr", params={"symbol": "BTCUSDT"})
data = response.json()
print(f"Symbol: {data['symbol']}")
print(f"Last Price: {data['lastPrice']}")
print(f"24h Change: {data['priceChange']} ({data['priceChangePercent']}%)")
print(f"24h High: {data['highPrice']}, Low: {data['lowPrice']}")
print(f"24h Volume: {data['volume']}")