Overview
Fetch real-time price and volume data for a specific trading pair on an exchange. The endpoint supports Redis caching with a 10-second TTL and automatically falls back to database storage when the CCXT service is unavailable.
Endpoint
GET /api/v1/market/ticker/:exchange/:symbol
Path Parameters
The exchange identifier (e.g., binance, coinbase, kraken)
The trading pair symbol in exchange format (e.g., BTC/USDT, ETH/USD)
Response Schema
The exchange name from the request
The trading pair symbol from the request
The last traded price for the symbol
The 24-hour trading volume
The timestamp when this data was captured from the exchange
Code Examples
curl -X GET "https://api.neuratrade.io/api/v1/market/ticker/binance/BTC/USDT" \
-H "Content-Type: application/json"
Response Example
{
"exchange" : "binance" ,
"symbol" : "BTC/USDT" ,
"price" : "50000.00" ,
"volume" : "1250.5432" ,
"timestamp" : "2026-03-03T10:30:45Z"
}
Data Sources
The endpoint retrieves data in the following priority order:
Redis Cache - Returns cached data if available (10-second TTL)
Live CCXT Service - Fetches real-time data from the exchange if CCXT service is healthy
Database Fallback - Queries the most recent ticker from the market_data table if live service is unavailable
Error Responses
400 Bad Request
404 Not Found
{
"error" : "Exchange and symbol are required"
}
Implementation Details
Caching Strategy : 10-second Redis TTL for ticker data
Database Schema : Joins market_data, exchanges, and trading_pairs tables
Source Code : services/backend-api/internal/api/handlers/market.go:435
Bulk Tickers
To retrieve all tickers for a specific exchange, use the bulk endpoint:
GET /api/v1/market/tickers/:exchange
See the bulk tickers endpoint for retrieving multiple trading pairs in a single request.