Skip to main content

Symbol Price Ticker

Description

Returns the latest trade price. If the symbol has no trade price yet, the mark price is returned instead.

HTTP Request

GET /fapi/v1/ticker/price

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.prex.world/fapi/v1/ticker/price?symbol=BTCUSDT"

# All symbols
curl -s "https://api.prex.world/fapi/v1/ticker/price"

Python

import requests

base_url = "https://api.prex.world"

# 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']}")