NAV
shell

Introduction

Welcome to the Cignals.io API. You can use our API to access various Cignals endpoints, which can be helpful for developing automated, quantitative trading strategies. Because Cignals primarily focuses on volumetric and orderflow based trading tools, derived from market auction theory, our API reflects a similar approach.

You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. Language bindings for JavaScript, Ruby, Elixir, and Python are currently in the works - stay tuned!

This API was designed with the market maker, proprietary trader, and programmer in mind. If you have any suggestions or feedback, please drop us a note.

Authentication

To authorize, use this code:

# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "Authorization: [API-KEY]"

Make sure to replace [API-KEY] with your API key.

Cignals uses API keys to allow access to the API. You can register for a new API key by signing up for an account.

Cignals expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: [API-KEY]

Instruments

Get All Instruments

curl "https://api.cignals.io/v1/instruments" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "exchange": "binance_futures",
    "base_currency": "btc",
    "quote_currency": "usdt"
  },
  {
    "exchange": "coinbase_pro",
    "base_currency": "eth",
    "quote_currency": "usdt"
  }
]

This endpoint retrieves all instruments tracked by Cignals.

HTTP Request

GET https://api.cignals.io/v1/instruments

Footprints

Get Footprints cells for a range

curl "https://api.cignals.io/v1/footprints?instrument_id=272&start_range=1605027600000&end_range=1605031200000&price_step=10&time_step=1h" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "price": "15230.0",
    "side": "buy",
    "size": "0.301",
    "timestamp": 1605027600000
  },
  {
    "price": "15240.0",
    "side": "buy",
    "size": "160.935",
    "timestamp": 1605027600000
  }
]

This endpoint retrieves footprint cells in a range, grouped by the time_step and price_step parameters.

HTTP Request

GET https://api.cignals.io/v1/footprints

Query Parameters

Parameter Default Description
instrument_id A reference to an instrument id from /instruments.
start_range The start of the range in unix epoch milliseconds to return (inclusive).
end_range The end of the range in unix epoch milliseconds to return (exclusive).
price_step The price grouping to use.
time_step The time grouping to use (1m, 5m, 15m, 30m, 60m, 1h, 4h, 8h, 12h, 1D, 3D, 1W, 1M).

OHLC(V)

Get OHLC(V) data for a range

curl "https://api.cignals.io/v1/ohlc?instrument_id=272&start_range=1605027600000&end_range=1605031200000&time_step=1h" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "close": "14918.5",
    "high": "14924",
    "low": "14738",
    "open": "14840.5",
    "price_volume": "80636681.511469480",
    "timestamp": 1.6047936e12,
    "volume": "5436.73922703",
    "vwap": "14831.809683011034"
  },
  {
    "close": "15064.5",
    "high": "15100",
    "low": "14855.5",
    "open": "14919",
    "price_volume": "77195192.784346320",
    "timestamp": 1.6047972e12,
    "volume": "5151.61071260",
    "vwap": "14984.671220505746"
  }
]

This endpoint returns OHLC, Volume, VWAP, and price-volume for a given range, grouped by the time_step parameter.

HTTP Request

GET https://api.cignals.io/v1/ohlc

Query Parameters

Parameter Default Description
instrument_id A reference to an instrument id from /instruments.
start_range The start of the range in unix epoch milliseconds to return (inclusive).
end_range The end of the range in unix epoch milliseconds to return (exclusive).
time_step The time grouping to use (1m, 5m, 15m, 30m, 60m, 1h, 4h, 8h, 12h, 1D, 3D, 1W, 1M).

Order Book

Get a current Order Book snapshot

curl "https://api.cignals.io/v1/order_book/[instrument_id]" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

{
  "buy": {
    "27509.2": [
      0.029,
      -0.221,
      -0.00955099999999999
    ],
    "27738.7": [
      0.044,
      -0.09000000000000001,
      -0.031708278518266596
    ],
    "27807.1": [
      0.105,
      -0.010000000000000009,
      0.05055
    ],
    "26408.0": [
      0.003,
      0.0,
      0.0014700000000000004
    ]
  },
  "sell": {
    "27586.7": [
      0.003,
      -0.004,
      0.0420160379
    ],
    "26694.8": [
      0.001,
      0.001,
      0.001
    ],
    "26699.1": [
      0.021,
      -0.009999999999999998,
      0.0012619290000000002
    ],
    "27695.3": [
      0.003,
      -0.001,
      -0.0011223334930299995
    ]
  }
}

This endpoint returns a current order book snapshot.

HTTP Request

GET https://api.cignals.io/v1/order_book/:instrument_id

Path Parameters

Parameter Default Description
instrument_id A reference to an instrument id from /instruments.

Open Interest

Get the aggregate open interest data for a range

curl "https://api.cignals.io/v1/open_interest?instrument_id=272&start_range=1605027600000&end_range=1605031200000&time_step=1h" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "long_ratio": "0.6490",
    "long_short_ratio": "1.8490",
    "open_interest": "74146.64700000",
    "open_interest_value": "2940448409.40840000",
    "short_ratio": "0.3510",
    "timestamp": 1.6473024e12
  },
  {
    "long_ratio": "0.6440",
    "long_short_ratio": "1.8090",
    "open_interest": "74368.36100000",
    "open_interest_value": "2942317271.44010000",
    "short_ratio": "0.3560",
    "timestamp": 1.647306e12
  }
]

This endpoint returns the aggregate open interest for a given range, grouped by the time_step parameter.

HTTP Request

GET https://api.cignals.io/v1/open_interest

Query Parameters

Parameter Default Description
instrument_id A reference to an instrument id from /instruments.
start_range The start of the range in unix epoch milliseconds to return (inclusive).
end_range The end of the range in unix epoch milliseconds to return (exclusive).
time_step The time grouping to use (1m, 5m, 15m, 30m, 60m, 1h, 4h, 8h, 12h, 1D, 3D, 1W, 1M).

Funding Rates

Get the funding rate data for a range

curl "https://api.cignals.io/v1/funding_rates?instrument_id=272&start_range=1605027600000&end_range=1605031200000&time_step=1h" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "funding_rate": "0.00005726",
    "timestamp": 1.6473024e12
  },
  {
    "funding_rate": "0.00004476",
    "timestamp": 1.6473312e12
  },
  {
    "funding_rate": "0.00009061",
    "timestamp": 1.64736e12
  }
]

This endpoint returns the funding rate for a given range, grouped by the time_step parameter.

HTTP Request

GET https://api.cignals.io/v1/funding_rates

Query Parameters

Parameter Default Description
instrument_id A reference to an instrument id from /instruments.
start_range The start of the range in unix epoch milliseconds to return (inclusive).
end_range The end of the range in unix epoch milliseconds to return (exclusive).
time_step The time grouping to use (1m, 5m, 15m, 30m, 60m, 1h, 4h, 8h, 12h, 1D, 3D, 1W, 1M).

Errors

The Cignals API may return one of the following error codes in the event of a problem with the request:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden -- The requested resource is hidden for administrators only.
404 Not Found -- The specified resource could not be found.
405 Method Not Allowed -- You tried to access a resource with an invalid method.
406 Not Acceptable -- You requested a format that isn't json.
410 Gone -- The resource requested has been removed from our servers.
429 Too Many Requests -- You're making too many requests in the given period.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.