Market Data

Get Prices

Get current mid prices for one or more trading pairs.

Fetches real-time mid prices (average of best bid and best ask) for the specified trading pairs from a single exchange connector. This is the fastest way to get current price data for multiple pairs simultaneously.

Mid price is calculated as: (best_bid + best_ask) / 2

This provides a fair market price that's commonly used for:

  • Portfolio valuation
  • Price displays and charts
  • Strategy calculations
  • Triggering price alerts
post/market-data/prices

Request body

connector_namestring required

Name of the exchange connector to fetch prices from (e.g., 'binance', 'kucoin', 'hyperliquid')

trading_pairsstring[] required

List of trading pairs to get prices for. Use hyphen-separated format (e.g., 'BTC-USDT').

Example request

{
  "connector_name": "binance",
  "trading_pairs": [
    "BTC-USDT",
    "ETH-USDT",
    "SOL-USDT"
  ]
}

Response

Successful Response

connectorstring required

Name of the exchange connector that provided the prices

pricesobject required

Dictionary mapping trading pair names to their current mid prices

timestampnumber required

Unix timestamp (in seconds) when the response was generated

Example response

{
  "connector": "binance",
  "prices": {
    "BTC-USDT": 42150.5,
    "ETH-USDT": 2250.75,
    "SOL-USDT": 98.25
  },
  "timestamp": 1704067200.123
}

Changes