Broker API HubMenu

Deriv API POST /trading/v1/options/accounts/{account_id}/reset-demo-balance

POST/trading/v1/options/accounts/{account_id}/reset-demo-balanceversion v1Accounts

Resets the balance of an Options trading demo account. Demo only: it moves no real money.

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.

Independent and unofficialdevelopers.deriv.comchecked

Read on Deriv's own documentation page on 12 Oct 2026: method, path, headers, parameters and response fields. Deriv lists the scope needed as trade. The page documents no request body and its response section is empty, so no mock is shown. Deriv's limits page (developers.deriv.com/docs/limits/), read the same day, gives the REST limits as 80 requests a minute for a logged-in user, and 300 requests a minute and 1,000 requests in 10 minutes for an IP address. This note first gave 60 requests per minute per token from Deriv's API overview: on a second reading on 12 Oct 2026 the overview shows no such figure, so it is withdrawn.

Parameters

NameInTypeDescription
Deriv-App-IDheaderstringYour application identifier. Deriv says it is required when you authenticate with a personal access token and not when you use an OAuth bearer token.
Content-TyperequiredheaderstringSend application/json.
account_idrequiredpathstringID of the demo account.

Authentication headers

NameTypeDescription
AuthorizationrequiredstringSend Bearer followed by an OAuth 2.0 access token or a personal access token. Placeholder only: never paste a real token into this site.

Request

Written from the method, path and parameters recorded on this page. No demo host is recorded as a plain address for this API, so the samples read the base address from an environment variable. Not executed against a live or demo account. Credentials are read from environment variables on your own machine and are never entered on this site. The request builder writes these same snippets, from the same record.

Python
# Set DERIV_BASE_URL, DERIV_TOKEN as environment variables first. Never paste real values into code.
# No demo host is recorded as a plain address for this API, so the base address is read from DERIV_BASE_URL.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: headers Deriv-App-ID.
import os
import requests

BASE_URL = os.environ["DERIV_BASE_URL"]
headers = {
    "Authorization": "Bearer " + os.environ["DERIV_TOKEN"],
    "Content-Type": "application/json",
}
resp = requests.post(BASE_URL + "/trading/v1/options/accounts/{account_id}/reset-demo-balance", headers=headers, timeout=10)
resp.raise_for_status()
print(resp.json())
JavaScript
// Set DERIV_BASE_URL, DERIV_TOKEN as environment variables first. Never paste real values into code.
// No demo host is recorded as a plain address for this API, so the base address is read from DERIV_BASE_URL.
// Replace each {placeholder}, "..." and 0 with a real value before running.
// Optional and not shown: headers Deriv-App-ID.
// Run as a module, for example a .mjs file, on a Node version that has fetch built in.
const BASE_URL = process.env.DERIV_BASE_URL;
const res = await fetch(BASE_URL + "/trading/v1/options/accounts/{account_id}/reset-demo-balance", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.DERIV_TOKEN,
    "Content-Type": "application/json",
  },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
console.log(await res.json());
curl
# Set DERIV_BASE_URL, DERIV_TOKEN as environment variables first. Never paste real values into code.
# No demo host is recorded as a plain address for this API, so the base address is read from DERIV_BASE_URL.
# Replace each {placeholder}, "..." and 0 with a real value before running.
# Optional and not shown: headers Deriv-App-ID.
curl -X POST "$DERIV_BASE_URL/trading/v1/options/accounts/{account_id}/reset-demo-balance" \
  -H "Authorization: Bearer $DERIV_TOKEN" \
  -H "Content-Type: application/json"

Response

No mock response is recorded for this endpoint. Where the record says why, or names the fields of the reply, it does so in the note at the top of this page. That is a statement about this record, not about what the API returns: read the shape of the reply in the official reference.

Limits that apply at Deriv

LimitValueScopeSource
Headline limit80/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, RESTdevelopers.deriv.comchecked

Deriv API errors you may meet

All Deriv API error codes, including 4 more not listed here.