HTTP API introduction

Our API can be accessed over HTTP at https://www.deribit.com/api/v1 for the production API, or https://test.deribit.com/api/v1 for the test API. The HTTP GET method is used for information requests, and POST is used for commands.

For GET requests, any arguments are sent in the URL, in the common (RFC 3986) urlencoded format. For POST requests, arguments are sent in the request body, in application/www-form-urlencoded format. All responses are in JSON format.

API responses

The RPC API always responds with a JSON object with at least the following fields.

name type description
success boolean A boolean indicating the request was successful. If succes is false, consult the error and message field to see what went wrong
error int Only present when there is an error to report. If so, the message field will contain more information. Check Error codes to determine what the error is.
testnet boolean Indicates whether the API in use is actually the test API. false for production server, true for test server
message string Additional information about the request. Typically used to provide error details
usIn integer The time in microseconds (since Jan 1^st 2017) that the requests was received
usOut integer The time in microseconds (since Jan 1^st 2017) that the response was sent
usDiff integer The number microseconds that was spent handling the request
result * If successful, the response for the API call

Rate Limits

Current rate limit is 200 (order) requests per second with bursts to 300. If you need higher rate limits please contact support.

Authentication

Calls to endpoints starting with /api/v1/private, require a signature in the x-deribit-sig header. The details of how to compute this signature can be found on the RPC authentication page.

Available endpoints

Method Path Description
GET /api/v1/public/time Check server time
GET /api/v1/public/test Check connectivity
GET /api/v1/public/ping Check network delay
GET /api/v1/public/getinstruments Retrieve available instruments
GET /api/v1/public/getcurrencies Retrieve available cryptocurrencies
GET /api/v1/public/index Retrieve the value of the Deribit Index
GET /api/v1/public/getorderbook Retrieve the order book
GET /api/v1/public/getlasttrades Retrieve the latest trades
GET /api/v1/public/getsummary Retrieves the summary information such as Open Interest, 24H Volume, etc.
GET /api/v1/public/stats Retrieve aggregated 24h trade volumes for different instrument types
GET /api/v1/public/getannouncements Retrieve announcements
GET /api/v1/public/getlastsettlements Retrieve settlements, deliveries and bankruptcies
GET /api/v1/private/account Retrieve account information, including balances
POST /api/v1/private/buy Place a buy order
POST /api/v1/private/sell Place a sell order
POST /api/v1/private/edit Edit an existing order
POST /api/v1/private/cancel Cancel an order
POST /api/v1/private/cancelall Bulk cancel orders
GET /api/v1/private/getopenorders Retrieve list of orders
GET /api/v1/private/positions Retrieve current positions
GET /api/v1/private/orderhistory Retrieve historic orders for account
GET /api/v1/private/orderstate Retrieve details of one order
GET /api/v1/private/tradehistory Retrieve historic trades for account
GET /api/v1/private/newannouncements Retrieve unread announcements
GET /api/v1/private/getemaillang Check email language
GET /api/v1/private/setemaillang Change email language
GET /api/v1/private/setannouncementasread Mark announcements as read
GET /api/v1/private/settlementhistory Retrieve settlements affecting account

results matching ""

    No results matching ""