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 Snapshots

Get Order Book snapshot data for a range

curl "https://api.cignals.io/v1/order_book_snapshots?instrument_id=114359&start_range=1633737600000&end_range=1633824000000&time_step=1D" \
  -H "Authorization: [API-KEY]"

The above command returns JSON structured like this:

[
  {
    "data": {
      "buy": {
        "54799.0": 0.0006,
        "54801.0": 0.028,
        "54807.0": 0.0006,
        "54809.0": 0.0001,
        "54830.0": 0.3,
        "54845.0": 0.0082,
        "54850.0": 0.0014,
        "54852.0": 0.0931,
        "54891.0": 0.3194,
        ...
      },
      "sell": {
        "54956.0": 0.0453,
        "54959.0": 3.8396,
        "54988.0": 0.002,
        "55004.0": 0.2429,
        "55005.0": 0.023,
        "55012.0": 0.1865,
        "55034.0": 0.0022,
        "55040.0": 0.0107,
        "55064.0": 0.0039,
        ...
      }
    },
    "time": "2021-10-09T00:00:00.000000Z"
  }
]

This endpoint returns order book snapshots for a given range, grouped by the time_step parameter.

HTTP Request

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

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.