Introduction
Welcome to the Cryptick API!
If you have any questions or feedback relating to the API, please reach out!
Endpoints
Cryptick currently has 2 endpoints you can integrate with: Server and Edge.
Server Endpoints
The server handles the following requests:
GET /v1/candleSets
GET /v1/candles
API Endpoint: https://api.cryptick.net
WebSocket Endpoint: wss://api.cryptick.net/v1/realtime
Edge Endpoints
The edge handles the following requests:
GET /v1/markets
GET /v1/trades
API Endpoint: https://edge.cryptick.net
WebSocket Endpoint: wss://edge.cryptick.net/v1/realtime
As Cryptick grows, multiple edge endpoints will become available to reduce latency.
Authentication
Both HTTP requests and WebSockets are authenticated using the header: Authorization: <key>
(replacing <key>
with your API key).
All HTTP requests must be authenticated.
All WebSocket requests must be authenticated EXCEPT for these subscriptions:
- Realtime Trades
- Order Books
- Candles for the public Candle Sets:
- 1 Minute
- 15 Minute
- 1 Hour
- 4 Hour
- 1 Day
- 100k Tick
- 1M Volume (Quote)
WebSockets can only be authenticated as part of the initial connection. You will need to create a new connection if you need to authenticate with a different API key or didn't authenticate initially.
Rate Limits
Current rate limit: 10 requests / 5 seconds.
Requests are limited per account, across all connections.
If you make 5 requests via HTTP and 6 requests via WebSocket in under 5 seconds, the last request will be rate limited.
HTTP Rate Limits
HTTP Rejected Response (Status: 429):
{
"error": "Too many requests"
}
All HTTP responses will have headers X-RateLimit-Limit
and X-RateLimit-Remaining
.
X-RateLimit-Limit
indicates the maximum number of requests in a timeframe.X-RateLimit-Remaining
indicates the number of requests remaining in a timeframe.
HTTP rejected responses will have a status code of 429 and header X-RateLimit-Retry
.
X-RateLimit-Retry
indicates the number of milliseconds to wait before at least 1 request will be successful.
WebSocket Rate Limits
WebSocket Rejected Response (with 500ms retry value):
{
"error": "Too many requests",
"retry": 500
}
Unauthenticated WebSockets are subject to the same limits (20 requests / 10 seconds) per connection.
WebSocket rejected requests will have a retry
key indicating the number of milliseconds to wait before sending another request.
HTTP
Candle Sets (HTTP)
Candle Sets Response Example:
{
"success": "true",
"data": [
{
"id": 239,
"marketId": 3,
"type": 1,
"size": 15,
"timeType": 2
}
]
}
Get a list of accessible candle sets for a given market.
Path: /v1/candleSets
Full Endpoint: https://api.cryptick.net/v1/candleSets
Candle Sets Request
Key | Type | Details | Required |
---|---|---|---|
marketId | number | Parent market id | true |
Candle Sets Response
Key | Type | Details |
---|---|---|
id | number | Candle set id |
marketId | number | Candle set market id |
type | number | Candle set type |
size | number | Candle set size |
timeType | number | Candle set time type |
Candles (HTTP)
Candles Response Example:
{
"success": "true",
"data": [
{
"candleSetId": 16,
"id": 601,
"fromTradeId": 60000001,
"toTradeId": 60100000,
"open": 3666.6,
"high": 3980,
"low": 3662.4,
"close": 3902.6,
"volume": 397427000,
"baseVolume": 103128,
"buyerMakerVolume": 186263000,
"buyerMakerBaseVolume": 48273.6,
"vwap": 3854.7,
"time": "2021-05-10T02:17:13.524Z"
}
]
}
Get a subset of candles from a candle set.
Requests without a fromId
are in descending order.
Requests with a fromId
are in ascending order.
Path: /v1/candles
Full Endpoint: https://api.cryptick.net/v1/candles
Candles HTTP Request
Key | Type | Details | Required |
---|---|---|---|
candleSetId | number | Parent candle set id | true |
fromId | number | Inclusive id of the first candle returned | false |
limit | number | Quantity of candles returned (Max: 1000) | false |
Candles HTTP Response
Key | Type | Details |
---|---|---|
candleSetId | number | Candle set id |
id | number | Candle id |
fromTradeId | number | Id of the earliest included trade |
toTradeId | number | Id of the latest included trade |
open | number | Candle open price |
high | number | Candle high price |
low | number | Candle low price |
close | number | Candle close price |
volume | number | Candle volume in quote currency |
baseVolume | number | Candle volume in base currency |
buyerMakerVolume | number | Candle market sell / limit buy volume in quote currency |
buyerMakerBaseVolume | number | Candle market sell / limit buy volume in base currency |
vwap | number | Volume weighted average price |
time | string | Candle close time in format: YYYY-MM-DDTHH:mm:ss.sssZ (ISO 8601) |
See the BuyerMaker definition.
Markets (HTTP)
Markets Response Example:
{
"success": "true",
"data": [
{
"id": 1,
"exchange": "Binance",
"symbol": "BTCUSDT",
"type": 1
}
]
}
Get a list of all supported markets.
Path: /v1/markets
Full Endpoint: https://edge.cryptick.net/v1/markets
Markets HTTP Request
This request requires no parameters.
Markets HTTP Response
Key | Type | Details |
---|---|---|
id | number | Market id |
exchange | number | Market exchange |
symbol | number | Market symbol |
type | number | Market Type |
Trades (HTTP)
Trades Response Example:
{
"success": "true",
"data": [
{
"marketId": 2,
"id": 208226001,
"amount": 80,
"price": 3326.5,
"buyerMaker": false,
"externalId": "abb5694b-d4b5-ea3b-25fc-845d801bf0bc",
"time": "2018-12-11T17:56:59.265Z"
}
]
}
Get a subset of trades from a market.
Requests without a fromId
are in descending order.
Requests with a fromId
are in ascending order.
Path: /v1/trades
Full Endpoint: https://edge.cryptick.net/v1/trades
Trades HTTP Request
Key | Type | Details | Required |
---|---|---|---|
marketId | number | Parent market id | true |
fromId | number | Inclusive id of the first trade returned | false |
limit | number | Quantity of candles returned (Max: 1000) | false |
Trades HTTP Response
Key | Type | Details |
---|---|---|
marketId | number | Parent market id |
id | number | Trade id |
amount | number | Trade amount in quote currency |
price | number | Trade price |
buyerMaker | boolean | Trade BuyerMaker |
externalId | string | Exchange trade id |
time | string | Trade time in format: YYYY-MM-DDTHH:mm:ss.sssZ (ISO 8601) |
WebSocket
WebSocket Introduction
WebSocket connections support data requests (like HTTP) and subscriptions.
All requests should be in JSON format.
WebSocket Request Topics
Request Topic Key Example:
{
"topic": "trades"
}
A request topic is required for every request.
Valid Request Topics:
trades
orderBook
markets
candles
candleSets
WebSocket Request Ids
Request Id Key Example:
{
"id": 1
}
An id can be included with any request and will be present on the related response.
This is especially useful for data requests.
WebSocket Subscriptions
Subscribe Request Example:
{
"topic": "trades",
"subscribe": "trades"
}
Unsubscribe Request Example:
{
"topic": "candles",
"unsubscribe": "candlesRealtime"
}
Subscribe (or unsubscribe) to topics by passing a subscription topic.
Valid Subscription Topics:
trades
(topic:trades
)orderBook
(topic:orderBook
)candlesRealtime
(topic:candles
)candlesComplete
(topic:candles
)
WebSocket Data Requests
Cryptick supports historical data requests via WebSockets and HTTP requests.
WebSocket Intelligent Subscriptions (Historical Data Merge)
Cryptick provides an easy solution to merge historical data with realtime updates.
This can greatly simplify an automated trading algorithm that needs to use recent historical data to seed indicators, etc.
This supports candles & trades.
Candle Sets (WebSocket)
Candle Sets Request Example:
{
"topic": "candleSets",
"id": 420,
"marketId": 3
}
Candle Sets Response Example:
{
"topic": "candleSets",
"id": 420,
"data": [
{
"id": 239,
"marketId": 3,
"type": 1,
"size": 15,
"timeType": 2
}
]
}
Get a list of accessible candle sets for a given market.
Candle Sets WebSocket Request
Key | Type | Details | Required |
---|---|---|---|
marketId | number | Parent market id | true |
Candle Sets WebSocket Response
Key | Type | Details |
---|---|---|
id | number | Candle set id |
marketId | number | Candle set market id |
type | number | Candle set type |
size | number | Candle set size |
timeType | number | Candle set time type |
Candles (WebSocket)
Candles Request Example:
{
"topic": "candles",
"id": 420,
"candleSetId": 239,
"fromId": 5,
"limit": 1
}
Candles Response Example:
{
"topic": "candles",
"id": 420,
"data": [
{
"candleSetId": 239,
"id": 5,
"fromTradeId": 5359,
"toTradeId": 6549,
"open": 5922,
"high": 5930,
"low": 5908,
"close": 5911,
"volume": 3071910,
"baseVolume": 519018,
"buyerMakerVolume": 771444,
"buyerMakerBaseVolume": 130384,
"vwap": 5918.69,
"time": "2020-03-23T07:11:00.000Z"
}
]
}
Get a subset of candles from a candle set.
Requests without a fromId
are in descending order.
Requests with a fromId
are in ascending order.
Candles WebSocket Request
Key | Type | Details | Required |
---|---|---|---|
candleSetId | number | Parent candle set id | true |
fromId | number | Inclusive id of the first candle returned | false |
limit | number | Quantity of candles returned (Max: 1000) | false |
Candles WebSocket Response
Key | Type | Details |
---|---|---|
candleSetId | number | Candle set id |
id | number | Candle id |
fromTradeId | number | Id of the earliest included trade |
toTradeId | number | Id of the latest included trade |
open | number | Candle open price |
high | number | Candle high price |
low | number | Candle low price |
close | number | Candle close price |
volume | number | Candle volume in quote currency |
baseVolume | number | Candle volume in base currency |
buyerMakerVolume | number | Candle market sell / limit buy volume in quote currency |
buyerMakerBaseVolume | number | Candle market sell / limit buy volume in base currency |
vwap | number | Volume weighted average price |
time | string | Candle close time in format: YYYY-MM-DDTHH:mm:ss.sssZ (ISO 8601) |
See the BuyerMaker definition.
Markets (WebSocket)
Markets Request Example:
{
"topic": "markets",
"id": 420
}
Markets Response Example:
{
"topic": "markets",
"id": 420,
"data": [
{
"id": 1,
"exchange": "Binance",
"symbol": "BTCUSDT",
"type": 1
}
]
}
Get a list of all supported markets.
Markets WebSocket Request
This request requires no additional parameters.
Markets WebSocket Response
Key | Type | Details |
---|---|---|
id | number | Market id |
exchange | number | Market exchange |
symbol | number | Market symbol |
type | number | Market Type |
Trades (WebSocket)
Trades Request Example
{
"topic": "trades",
"id": 420,
"marketId": 1,
"fromId": 543444001,
"limit": 1
}
Trades Response Example:
{
"topic": "trades",
"id": 420,
"data": [
{
"marketId": 1,
"id": 543444001,
"amount": 3676.75,
"price": 39114.4,
"buyerMaker": true,
"externalId": "544023881",
"time": "2021-05-27T18:53:24.674Z"
}
]
}
Get a subset of trades from a market.
Requests without a fromId
are in descending order.
Requests with a fromId
are in ascending order.
Trades WebSocket Request
Key | Type | Details | Required |
---|---|---|---|
marketId | number | Parent market id | true |
fromId | number | Inclusive id of the first trade returned | false |
limit | number | Quantity of candles returned (Max: 1000) | false |
Trades WebSocket Response
Key | Type | Details |
---|---|---|
marketId | number | Parent market id |
id | number | Trade id |
amount | number | Trade amount in quote currency |
price | number | Trade price |
buyerMaker | boolean | Trade BuyerMaker |
externalId | string | Exchange trade id |
time | string | Trade time in format: YYYY-MM-DDTHH:mm:ss.sssZ (ISO 8601) |
Errors
Cryptick uses the following error codes:
All responses except those with status code 503
should have content-type
: application/json
.
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Review the authentication docs. |
429 | Too Many Requests -- Review the rate limit docs. |
500 | Internal Server Error -- If the behavior is consistent, please reach out. |
503 | Service Unavailable -- Servers may be restarting. If the behavior continues, please reach out. |
Enums
Candle Set Type
Key | Value |
---|---|
1 | Time |
2 | Tick |
3 | Base Volume |
4 | Quote Volume |
Candle Set Time Type
Key | Value |
---|---|
0 | None |
1 | Second |
2 | Minute |
3 | Hour |
4 | Day |
5 | Week |
6 | Month |
Market Type
Key | Value |
---|---|
0 | Linear Perpetual |
1 | Inverse Perpetual |
2 | Quanto Perpetual |
3 | Spot |
Notes
Base / Quote Currency Definition
Base Currency is the first currency that appears in a crypto market pair.
Quote Currency is the second currency that appears in a crypto market pair.
Example: For the market BTC / USD, the base currency is BTC (Bitcoin) and the quote currency is USD (U.S. Dollar).
Buyer Maker Definition
These examples define limit orders as orders that do NOT execute immediately and are placed on the order book.
These examples define market orders as orders that execute immediately and are NOT placed on the order book.
Example: When a market SELL order is executed and matched against a passive limit BUY order, Cryptick records this trade as buyerMaker: true
.
Example: When a market BUY order is executed and matched against a passive limit SELL order, Cryptick records this trade as buyerMaker: false
.