Deriv API trading bot

What the Deriv API lets a bot do that DBot and MetaTrader cannot, how authorisation actually works, and what to check before you connect one to your account.

What the API is

Deriv exposes a websocket API that software can connect to directly. A bot holds an open connection, receives price ticks and candles as they happen, and sends orders in response — no browser tab, no MetaTrader terminal, no platform in between.

That removes every ceiling a platform imposes. A block builder can only express strategies its blocks cover; an API bot is limited by what you can write. In practice the difference shows up in risk management rather than in entry signals — layered protections, position sizing derived from live volatility, a risk engine that can veto a trade the strategy wanted.

How authorisation works, and why it matters

There are two legitimate ways for a bot to reach your account, and neither involves your password.

OAuth sign-in redirects you to Deriv, you approve the app there, and Deriv returns a token to the application. Your credentials are only ever typed into Deriv's own page. This is how Pipsky connects.

API tokens are generated by you inside your Deriv account settings, with scopes you choose — read, trade, payments, admin. A trading bot needs read and trade. It does not need payments, and a bot asking for that scope is asking for the ability to move your money.

Either way, you can revoke access yourself from your Deriv account at any time, without contacting whoever built the bot. If you cannot see how to disconnect something, that is a reason not to connect it.

What an API bot can trade

Multipliers are the contract type worth automating for most strategies, because they are the only one where the reward-to-risk ratio is set by your stop and target rather than by a published payout table.

  • Multiplier contracts — a stop loss and take profit you set, with no payout cap. The reward-to-risk ratio is yours to choose.
  • Digit contracts — Even/Odd, Matches/Differs, Over/Under. Fixed payout below 100%, which caps what any strategy can achieve.
  • Rise/Fall and other options contracts, with fixed payouts.
  • Accumulators, which grow while price stays inside a range and reset when it leaves.
  • Synthetic indices, forex, commodities, crypto and stock indices as the underlying markets.

Why server-hosted beats browser-hosted

DBot runs in a browser tab. Close the tab, lose signal, or let the laptop sleep, and the bot stops — possibly with a position open and nothing watching it.

A server-hosted API bot has none of that fragility, but it introduces a different requirement: it has to handle disconnection properly. Networks drop. A well-built bot reconnects automatically and reconciles its open positions with the broker on return rather than assuming its own memory is still accurate.

This is also the strongest argument for putting stops on the order at the broker rather than holding them in the bot's memory. A stop that only exists inside a running process is not a stop; it is an intention.

Building your own

Deriv publishes API documentation and a playground for exploring the calls. If you write code, a simple bot is genuinely achievable — connect, subscribe to ticks, evaluate a rule, send a proposal, buy the contract.

The hard part is not the connection. It is knowing whether the strategy is worth running, which means backtesting with real costs, validating on data the strategy was not tuned on, and comparing against random entries to check the timing carries any information at all. Most API bots fail on that rather than on the code.

If you would rather have it built, we do that — for Deriv, MetaTrader 4 and MetaTrader 5 — and deliver the source code and a written test report rather than a black box.

Common questions

What is the Deriv API?

A websocket interface that lets software connect directly to Deriv to receive market data and place trades, without going through a browser or a trading terminal. It is what API-based trading bots use.

Do I need to code to use a Deriv API bot?

To build one, yes. To use one somebody else built, no — you authorise it through Deriv's official sign-in or an API token and it does the rest. If you would rather not code and want your own strategy automated, that is what custom development is for.

Is the Deriv API free?

Yes. Deriv does not charge for API access. Your costs are the ordinary trading costs — spread, commission on multipliers, and overnight fees on leveraged positions.

What permissions does a trading bot need?

Read and trade. It does not need the payments scope, and a bot requesting that is asking for the ability to move money out of your account. Check the scopes when creating an API token.

How do I disconnect a bot from my Deriv account?

From your Deriv account settings — revoke the API token, or remove the authorised application. You do this yourself, without contacting whoever built the bot.

Trading carries risk and you can lose money. Nothing on this page is financial advice. Past performance does not indicate future results.