OpenAPI files for broker APIs
12 OpenAPI 3.1 files, one for each broker API and platform API this site holds endpoint records for. A tool can read one to list the operations, their parameters and where each was read.
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.
None of these is a broker's own specification. Each is this site's description, generated when the site is built from its endpoint records, which were read from the broker's public documentation. An operation that a file does not list is not recorded here, which is not evidence that it does not exist. Where a file and the broker's documentation differ, the documentation wins.
The files
| API | Operations | Conflicting or unverified | With a response schema | Newest check | File |
|---|---|---|---|---|---|
| Capital.com API | 36 | 0 | 22 | Checked | JSON |
| Deriv API | 5 | 0 | 0 | Checked | JSON |
| eToro API | 51 | 0 | 19 | Checked | JSON |
| IG API | 49 | 7 | 18 | Checked | JSON |
| Interactive Brokers API | 23 | 0 | 23 | Checked | JSON |
| OANDA API | 33 | 1 | 16 | Checked | JSON |
| Saxo OpenAPI | 68 | 0 | 19 | Checked | JSON |
| Trading 212 API | 16 | 0 | 0 | Checked | JSON |
| DXtrade APIs | 21 | 0 | 0 | Checked | JSON |
| Match-Trader Platform API | 17 | 0 | 0 | Checked | JSON |
| MetaApi | 17 | 0 | 0 | Checked | JSON |
| TradeLocker API | 23 | 0 | 0 | Checked | JSON |
What is in a file
- Paths and methods
- One operation per endpoint record, with the record's summary and its note. The operation id is the name of the endpoint's page, given in x-page.
- Parameters
- Each with where it goes (path, query, header or request body), its type and whether the record marks it required. Where a record says its required marks were not confirmed on the broker's own page, the operation carries x-required-unconfirmed.
- Servers
- The base addresses held on the broker or platform record, where the record holds a plain address. The demo address is listed first. A platform API is hosted for each broker that offers it, so its file lists a server only where the platform's own documentation gives one address for everyone. The record's own wording of every base address is in x-base-addresses.
- Security schemes
- Only the authentication headers the endpoint records list, each as a header. A file says nothing about how a credential is obtained: that is on the broker's page here.
- Source and date
- Every operation carries x-source, the page it was read on, and x-checked, the date that page was last checked. An operation whose record is conflicting or unverified also carries x-status.
- Responses
- The endpoint records hold no response schema. Where an earlier hand-written file on this site described a response, that block is carried into the operation with its own source and the operation is marked x-carried. Otherwise the record's mock reply, whose values are invented, is given as an example.
APIs with no OpenAPI file, because they are not HTTP
OpenAPI describes HTTP requests: a method, a path and where each parameter goes. A function of a programming language and a message sent over an open connection have none of these, so no file here describes them and none is generated for them. That is a limit of the format, not a gap in the records: each call has a page of its own with its signature or its fields.
- Bitget: 10 messages. No OpenAPI file.
- Capital.com: 7 messages. Its HTTP endpoints are in the file listed above, and these are not.
- Deriv: 19 messages. Its HTTP endpoints are in the file listed above, and these are not.
- eToro: 6 messages. Its HTTP endpoints are in the file listed above, and these are not.
- IG: 5 messages. Its HTTP endpoints are in the file listed above, and these are not.
- Saxo OpenAPI: 5 messages. Its HTTP endpoints are in the file listed above, and these are not.
- cTrader Open API: 49 messages. No OpenAPI file.
- DXtrade APIs: 8 messages. Its HTTP endpoints are in the file listed above, and these are not.
- MetaTrader 4 (MQL4): 28 functions. No OpenAPI file.
- MetaTrader 5 (Python package and MQL5): 78 functions. No OpenAPI file.
An OpenAPI file for practice
This site's practice API has a file of its own at /mock/v1/openapi.json, so you can load it into an API tool and send a first request with nothing to sign in to. It is not in the table above because it describes no broker: its 19 addresses are fixed files of invented data that answer GET only.
Licence
The endpoint records are all rights reserved, and so are these files. They are given for reference and are not among the CC BY 4.0 downloads. Each file states this in its info block, with how to cite it.
Where to go next
How to cite this
OpenAPI files for broker APIs. Broker API Hub, https://openbrokerapi.com/specs, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.