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
GET /v1/quotes/current?filter_symbol_id={filter_symbol_id}
GET /v1/quotes/{symbol_id}/current
URL Parameters
Parameter | Type | Description |
---|---|---|
filter_symbol_id | string[] | Comma or semicolon delimited parts of symbol identifier used to filter response. (optional, full list available here) |
Output variables
Variable | Description |
---|---|
symbol_id | Our symbol identifier, format documented here |
time_exchange | Exchange time of order book |
time_coinapi | CoinAPI time when order book received from exchange |
ask_price | Best asking price |
ask_size | Volume resting on best ask (if a value is equal to zero then size is unknown) |
bid_price | Best bidding price |
bid_size | Volume resting on best bid (if a value is equal to zero then size is unknown) |
last_trade | Last 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
GET /v1/quotes/latest?limit={limit}&filter_symbol_id={filter_symbol_id}
GET /v1/quotes/{symbol_id}/latest?limit={limit}
URL Parameters
Parameter | Type | Description |
---|---|---|
symbol_id | string | Symbol identifier of requested timeseries (full list available here) |
limit | int | Amount 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_id | string[] | Comma or semicolon delimited parts of symbol identifier used to filter response. (optional, full list available here) |
Output variables
Variable | Description |
---|---|
symbol_id | Our symbol identifier, format documented here. |
time_exchange | Exchange time of order book |
time_coinapi | CoinAPI time when order book received from exchange |
ask_price | Best asking price |
ask_size | Volume resting on best ask (if a value is equal to zero then size is unknown) |
bid_price | Best bidding price |
bid_size | Volume 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
Parameter | Type | Description |
---|---|---|
symbol_id | string | Symbol identifier for requested timeseries (full list available here) |
time_start | timestring | Starting time in ISO 8601 (required) |
time_end | timestring | Timeseries 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) |
limit | int | Amount 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
Variable | Description |
---|---|
symbol_id | Our symbol identifier, format documented here. |
time_exchange | Exchange time of order book |
time_coinapi | CoinAPI time when order book received from exchange |
ask_price | Best asking price |
ask_size | Volume resting on best ask (if a value is equal to zero then size is unknown) |
bid_price | Best bidding price |
bid_size | Volume resting on best bid (if a value is equal to zero then size is unknown) |
Was this section helpful?