# Deriv API: WebSocket and REST, with published per call budgets

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/brokers/deriv, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Websocket first trading API with published per call budgets.

- Kind: Broker API
- Newest reading: 2026-10-12
- Official documentation: [developers.deriv.com](https://developers.deriv.com/docs/limits)
- Everything recorded for Deriv, as one JSON file: https://openbrokerapi.com/data/brokers/deriv.json
- Quickstart, key to first call: https://openbrokerapi.com/brokers/deriv/quickstart

## Deriv API rate limits and allowances

One record per limit. The scope is part of the limit: a figure without its scope is not a figure you can pace against.

- Headline limit: 80/min per logged in user (REST)
  - Scope: user, REST
  - Sources conflict: [developers.deriv.com](https://developers.deriv.com/llms/api-overview.md) states 60 REST requests per minute per token, checked 2026-10-12. Deriv's API overview in the text form it publishes for AI tools gives REST 60 requests a minute per token, where its Limits page gives 80 a minute per logged in user. The same overview also gives 100 WebSocket requests a second per connection, 100 active subscriptions per connection and 5 concurrent WebSocket connections per user, none of which the Limits page mentions. Deriv's own pages disagree; the conflict is labelled, not resolved. Pace against 60.
  - Status: conflicting. Source: [developers.deriv.com](https://developers.deriv.com/docs/limits/), checked 2026-10-12.
  - Note: From the Limits page: REST is also capped at 300 a minute and 1,000 per ten minutes per IP address. WebSocket budgets, each shared by the calls in its row, a minute and an hour: proposal, proposal_open_contract, buy and sell 360 and 14,400; balance and statement 100 and 2,000; portfolio and profit table 30 and 1,500; all other calls 220 and 14,400. ping sits outside these budgets at 10 a second per connection.

[Deriv API rate limits in full](https://openbrokerapi.com/brokers/deriv/rate-limits), with the related error codes.

## Access, authentication and streaming

- How you get a key: Two kinds of app. With an OAuth 2.0 app the user signs in and consents at Deriv, and the app exchanges the code it gets back for an access token. With a Personal Access Token app the user generates a token in Deriv and enters it into the app. An earlier wording here (register an app_id in Manage Applications, or try the test app_id 1089) is legacy: it is not on Deriv's authentication page as read on 12 Oct 2026.
  - Status: verified. Source: [Deriv API: authentication](https://developers.deriv.com/docs/intro/authentication/), checked 2026-10-12.
- Who can use it: A Deriv account. The app registration is self serve.
  - Status: unverified. No source opened.
- Demo: Yes: the overview says each user gets a default demo account at signup, and there is a separate demo WebSocket endpoint.
  - Status: verified. Source: [Deriv API: API overview](https://developers.deriv.com/docs/intro/api-overview/), checked 2026-10-12.
- Authentication: Two routes: an OAuth 2.0 app, or a Personal Access Token the user generates and pastes into the app. Either way the token is sent as a bearer token. With a Personal Access Token, REST requests also need a Deriv-App-ID header.
  - Status: verified. Source: [Deriv API: authentication](https://developers.deriv.com/docs/intro/authentication/), checked 2026-10-12.
- Streaming: WebSocket carries trading and market data, on a public endpoint and on demo and real endpoints opened with a one time password fetched over REST. Each connection can send 10 pings a second, outside the call budgets.
  - Status: verified. Source: [Deriv API: API overview](https://developers.deriv.com/docs/intro/api-overview/), checked 2026-10-12.
  - Status: verified. Source: [Deriv API: limits](https://developers.deriv.com/docs/limits), checked 2026-10-12.
- History depth: Not recorded yet: the limits page was the page opened in this rotation.
  - Status: unverified. No source opened.
- Rate limits, as worded: Websocket, per minute and per hour: proposal, buy and sell 360 and 14,400; balance and statement 100 and 2,000; portfolio and profit_table 30 and 1,500; everything else 220 and 14,400. REST: 300 a minute and 1,000 per 10 minutes per IP, and 80 a minute per logged in user, which is the binding constraint for most retail scripts. Deriv's API overview in the text form it publishes for AI tools gives different figures: REST 60 a minute per token, and on the WebSocket 100 requests a second and 100 active subscriptions per connection, with 5 concurrent connections per user. Deriv's own pages disagree.
  - Sources conflict: Deriv Limits page: REST 80 a minute per logged in user, 300 a minute and 1,000 per 10 minutes per IP, WebSocket budgets per group of calls. Deriv API overview (llms/api-overview.md): REST 60 a minute per token, WebSocket 100 requests a second and 100 subscriptions per connection, 5 connections per user.
  - Status: conflicting. Source: [Deriv API: limits](https://developers.deriv.com/docs/limits), checked 2026-10-12.
  - Status: conflicting. Source: [Deriv API overview, text form for AI tools](https://developers.deriv.com/llms/api-overview.md), checked 2026-10-12.

## Deriv API endpoints

5 documented endpoints. [Grouped by what they do](https://openbrokerapi.com/brokers/deriv/endpoints).

- [GET /trading/v1/options/accounts](https://openbrokerapi.com/brokers/deriv/endpoints/accounts): Lists your Options trading accounts, each with its ID, balance, currency, status and whether it is demo or real.
- [POST /trading/v1/options/accounts](https://openbrokerapi.com/brokers/deriv/endpoints/post-accounts): Creates an Options trading account, demo or real. If an identical account already exists Deriv returns it with a 200 in place of a 201.
- [POST /trading/v1/options/accounts/{account_id}/reset-demo-balance](https://openbrokerapi.com/brokers/deriv/endpoints/post-account-reset-demo-balance): Resets the balance of an Options trading demo account. Demo only: it moves no real money.
- [POST /trading/v1/options/accounts/{accountId}/otp](https://openbrokerapi.com/brokers/deriv/endpoints/post-account-otp): Exchanges your bearer token for a one time WebSocket URL for one trading account. You then connect to that URL to trade: this is the step between logging in and the WebSocket.
- [GET /v1/health](https://openbrokerapi.com/brokers/deriv/endpoints/health): A health check on the REST gateway. Deriv says it needs no authentication, no parameters and no body.

## Deriv messages

19 documented messages. They are not HTTP endpoints: none has a method or a path. [Grouped by what they do](https://openbrokerapi.com/brokers/deriv/messages).

- [active_symbols](https://openbrokerapi.com/brokers/deriv/messages/active-symbols) (Deriv WebSocket API): Lists the symbols that can be traded now, with the market each belongs to and whether it is open. The symbol codes it returns are what ticks, ticks_history and proposal expect.
- [balance](https://openbrokerapi.com/brokers/deriv/messages/balance) (Deriv WebSocket API): Returns the balance of the account the connection belongs to. With subscribe set to 1 a new message follows each time the balance changes.
- [buy](https://openbrokerapi.com/brokers/deriv/messages/buy) (Deriv WebSocket API): Buys a contract: either the one a proposal priced, by the id that proposal returned, or one described in full in parameters. price is the most you accept to pay.
- [cancel](https://openbrokerapi.com/brokers/deriv/messages/cancel) (Deriv WebSocket API): Cancels an open contract by its contract id. The answer is a receipt in the same shape as the one sell returns.
- [contract_update](https://openbrokerapi.com/brokers/deriv/messages/contract-update) (Deriv WebSocket API): Changes the stop loss or the take profit of an open contract, or removes one by sending null for it.
- [contracts_for](https://openbrokerapi.com/brokers/deriv/messages/contracts-for) (Deriv WebSocket API): Lists the contracts that can be bought on one symbol now, with the barrier, stake and duration limits of each. On a logged in connection only the contracts that account may trade are returned.
- [forget](https://openbrokerapi.com/brokers/deriv/messages/forget) (Deriv WebSocket API): Stops one stream at once, by the id the stream's own messages carry in subscription.id. This is how a subscription is ended.
- [forget_all](https://openbrokerapi.com/brokers/deriv/messages/forget-all) (Deriv WebSocket API): Stops every stream of one type on the connection, or of several types at once, and returns the ids of the streams it stopped.
- [ping](https://openbrokerapi.com/brokers/deriv/messages/ping) (Deriv WebSocket API): Asks the server to answer pong. It tests that the connection is alive and is the usual way to keep an idle one open.
- [portfolio](https://openbrokerapi.com/brokers/deriv/messages/portfolio) (Deriv WebSocket API): Lists the contracts the account holds open now. It is a single answer, not a stream.
- [profit_table](https://openbrokerapi.com/brokers/deriv/messages/profit-table) (Deriv WebSocket API): Returns the account's closed contracts with what each was bought and sold for, filtered by date and contract type and paged with limit and offset.
- [proposal](https://openbrokerapi.com/brokers/deriv/messages/proposal) (Deriv WebSocket API): Asks what one contract would cost now: the price, the payout and a description of it, with an id that buy accepts. With subscribe set to 1 the price is sent again as it changes.
- [proposal_open_contract](https://openbrokerapi.com/brokers/deriv/messages/proposal-open-contract) (Deriv WebSocket API): Returns the current price and state of a contract the account holds. With subscribe set to 1 an update follows each time it changes, and with no contract_id the stream covers every open contract.
- [sell](https://openbrokerapi.com/brokers/deriv/messages/sell) (Deriv WebSocket API): Sells an open contract back before it ends, by its contract id. price is the least you accept, and 0 means sell at the market.
- [statement](https://openbrokerapi.com/brokers/deriv/messages/statement) (Deriv WebSocket API): Returns the account's transactions: buys, sells, deposits and withdrawals, filtered by date and type and paged with limit and offset.
- [ticks](https://openbrokerapi.com/brokers/deriv/messages/ticks) (Deriv WebSocket API): Asks for the latest price of one symbol or several. With subscribe set to 1 a new tick message follows each time the price changes, until the stream is stopped with forget.
- [ticks_history](https://openbrokerapi.com/brokers/deriv/messages/ticks-history) (Deriv WebSocket API): Returns past prices of one symbol, as single ticks or as candles of a chosen width. With subscribe set to 1 it then keeps sending each new tick or the candle now forming.
- [time](https://openbrokerapi.com/brokers/deriv/messages/time) (Deriv WebSocket API): Returns the server's clock, as Unix time in seconds. Useful for checking your own clock before working with epochs.
- [transaction](https://openbrokerapi.com/brokers/deriv/messages/transaction) (Deriv WebSocket API): Opens a stream of the account's transactions: a message arrives for each buy, sell, deposit and withdrawal. subscribe must be 1, and without it no records are returned.

## Deriv API error codes

10 decoded error codes. [All Deriv errors](https://openbrokerapi.com/errors/deriv).

- [ContractNotFound](https://openbrokerapi.com/errors/deriv/contract-not-found): The contract does not exist.
- [Deriv-App-ID header is required for PAT tokens](https://openbrokerapi.com/errors/deriv/app-id-header-required): A REST request authenticated with a personal access token was sent without the Deriv-App-ID header.
- [InputValidationFailed](https://openbrokerapi.com/errors/deriv/input-validation-failed): The request parameters are not valid.
- [InsufficientBalance](https://openbrokerapi.com/errors/deriv/insufficient-balance): There are not enough funds for the request.
- [InternalError](https://openbrokerapi.com/errors/deriv/internal-error): A server error on Deriv's side.
- [InvalidToken](https://openbrokerapi.com/errors/deriv/invalid-token): The token is not valid or has expired.
- [NotFound](https://openbrokerapi.com/errors/deriv/not-found): The resource was not found.
- [RateLimit](https://openbrokerapi.com/errors/deriv/rate-limit): Too many requests were sent.
- [Unauthorized](https://openbrokerapi.com/errors/deriv/unauthorized): Authentication failed.
- [ValidationError](https://openbrokerapi.com/errors/deriv/validation-error): A field failed validation.

## Deriv API SDKs and wrappers

- deriv-api (JavaScript, Official): Deriv's maintained JavaScript websocket client, pushed 20 Aug 2026.
  - Status: verified. Source: [github.com](https://github.com/deriv-com/deriv-api), checked 2026-09-23.
- python-deriv-api (Python, Official): Archived, last push 3 Dec 2024. Python users are left with the raw websocket.
  - Status: verified. Source: [github.com](https://github.com/deriv-com/python-deriv-api), checked 2026-09-23.

## Deriv API: questions and answers

### Does Deriv have an API?

Yes. This register records Deriv as having its own API (WebSocket and REST), with availability marked as active. Websocket first trading API with published per call budgets.

- Status: verified. Source: [Deriv API: limits](https://developers.deriv.com/docs/limits), checked 2026-10-12.
- Status: verified. Source: [Deriv API: authentication](https://developers.deriv.com/docs/intro/authentication/), checked 2026-10-12.

### Deriv API key: how do I get one?

Two kinds of app. With an OAuth 2.0 app the user signs in and consents at Deriv, and the app exchanges the code it gets back for an access token. With a Personal Access Token app the user generates a token in Deriv and enters it into the app.

- Status: verified. Source: [Deriv API: authentication](https://developers.deriv.com/docs/intro/authentication/), checked 2026-10-12.

### Who can use the Deriv API?

Unverified. A Deriv account. The app registration is self serve.

- Status: unverified. No source opened.

### Deriv API demo: is there a demo or sandbox?

Yes: the overview says each user gets a default demo account at signup, and there is a separate demo WebSocket endpoint.

- Status: verified. Source: [Deriv API: API overview](https://developers.deriv.com/docs/intro/api-overview/), checked 2026-10-12.

### What are the Deriv API rate limits?

Headline limit: 80/min per logged in user (REST). Scope: user, REST. Sources conflict: developers.deriv.com states 60 REST requests per minute per token. As the record words it: Sources conflict. Websocket, per minute and per hour: proposal, buy and sell 360 and 14,400; balance and statement 100 and 2,000; portfolio and profit_table 30 and 1,500; everything else 220 and 14,400. The other reading: Deriv Limits page: REST 80 a minute per logged in user, 300 a minute and 1,000 per 10 minutes per IP, WebSocket budgets per group of calls.

- Status: conflicting. Source: [developers.deriv.com](https://developers.deriv.com/docs/limits/), checked 2026-10-12.
- Status: conflicting. Source: [Deriv API: limits](https://developers.deriv.com/docs/limits), checked 2026-10-12.
- Status: conflicting. Source: [Deriv API overview, text form for AI tools](https://developers.deriv.com/llms/api-overview.md), checked 2026-10-12.

### How does Deriv API authentication work?

Two routes: an OAuth 2.0 app, or a Personal Access Token the user generates and pastes into the app. Either way the token is sent as a bearer token. With a Personal Access Token, REST requests also need a Deriv-App-ID header.

- Status: verified. Source: [Deriv API: authentication](https://developers.deriv.com/docs/intro/authentication/), checked 2026-10-12.

### Does the Deriv API support streaming?

WebSocket carries trading and market data, on a public endpoint and on demo and real endpoints opened with a one time password fetched over REST. Each connection can send 10 pings a second, outside the call budgets.

- Status: verified. Source: [Deriv API: API overview](https://developers.deriv.com/docs/intro/api-overview/), checked 2026-10-12.
- Status: verified. Source: [Deriv API: limits](https://developers.deriv.com/docs/limits), checked 2026-10-12.

### How much history does the Deriv API return?

Unverified. Not recorded yet: the limits page was the page opened in this rotation.

- Status: unverified. No source opened.

### Is there a Python library for the Deriv API?

This register lists one Python library for the Deriv API. python-deriv-api (official, Python): Archived, last push 3 Dec 2024. Python users are left with the raw websocket.

- Status: verified. Source: [python-deriv-api](https://github.com/deriv-com/python-deriv-api), checked 2026-09-23.

[Deriv API questions, each answered in a sentence or two](https://openbrokerapi.com/answers/deriv).

## Partner programme

Published figure, as the page words it: Earn 40% of Deriv's revenue from your clients' trading activity. [The Deriv partner programme record](https://openbrokerapi.com/partners/deriv). This site carries no affiliate links.

## Licence and how to cite

The limit records on this page come from the limits register, which is CC BY 4.0 (https://openbrokerapi.com/data/limits.json). Everything else on it comes from records that are all rights reserved. This file is the page itself, at its own address, in another format, and it is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data.

Cite as: Deriv API: WebSocket and REST, with published per call budgets. Broker API Hub, https://openbrokerapi.com/brokers/deriv, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
