Dear All, to reduce the cost burden on our operation and to put more focus on our library https://github.com/crypto-chassis/ccapi, starting May 26, 2023, we will stop servicing data to external users. We deeply apologize for the inconvenience. However, if you would like to quickly set up an in-house data collection pipeline, we can provide coding and consulting services for that purpose. Feel free to directly email us at hello@cryptochassis.com or contact us on Discord https://discord.gg/b5EKcp9s8T.
Table of Contents generated with DocToc
- This REST API provides snapshot data (e.g. market depth) and tick data (e.g. trades) for crypto-instruments.
- Supported exchanges: see the allowed values of parameter
exchange
for the information endpoint. - Backfill history: historical data since 2016-01-01, wherever applicable.
- Institutional quality and independently verifiable.
- To spur innovation and industry collaboration, this API is open for use by the public without cost.
- We specialize in market data collection, high speed trading system, infrastructure optimization, and proprietary market making. Hire us as engineers, liquidity providers, traders, or asset managers.
- Join us on Discord https://discord.gg/b5EKcp9s8T and Medium https://cryptochassis.medium.com.
- The base url is: https://api.cryptochassis.com/v1
- The limit on the API is based on public IPs: 10 requests per second per IP.
GET /information?dataType=<dataType>&exchange=<exchange>&instrument=<instrument>
Information about available data types, exchanges, instruments, and the available time range.
Parameters:
Name | Mandatory | Description |
---|---|---|
dataType |
yes | Allowed values: market-depth, trade. |
exchange |
yes | Allowed values: coinbase, gemini, kraken, bitstamp, bitfinex, bitmex, binance-us, binance-usds-futures, binance-coin-futures, huobi, huobi-usdt-swap, huobi-coin-swap, okex, kucoin, deribit. |
instrument |
no | Comma seperated list. |
Response:
[
{
"dataType": "market-depth",
"exchange": "coinbase",
"instrument": "btc-usd",
"availability": {
"depth_10": {
"firstAvailableTime": {
"seconds": 1594166400,
"iso": "2020-07-08T00:00:00.000Z"
},
"lastAvailableTime": {
"seconds": 1630886400,
"iso": "2021-09-06T00:00:00.000Z"
}
},
"depth_1": {
"firstAvailableTime": {
"seconds": 1572480000,
"iso": "2019-10-31T00:00:00.000Z"
},
"lastAvailableTime": {
"seconds": 1630886400,
"iso": "2021-09-06T00:00:00.000Z"
}
}
},
"examples": [
"https://api.cryptochassis.com/v1/market-depth/coinbase/btc-usd"
]
},
...
]
Examples:
https://api.cryptochassis.com/v1/information?dataType=market-depth&exchange=coinbase
GET /market-depth/<exchange>/<instrument>?depth=<depth>&startTime=<startTime>
Daily 1-second snapshot data on market depth (aka order books or Level 2 data) up to a depth of 10.
Parameters:
Name | Mandatory | Description |
---|---|---|
exchange |
yes | E.g. coinbase. |
instrument |
yes | E.g. btc-usd. |
depth |
no | Allowed values: 1, 10. Defaults to 1. |
startTime |
no | E.g. 1594166400 (seconds), 2020-07-08 (iso). Defaults to most recent. |
Response:
{
"urls": [
{
"startTime": {
"seconds": 1594166400, // unix time
"iso": "2020-07-08T00:00:00.000Z"
},
"endTime": {
"seconds": 1594252800, // unix time
"iso": "2020-07-09T00:00:00.000Z"
},
"url": "https://marketdata-e0323a9039add2978bf5b49550572c7c.s3.amazonaws.com/market_depth/bitfinex/btc_usd/1594166400.csv.gz?AWSAccessKeyId=AKIATPNB7YZIUQR3JVNF&Expires=1594515416&Signature=T25g0YP0ALalj5jCUAQ9mtZ41M0%3D"
// daily data, gzipped csv. Url is pre-signed and could expire.
}
],
"expiration": "300 seconds"
}
Examples:
https://api.cryptochassis.com/v1/market-depth/coinbase/btc-usd
CSV file format:
time_seconds,bid_price_bid_size|...,ask_price_ask_size|... 1594512000,9234.05_2.20765974|...,9234.98_2|...
If there is a gap in "time_seconds", it means that the market depth snapshot at that moment is the same as the previous moment.
GET /trade/<exchange>/<instrument>?startTime=<startTime>
Daily trade ticks. Each tick represents a single trade.
Parameters:
Name | Mandatory | Description |
---|---|---|
exchange |
yes | E.g. coinbase. |
instrument |
yes | E.g. btc-usd. |
startTime |
no | E.g. 1577318400 (seconds), 2019-12-26 (iso). Defaults to most recent. |
Response:
{
"urls": [
{
"startTime": {
"seconds": 1577318400, // unix time
"iso": "2019-12-26T00:00:00.000Z"
},
"endTime": {
"seconds": 1577404800, // unix time
"iso": "2019-12-27T00:00:00.000Z"
},
"url": "https://marketdata-e0323a9039add2978bf5b49550572c7c.s3.amazonaws.com/trade/coinbase/btc_usd/1577318400.csv.gzip?AWSAccessKeyId=AKIATPNB7YZIUQR3JVNF&Expires=1577486042&Signature=jQ9Vya3X9yBc7x26MyWhRKdKEdI%3D"
// daily data, gzipped csv. Url is pre-signed and could expire.
}
],
"expiration": "300 seconds"
}
Examples:
https://api.cryptochassis.com/v1/trade/coinbase/btc-usd
CSV file format:
time_seconds,price,size,is_buyer_maker 1594512000.14,9235,0.004,0
Legacy CSV file format:
time_seconds,time_nanoseconds,price,size,is_buyer_maker,trade_id 1594512000,140000000,9235,0.004,0,96572013
- macOS Archive Utility can't unzip gzipped files (Error 79 - Inappropriate file type or format). This is a known bug on some versions of macOS (see https://apple.stackexchange.com/questions/388759/archive-utility-cant-open-some-gzipped-text-files-based-on-their-contents). Try to unzip the files by other means (e.g. https://stackoverflow.com/questions/50993318/uncompress-a-txt-gz-file-in-mac).
- gunzip: 1572998400.csv.gzip: unknown suffix -- ignored. Try to
cat 1572998400.csv.gzip | gunzip > 1572998400.csv
.