Quotes

This section describes calls related to quotes data, also known as quotes or passive level 1 data.

Current data GET

curl https://rest.coinapi.io/v1/quotes/current \
  --request GET
  --header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"

The above command returns JSON structured like this:

[
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000Z",
    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124,
    "last_trade": {
	    "time_exchange": "2017-03-18T22:42:21.3763342Z",
	    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
	    "uuid": "1EA8ADC5-6459-47CA-ADBF-0C3F8C729BB2",
	    "price": 770.000000000,
	    "size": 0.050000000,
	    "taker_side": "SELL"
    }
  },
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000Z",
    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124,
    "last_trade": {
	    "time_exchange": "2017-03-18T22:42:21.3763342Z",
	    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
	    "uuid": "1EA8ADC5-6459-47CA-ADBF-0C3F8C729BB2",
	    "price": 770.000000000,
	    "size": 0.050000000,
	    "taker_side": "SELL"
    }
  }
]

Get current quotes for all symbols or for a specific symbol.

HTTP Request

  1. GET /v1/quotes/current?filter_symbol_id={filter_symbol_id}
  2. GET /v1/quotes/{symbol_id}/current

URL Parameters

ParameterTypeDescription
filter_symbol_idstring[]Comma or semicolon delimited parts of symbol identifier used to filter response. (optional, full list available here)

Output variables

VariableDescription
symbol_idOur symbol identifier, format documented here
time_exchangeExchange time of order book
time_coinapiCoinAPI time when order book received from exchange
ask_priceBest asking price
ask_sizeVolume resting on best ask (if a value is equal to zero then size is unknown)
bid_priceBest bidding price
bid_sizeVolume resting on best bid (if a value is equal to zero then size is unknown)
last_tradeLast executed transaction, variables described in trades section

Latest data GET

curl https://rest.coinapi.io/v1/quotes/latest \
  --request GET
  --header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"

The above command returns JSON structured like this:

[
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000Z",
    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124
  },
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000",
    "time_coinapi": "2017-03-18T22:42:21.3763342",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124
  }
]

Get latest updates of the quotes up to 1 minute ago. Latest data is always returned in time descending order.

HTTP Request

  1. GET /v1/quotes/latest?limit={limit}&filter_symbol_id={filter_symbol_id}
  2. GET /v1/quotes/{symbol_id}/latest?limit={limit}

URL Parameters

ParameterTypeDescription
symbol_idstringSymbol identifier of requested timeseries (full list available here)
limitintAmount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)
filter_symbol_idstring[]Comma or semicolon delimited parts of symbol identifier used to filter response. (optional, full list available here)

Output variables

VariableDescription
symbol_idOur symbol identifier, format documented here.
time_exchangeExchange time of order book
time_coinapiCoinAPI time when order book received from exchange
ask_priceBest asking price
ask_sizeVolume resting on best ask (if a value is equal to zero then size is unknown)
bid_priceBest bidding price
bid_sizeVolume resting on best bid (if a value is equal to zero then size is unknown)

Historical data GET

curl https://rest.coinapi.io/v1/quotes/BITSTAMP_SPOT_BTC_USD/history?time_start=2016-01-01T00:00:00 \
  --request GET
  --header "X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY"

The above command returns JSON structured like this:

[
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000Z",
    "time_coinapi": "2017-03-18T22:42:21.3763342Z",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124
  },
  {
    "symbol_id": "BITSTAMP_SPOT_BTC_USD",
    "time_exchange": "2013-09-28T22:40:50.0000000",
    "time_coinapi": "2017-03-18T22:42:21.3763342",
    "ask_price": 770.000000000,
    "ask_size": 3252,
    "bid_price": 760,
    "bid_size": 124
  }
]

Get historical quote updates within requested time range, returned in time ascending order.

HTTP Request

GET /v1/quotes/{symbol_id}/history?time_start={time_start}&time_end={time_end}&limit={limit}

URL Parameters

ParameterTypeDescription
symbol_idstringSymbol identifier for requested timeseries (full list available here)
time_starttimestringStarting time in ISO 8601 (required)
time_endtimestringTimeseries ending time in ISO 8601 (optional, if not supplied then the data is returned to the end or when result elements count reaches the limit)
limitintAmount of items to return (optional, mininum is 1, maximum is 100000, default value is 100, if the parameter is used then every 100 output items are counted as one request)

Output variables

VariableDescription
symbol_idOur symbol identifier, format documented here.
time_exchangeExchange time of order book
time_coinapiCoinAPI time when order book received from exchange
ask_priceBest asking price
ask_sizeVolume resting on best ask (if a value is equal to zero then size is unknown)
bid_priceBest bidding price
bid_sizeVolume resting on best bid (if a value is equal to zero then size is unknown)

Copyright 2022 COINAPI LTD or its affiliates. All rights reserved.
StatusPage: