Historical Crypto Data #

Looking for the old v1beta1 endpoints?

We have improved our market data endpoints and labeled them under a new v1beta2 tag. These are the preferred default request crypto market data.

If you need the reference to the older v1beta1 endpoints, see relevant documentation here.

How is v1beta2 different from v1beta1?

  1. All endpoints now support multiple symbols as a query parameter.
  2. The symbol format has been changed. E.g. BTCUSD is changed to BTC/USD.
  3. The latest order book endpoint has been introduced, while the latest cross-best bid and offer (XBBO) endpoint across exchanges is removed.
All crypto market data endpoints have been made public and require no authentication. However, please authenticate to increase your data rate limit.

Trades #

The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates.

Returns trades for the queried crypto symbols

GET /v1beta2/crypto/trades
The crypto trades API provides historical trade data for a list of crypto symbols between the specified dates. The returned results are sorted by symbol first then by trade timestamp. This means that you are likely to see only one symbol in your first response if there are enough trades for that symbol to hit the limit you requested on that request. In these situations if you keep requesting again with the next_page_token you will eventually reach the next symbols if any trades were found for them.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.
start string
Optional
The inclusive start of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. in Central Time.
end string
Optional
The inclusive end of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time.
limit int
Optional
Number of maximum data points to return in a response. The limit applies to the total number of data points, not per symbol! You can use the next_page_token to fetch the next at most limit responses.
page_token string
Optional
Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows.

Response

A trades response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "trades": {
      "BTC/USD":[
        {
            "t": "2022-05-18T12:01:00.537052Z",
            "p": 58800.01,
            "s": 8.473e-05,
            "tks": "B",
            "i": 151521553
        },
      ],
      "ETH/USD": [
        {
            "t": "2022-05-18T12:01:00.363547Z",
            "p": 2027.6,
            "s": 0.06,
            "tks": "S",
            "i": 31455287
        },
        {
            "t": "2022-05-18T12:01:00.363547Z",
            "p": 2027.6,
            "s": 0.136,
            "tks": "S",
            "i": 31455288
        },
      ],
  }
  "next_page_token": null
}

Properties #

Attribute Type Description
t string Timestamp in RFC-3339 format with nanosecond precision.
p number Trade price.
s double Trade size.
tks string TakerSide of the trade (buy, sell, or unspecified)
i int Trade ID.

Latest Trade #

The Latest trade API provides the latest trade data for given crypto symbol(s).

Returns latest trade for the queried crypto symbols

GET /v1beta2/crypto/latest/trades
This endpoint returns latest trade for the requested crypto symbol.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.

Response

A Trade response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "trades": {
    "BTC/USD": {
      "i": 35717815,
      "p": 20328,
      "s": 0.0006,
      "t": "2022-07-14T01:15:16.916994Z",
      "tks": "B"
    },
    "LTC/USD": {
      "i": 35717810,
      "p": 49.605,
      "s": 28.79,
      "t": "2022-07-14T01:15:02.891779Z",
      "tks": "B"
    }
  }
}

Properties #

Attribute Type Description
t string Timestamp in RFC-3339 format with nanosecond precision.
p number Trade price.
s double Trade size.
tks string TakerSide of the trade (buy, sell, or unspecified)
i int Trade ID.

Quotes #

The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates.

Returns quotes for the queried crypto symbols

GET /v1beta2/crypto/quotes
The crypto quotes API provides historical quote data for a list of crypto symbols between the specified dates. The returned results are sorted by symbol first then by quote timestamp. This means that you are likely to see only one symbol in your first response if there are enough quotes for that symbol to hit the limit you requested on that request. In these situations if you keep requesting again with the next_page_token you will eventually reach the next symbols if any quotes were found for them.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.
start string
Optional
The inclusive start of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. in Central Time.
end string
Optional
The inclusive end of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time.
limit int
Optional
Number of maximum data points to return in a response. The limit applies to the total number of data points, not per symbol! You can use the next_page_token to fetch the next at most limit responses.
page_token string
Optional
Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows.

Response

A quotes response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "quotes": {
    "BTC/USD": [
      {
        "t": "2022-05-26T11:47:18.44347136Z",
        "bp": 29058,
        "bs": 0.3544,
        "ap": 29059,
        "as": 3.252
      }
    ],
    "ETH/USD": [
      {
        "t": "2022-05-26T11:47:18.499478272Z",
        "bp": 1817,
        "bs": 4.76,
        "ap": 1817.7,
        "as": 6.137
      }
    ]
  },
  "next_page_token": null
}

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Unprocessable

