API Documentation
Tickers API
API endpoint for retrieving 24-hour market data for all trading pairs
Retrieves 24-hour market data for all trading pairs on the specified blockchain.
Endpoint
GET /v1/spot/tickersBase URL
https://dev-backend.pixpel.ioQuery Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
chain | number | No | 1482601649 | Blockchain chain ID |
Request Examples
cURL:
curl -X GET "https://dev-backend.pixpel.io/v1/spot/tickers?chain=1482601649"JavaScript/TypeScript:
const response = await fetch('https://dev-backend.pixpel.io/v1/spot/tickers?chain=1482601649');
const tickers = await response.json();Python:
import requests
response = requests.get('https://dev-backend.pixpel.io/v1/spot/tickers', params={'chain': 1482601649})
tickers = response.json()Response Schema
{
"success": true,
"statusCode": 200,
"message": "Success",
"data": [
{
"ticker_id": "string",
"base_currency": "string",
"target_currency": "string",
"pool_id": "string",
"last_price": "string",
"base_volume": "string",
"target_volume": "string",
"liquidity_in_usd": "string",
"bid": "string",
"ask": "string",
"high": "string",
"low": "string"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
ticker_id | string | Unique identifier for the trading pair (BASE_TARGET format) |
base_currency | string | Token address of the base currency |
target_currency | string | Token address of the target currency |
pool_id | string | Liquidity pool identifier |
last_price | string | Most recent trade price (6 decimal places) |
base_volume | string | 24h trading volume in base currency (6 decimal places) |
target_volume | string | 24h trading volume in target currency (6 decimal places) |
liquidity_in_usd | string | Total liquidity in USD (2 decimal places) |
bid | string | Highest buy order price (last_price * 0.98) |
ask | string | Lowest sell order price (last_price * 1.02) |
high | string | Highest price in 24h period (6 decimal places) |
low | string | Lowest price in 24h period (6 decimal places) |
Example Response
{
"success": true,
"statusCode": 200,
"message": "Success",
"data": [
{
"ticker_id": "0x123abc_0x456def",
"base_currency": "0x123abc",
"target_currency": "0x456def",
"pool_id": "0x789ghi",
"last_price": "1.234567",
"base_volume": "125000.500000",
"target_volume": "154321.750000",
"liquidity_in_usd": "500000.00",
"bid": "1.209876",
"ask": "1.259258",
"high": "1.350000",
"low": "1.150000"
}
]
}Error Responses
500 Internal Server Error:
{
"success": false,
"statusCode": 500,
"message": "Error processing tickers data"
}