Skip to main content

Deribit JSON-RPC Trade Connector

Features​

crypto-deribitConnector Key
Instruments
FXFUTUREOPTION
Request Types
SUBMITCANCELREPLACE
Order Types
MARKETLIMIT
Time In Force
GTCIOCFOKDAY
Order ID Mapper
COMPOSITE
✗
Order Status Request
✓
Cancel On Disconnect
✓
Commission
✓
Post Only
✗
Fast Cancel
✗
Fast Replace

Notes​

tip

Please consider switching to Deribit Starbase Trade Connector.
Starbase is Deribit’s high-performance matching engine and API for clients who are market making or deploying high-frequency strategies.

Quantity and Price Precision​

warning

Deribit implicitly rounds amount and price if they do not meet instrument increments.

Cancel on Disconnect​

CoD can be enabled in account settings.

Rate Limits​

To maintain fair and stable access to our API, Deribit uses a credit-based rate limiting system.

Order Quantity​

For perpetual and futures the order size is in USD units, for options it is amount of corresponding cryptocurrency contracts, e.g. BTC or ETH.

Market Orders​

Deribit allows only GOOD_TILL_CANCEL Time In Force for MARKET orders.

Iceberg Orders​

Deribit supports setting display quantity both for order submissions and replaces.

Error codes​

https://docs.deribit.com/articles/errors

"invalid_credentials"​

Possible cause:

  • Wrong local time. If WS auth works but HTTP auth fails with "invalid_credentials" then it's possible that local machine has incorrect time (diff from Deribit is greater than 1 minute).
  • Temporary ban. May be caused by rate limit violation OR by just many recent requests that finished with error (any error).

Symbology​

Instrument list available via the following request: https://deribit.com/api/v2/public/get_instruments?currency=BTC

where currency is BTC, ETH, or USDT

Configuration​

Connector settings​

ParameterDefault ValueDescription
rejectPostOnlytrueIf an order is considered post-only and this field is set to true then the order is put to the order book unmodified or the request is rejected. Otherwise, if the new price would cause the order to be filled immediately (as taker), the price will be changed to be just below the spread.
optionAdvancedSwitches price units for options. Possible values: USD, IMPLV

Supported order attributes​

KeyDescription
186 value used for post only orders submission.
6001Advanced option order type. (Only for options). Possible value: usd, implv.
6044Direct attribute for order price. Should be used when price values in % (when advanced=implv).

Config sample​

connectors {
DERIBIT: ${template.connector.crypto.deribit} {
settings {
restUrl = "https://www.deribit.com"
websocketUrl = "wss://www.deribit.com"

apiKeys: [
{
apiKey = "<API_KEY>"
apiSecret = "<API_SECRET>"
}
]
}
}
}