Skip to main content
GET
/
api
/
v1
/
market-data?markets=BTC-USD,ETH-USD
Retrieve market data for a given list of markets
curl --request GET \
  --url 'https://market-data.trade.rails.xyz/api/v1/market-data?markets=BTC-USD%2CETH-USD'
[
  {
    "market": "BTC-USD",
    "type": "INDEX",
    "index": "CCIX",
    "value": "58400.1937255873",
    "updatedAt": 1726171141994
  },
  {
    "market": "BTC-USD",
    "type": "24H_COUNT",
    "index": "RAILS",
    "value": "46730",
    "updatedAt": 1726171109083
  },
  {
    "market": "BTC-USD",
    "type": "24H_VOLUME",
    "index": "RAILS",
    "value": "28313423.250000027202",
    "updatedAt": 1726171109083
  },
  {
    "market": "BTC-USD",
    "type": "ASK",
    "index": "RAILS",
    "value": "58191.7113328",
    "updatedAt": 1726174865550
  },
  {
    "market": "BTC-USD",
    "type": "BID",
    "index": "RAILS",
    "value": "58180.07415425",
    "updatedAt": 1726174865550
  },
  {
    "market": "BTC-USD",
    "type": "FUNDING",
    "index": "RAILS",
    "value": "0.0000666285937435",
    "updatedAt": 1726167616514
  },
  {
    "market": "BTC-USD",
    "type": "NEXT_FUNDING",
    "index": "RAILS",
    "value": "0.0000666285937435",
    "updatedAt": 1726167616514
  },
  {
    "market": "BTC-USD",
    "type": "OPEN_INTEREST",
    "index": "RAILS",
    "value": "53.28177507",
    "updatedAt": 1726170313764
  },
  {
    "market": "ETH-USD",
    "type": "INDEX",
    "index": "CCIX",
    "value": "2360.74497472941",
    "updatedAt": 1726171140745
  },
  {
    "market": "ETH-USD",
    "type": "24H_COUNT",
    "index": "RAILS",
    "value": "46948",
    "updatedAt": 1726171109083
  },
  {
    "market": "ETH-USD",
    "type": "24H_VOLUME",
    "index": "RAILS",
    "value": "28513340.9400000105",
    "updatedAt": 1726171109083
  },
  {
    "market": "ETH-USD",
    "type": "ASK",
    "index": "RAILS",
    "value": "2350.5038547",
    "updatedAt": 1726174865612
  },
  {
    "market": "ETH-USD",
    "type": "BID",
    "index": "RAILS",
    "value": "2350.13526604",
    "updatedAt": 1726174865612
  },
  {
    "market": "ETH-USD",
    "type": "FUNDING",
    "index": "RAILS",
    "value": "0.0000527105290972",
    "updatedAt": 1726167616514
  },
  {
    "market": "ETH-USD",
    "type": "NEXT_FUNDING",
    "index": "RAILS",
    "value": "0.0000527105290972",
    "updatedAt": 1726167616514
  },
  {
    "market": "ETH-USD",
    "type": "OPEN_INTEREST",
    "index": "RAILS",
    "value": "592.23030026",
    "updatedAt": 1726170313759
  }
]

Index Prices

In the response, items with "type": "INDEX" represent the current index price. The "value" field holds the index price, while the "index" field specifies the source of that price. You can find the list of possible sources here.

Funding Rates

In the response, items with "type": "FUNDING" represent the final funding rate for the last hour while items with "type": "NEXT_FUNDING" represent the real-time funding rate for the current hour.

Query Parameters

markets
string
required

Comma separated market names. Example value: BTC-USD,ETH-USD. To get all supported markets, call /api/v1/markets endpoint.

Response

200 - application/json
market
string

To get all possible values for market, call /api/v1/markets endpoint.

type
string

Type of market data. Possible values are: INDEX, ASK, BID, FUNDING, NEXT_FUNDING, OPEN_INTEREST, 24H_VOLUME, 24H_COUNT

index
string

Name of the index. Possible values are: CCIX, CCCAGG, KRAKEN, RAILS

value
string
updatedAt
number
I