Logo
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/tickers

Base URL

https://dev-backend.pixpel.io

Query Parameters

ParameterTypeRequiredDefaultDescription
chainnumberNo1482601649Blockchain 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

FieldTypeDescription
ticker_idstringUnique identifier for the trading pair (BASE_TARGET format)
base_currencystringToken address of the base currency
target_currencystringToken address of the target currency
pool_idstringLiquidity pool identifier
last_pricestringMost recent trade price (6 decimal places)
base_volumestring24h trading volume in base currency (6 decimal places)
target_volumestring24h trading volume in target currency (6 decimal places)
liquidity_in_usdstringTotal liquidity in USD (2 decimal places)
bidstringHighest buy order price (last_price * 0.98)
askstringLowest sell order price (last_price * 1.02)
highstringHighest price in 24h period (6 decimal places)
lowstringLowest 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"
}