Broker API
Deriv API: WebSocket and REST, with published per call budgets
Websocket first trading API with published per call budgets.
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.
Quickstart: key to first call5 endpoints19 messages10 error codes
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.
| Limit | Value | Scope | Source |
|---|---|---|---|
| Headline limit | 80/min per logged in user (REST)Sources conflict developers.deriv.com states 60, checked . 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. | user, REST | developers.deriv.comchecked |
Deriv API rate limits in full, with pacing advice and the related error codes.
Access, authentication and streaming
API types listed in the record: WebSocket, REST.
- 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.
Deriv API: authenticationchecked
- Who can use it
A Deriv account. The app registration is self serve.
Unverifiedno source opened
- Demo
Yes: the overview says each user gets a default demo account at signup, and there is a separate demo WebSocket endpoint.
Deriv API: API overviewchecked
- 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.
Deriv API: authenticationchecked
- 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.
Deriv API: API overviewchecked Deriv API: limitschecked
- History depth
Not recorded yet: the limits page was the page opened in this rotation.
Unverifiedno 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.
Deriv API: limitschecked Deriv API overview, text form for AI toolschecked
Deriv API endpoints
5 documented endpoints. Grouped by what they do
- GET/trading/v1/options/accountsLists your Options trading accounts, each with its ID, balance, currency, status and whether it is demo or real.
- POST/trading/v1/options/accountsCreates 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-balanceResets the balance of an Options trading demo account. Demo only: it moves no real money.
- POST/trading/v1/options/accounts/{accountId}/otpExchanges 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/healthA health check on the REST gateway. Deriv says it needs no authentication, no parameters and no body.
Deriv messages
19 documented messages and subscriptions of the Deriv WebSocket API. They are not HTTP endpoints: none has a method or a path, and each travels over a connection that stays open. Grouped by what they do, each with its summary
Deriv API error codes
10 decoded error codes. All Deriv errors
ContractNotFoundThe contract does not exist.Deriv-A REST request authenticated with a personal access token was sent without the Deriv-App-ID header.App- ID header is required for PAT tokens InputValidationFailedThe request parameters are not valid.InsufficientBalanceThere are not enough funds for the request.InternalErrorA server error on Deriv's side.InvalidTokenThe token is not valid or has expired.NotFoundThe resource was not found.RateLimitToo many requests were sent.UnauthorizedAuthentication failed.ValidationErrorA field failed validation.
Deriv API SDKs and wrappers
| Library | Language | Official | Note | Source |
|---|---|---|---|---|
| deriv-api | JavaScript | Official | Deriv's maintained JavaScript websocket client, pushed 20 Aug 2026. | github.comchecked |
| python-deriv-api | Python | Official | Archived, last push 3 Dec 2024. Python users are left with the raw websocket. | github.comchecked |
Deriv API: questions and answers
Each answer is read from the record on this page, not written separately. Where the record is unverified, the answer says so.
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.
Deriv API: limitschecked Deriv API: authenticationchecked
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.
Deriv API: authenticationchecked
Who can use the Deriv API?
Unverified. A Deriv account. The app registration is self serve.
Unverifiedno 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.
Deriv API: API overviewchecked
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.
Sources conflictdevelopers.deriv.comchecked Deriv API: limitschecked Deriv API overview, text form for AI toolschecked
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.
Deriv API: authenticationchecked
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.
Deriv API: API overviewchecked Deriv API: limitschecked
How much history does the Deriv API return?
Unverified. Not recorded yet: the limits page was the page opened in this rotation.
Unverifiedno 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.
python-deriv-apichecked
Deriv API questions, each answered in a sentence or two.
The capability tables read one feature at a time across every broker and platform record, Deriv included.
Everything this site records for Deriv, as one JSON file. Each section of the file states its own licence. About the files. This page as Markdown.
Deriv API guides and reference
What changed recently for the Deriv API
Documentation
Deriv's documentation, read on 12 Oct 2026, gives one REST base, https://api.derivws.com, and describes sign in as an OAuth 2.0 app or a Personal Access Token sent as a bearer token, with a Deriv-App-ID header on REST requests made with a Personal Access Token. This site had recorded an app_id plus an API token, sourced to the limits page, which does not describe sign in today. The 2 minute idle timeout recorded before is not on the limits, best practices or ping pages opened today and has been taken out of the streaming claim as not verified; the cap of 10 pings a second per connection is still on the limits page.
Deriv API: authenticationchecked
Documentation
Two Deriv pages give different rate limits. The Limits page gives REST 80 requests a minute per logged in user and 300 a minute and 1,000 per ten minutes per IP, with shared WebSocket budgets a minute and an hour; the API overview in the text form Deriv publishes for AI tools gives REST 60 a minute per token, 100 WebSocket requests a second and 100 subscriptions per connection, and 5 connections per user. This site's Deriv limit now shows both readings as conflicting, where it showed the Limits page alone as verified.
Every dated change, all brokers and platforms. Follow Deriv changes by RSS
Open source repositories for Deriv
Read from GitHub's own records and ordered by stars as read. A listing is not a recommendation.
- deriv-com/deriv-apiJavaScript
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. The programme register holds every record. This site carries no affiliate links.
How to cite this
Deriv API: WebSocket and REST, with published per call budgets. Broker API Hub, https://openbrokerapi.com/brokers/deriv, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.