​The requested object was not found.

Properties #

Attribute Type Description
t string Timestamp in RFC-3339 format with nanosecond precision.
ap number Ask price.
as int Ask size.
bp number Bid price.
bs int Bid size.

Latest Quote #

The Latest Quote API provides the latest quote data for given ticker symbol(s).

Returns latest quotes for the queried crypto symbols

GET /v1beta2/crypto/latest/quotes
This endpoint returns latest quote for the requested crypto symbols.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.

Response

A quotes response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "quotes": {
  "ETH/USD": {
    "t": "2022-05-26T11:47:18.499478272Z",
    "bp": 1817,
    "bs": 4.76,
    "ap": 1817.7,
    "as": 6.137
  },
  "BTC/USD": {
    "t": "2022-05-26T11:47:18.44347136Z",
    "bp": 29058,
    "bs": 0.3544,
    "ap": 29059,
    "as": 3.252
  }
}

Properties #

Attribute Type Description
t string Timestamp in RFC-3339 format with nanosecond precision.
ap number Ask price.
as int Ask size.
bp number Bid price.
bs int Bid size.

Bars #

The crypto bars API provides historical bars aggregates for a list of crypto symbols between the specified dates.

Returns bars for the queried crypto symbols

GET /v1beta2/crypto/bars
The crypto bars API provides historical bars aggregates for a list of crypto symbols between the specified dates. The returned results are sorted by symbol first then by bar timestamp. This means that you are likely to see only one symbol in your first response if there are enough bars for that symbol to hit the limit you requested on that request. In these situations if you keep requesting again with the next_page_token you will eventually reach the next symbols if any bars were found for them.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.
timeframe string
Required
The timeframe of the bar aggregation. 5Min for example creates 5 minute aggregates. You can use the following values:
- [1-59]Min / T
- [1-23]Hour / H
- 1Day / D
- 1Week / W
- [1,2,3,4,6,12]Month / M
start string
Optional
The inclusive start of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the beginning of the current day. in Central Time.
end string
Optional
The inclusive end of the interval. Format RFC-3339 or YYYY-MM-DD. If missing, the default value is the current time.
limit int
Optional
Number of maximum data points to return in a response. The limit applies to the total number of data points, not per symbol! You can use the next_page_token to fetch the next at most limit responses.
page_token string
Optional
Pagination token to continue from. The value to pass here is returned in specific requests when more data is available than the request limit allows.

Response

A bars response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "bars": {
    "LTC/USD": {
      "c": 48.43,
      "h": 48.43,
      "l": 48.43,
      "n": 1,
      "o": 48.43,
      "t": "2022-07-13T18:24:00Z",
      "v": 32.64,
      "vw": 48.43
    },
    "BTC/USD": {
      "c": 19763,
      "h": 19769,
      "l": 19757,
      "n": 6,
      "o": 19762,
      "t": "2022-07-13T18:25:00Z",
      "v": 0.027,
      "vw": 19758.6259259259
    }
  }
}

Properties #

Attribute Type Description
bars object Bars object.
t string Timestamp in RFC-3339 format with nanosecond precision.
o number Open price.
h number High price.
l number Low price.
c number Close price.
v int Volume.
n int Number of trades.
vw number Volume weighted average price.

Latest Bars #

The Latest Bars API returns aggregate historical data for the requested crypto symbol(s).

Returns latest bars for the queried crypto symbol

GET /v1beta2/crypto/latest/bars
This endpoint returns latest quote for the requested crypto symbol.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.

Response

A quotes response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "bars": {
    "BTC/USD": [
      {
        "t": "2022-05-27T10:18:00Z",
        "o": 28999,
        "h": 29003,
        "l": 28999,
        "c": 29003,
        "v": 0.01,
        "n": 4,
        "vw": 29001
      }
    ]
  },
  "next_page_token": null
}

Properties #

Attribute Type Description
bars object Bars object.
t string Timestamp in RFC-3339 format with nanosecond precision.
o number Open price.
h number High price.
l number Low price.
c number Close price.
v int Volume.
n int Number of trades.
vw number Volume weighted average price.

