Broker guide · checked 29 November 2026
MT5 API for Deriv
Deriv runs MT5 accounts on several servers and a set of synthetic indices that trade around the clock. That makes it a good first broker for an API test: no market hours, and a demo account is free. The two things that trip people up are the server name and the contract size.
Server names
Use the exact name MetaTrader shows. A wrong server is the most common connection failure.
| Deriv-Demo | Demo accounts. The safest first connection. |
| DerivSVG-Server | SVG accounts. |
| Other Deriv servers | Use the exact name shown in MetaTrader. A wrong server returns an invalid-account error. |
Symbols and contract sizes
The same name does not always mean the same size. Check the contract before you set a lot.
| XAUUSD | 100 oz per lot. A 0.10 lot is 10 oz, not 0.1 oz. |
| XAUUSDmicro | 1 oz per lot, minimum 0.1. A 0.10 lot is 0.1 oz. |
| XAGUSD | 5,000 oz per lot. |
| XAGUSDmicro | 50 oz per lot, minimum 0.1. |
| Volatility 75 Index | Synthetic index. Trades 24/7, so it is the right test on a weekend. |
Connect it
One call adds the account. Wait for ready before sending an order.
curl -X POST https://api.socketrade.com/v2/accounts \
-H "X-API-Key: $SOCKETRADE_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountNumber": "41299492",
"accountPassword": "your-demo-password",
"accountServerHost": "Deriv-Demo",
"name": "Deriv demo"
}'What to watch
- Forex is closed from Friday night to Sunday. Test with a synthetic index instead of EURUSD at the weekend.
- A symbol just added to Market Watch can take a moment to send its first tick. Do not read an empty quote as “no market”.
- XAUUSD and XAUUSDmicro are not the same contract. Check the size before you size a lot.
- Deriv's feed can send one side of a quote at a time. Keep the last known other side rather than treating a zero as a missing price.