Automated tradingUpdated 2 min readBy the FXNOD team
What is a trading API?
A trading API is an interface a broker provides so that software, instead of a person clicking, can read prices and account data and place orders. Every trading bot uses one. You authorise an application to use the API on your account, with a token or an approval page, and you can withdraw that authorisation.

What it carries
| Kind of request | Example |
|---|---|
| Market data | Send me every tick of this market |
| Account data | What is my balance, and what is open? |
| Pricing | What would this contract pay? |
| Orders | Buy this, sell that |
| History | List my trades for last month |
Two styles you will meet
| REST | WebSocket | |
|---|---|---|
| How it works | Ask, receive one answer | Open a connection and receive a stream |
| Good for | Placing an order, fetching history | Live prices and updates |
| If the link drops | The next request simply fails | The stream stops and must be reopened |
Authorisation
- An API token or key: you create it, choose its permissions and give it to the application.
- OAuth: you sign in on the broker's own page and approve the application there.
- Either way, grant trading permissions only, and never anything that moves money out.
Limits and costs
- Brokers usually offer the API free to account holders.
- They limit how many requests an application may send. A bot that exceeds the limit is refused for a time.
- Some data, such as deep history or premium feeds, may be charged.
- The trading itself costs what it always costs.
Do you need to use one directly?
Only if you write your own software. Most traders use an application that talks to the API for them. Building directly gives full control and full responsibility: reconnection, error handling, rate limits and the safety of your credentials become your job.
Safety
- Keep keys out of chats, screenshots and shared code.
- One key per application, deleted when no longer used.
- Test against a demo account before a real one.
- Build limits into the software, not only into your intentions.
FXNOD and Deriv's API
FXNOD is an application built on Deriv's API. You authorise it by signing in on Deriv's own page, so there is no key for you to create or keep, and FXNOD handles the connection, the reconnection and the limits. You can withdraw the authorisation from Connected Accounts or from your Deriv settings.
Questions people ask
- Is a trading API free?
- Usually, for the broker's own clients. Premium data can cost extra.
- What is the difference between a broker API and a trading API?
- In practice they are the same thing: the broker's interface for software to trade and read data.
- Is it safe to use a trading API?
- The API is as safe as the permissions you grant and how you protect the credentials.
Run a bot that keeps its limits
FXNOD's bots run on its servers and will not start without a stop loss, so your limits hold when your device is off. Build one in Bot Forge or start a ready-made one in Auto Hub, on your Deriv demo account first.
Get started