Snapshot #

The Snapshot API returns the latest trade, latest quote, latest minute bar, latest daily bar, and previous daily bar data for crypto symbol(s).

Returns the snapshot for the queried crypto symbol.

GET /v1beta2/crypto/snapshots
This endpoint returns the snapshot for the requested crypto symbol.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.

Response

A snapshot response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
  "snapshots": {
    "LTC/USD": {
      "dailyBar": {
        "c": 48.445,
        "h": 49.475,
        "l": 46.255,
        "n": 1811,
        "o": 47.915,
        "t": "2022-07-13T05:00:00Z",
        "v": 73505.51,
        "vw": 47.7449687091
      },
      "latestQuote": {
        "ap": 48.355,
        "as": 286.27,
        "bp": 48.34,
        "bs": 65,
        "t": "2022-07-13T18:50:39.205222144Z"
      },
      "latestTrade": {
        "i": 35692529,
        "p": 48.445,
        "s": 5.31,
        "t": "2022-07-13T18:44:20.60252Z",
        "tks": "S"
      },
      "minuteBar": {
        "c": 48.445,
        "h": 48.45,
        "l": 48.445,
        "n": 2,
        "o": 48.45,
        "t": "2022-07-13T18:44:00Z",
        "v": 5.53,
        "vw": 48.445198915
      },
      "prevDailyBar": {
        "c": 47.94,
        "h": 49.04,
        "l": 46.715,
        "n": 1521,
        "o": 48.89,
        "t": "2022-07-12T05:00:00Z",
        "v": 62576.13,
        "vw": 48.0954448661
      }
    },
    "BTC/USD": {
      "dailyBar": {
        "c": 19763,
        "h": 20086,
        "l": 18890,
        "n": 9757,
        "o": 19463,
        "t": "2022-07-13T05:00:00Z",
        "v": 2130.1762,
        "vw": 19449.1749137935
      },
      "latestQuote": {
        "ap": 19784,
        "as": 0.5122,
        "bp": 19781,
        "bs": 0.483,
        "t": "2022-07-13T18:50:39.850137856Z"
      },
      "latestTrade": {
        "i": 35691714,
        "p": 19775,
        "s": 0.0005,
        "t": "2022-07-13T18:50:06.506625Z",
        "tks": "S"
      },
      "minuteBar": {
        "c": 19763,
        "h": 19763,
        "l": 19763,
        "n": 1,
        "o": 19763,
        "t": "2022-07-13T18:49:00Z",
        "v": 0.01,
        "vw": 19763
      },
      "prevDailyBar": {
        "c": 19463,
        "h": 20038,
        "l": 19230,
        "n": 7494,
        "o": 19978,
        "t": "2022-07-12T05:00:00Z",
        "v": 1378.3524,
        "vw": 19652.5553037815
      }
   }
}

Properties #

Attribute Type Description
symbol string Symbol that was queried for.
latestTrade object Latest trade object.
latestQuote object Latest quote object.
minuteBar object Minute bar object.
dailyBar object Daily bar object.
prevDailyBar object Previous daily close bar object.

Latest Orderbook #

The Latest Orderbook API returns the latest orderbook for crypto symbol(s).

Returns latest orderbook for the queried crypto symbols

GET /v1beta2/crypto/latest/orderbooks
This endpoint returns latest orderbook for the requested crypto symbols.

Parameters

Query Parameters

Attribute Type Requirement Description
symbols string
Required
Comma separated list of symbols.

Response

A orderbooks response object.

Errors #

400 - Bad Request

​One of the request parameters is invalid. See the returned message for details

403 - Forbidden

Authentication headers are missing or invalid.

404 - Not found

​The requested object was not found.

Response #

{
 "orderbooks": {
   "BTC/USD": {
      "t": "2022-06-24T08:00:14.137774336Z",
      "b": [
        {
          "p": 20846,
          "s": 0.1902
        },
        {
          "p": 20350,
          "s": 0
        }
      ],
      "a": [
        {
          "p": 20902,
          "s": 0.0097
        },
        {
          "p": 21444,
          "s": 0
        }
      ]
    }
  }
}

Properties #

Attribute Type Description
t string Timestamp in RFC-3339 format with nanosecond precision.
b array Bids
a array Asks