Broker API glossary: the terms a newcomer meets
32 terms in plain words, in alphabetical order. The definitions are general. What a particular broker does is on that broker's own page, with its source.
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.
- API
Also: Application programming interface
A documented way for one program to ask another to do something. A broker API lets your own code do what you would otherwise do by hand in a trading platform: read prices, read your account and place orders.
- API key
A secret string that identifies your application to an API. Treat it like a password: keep it out of your code and out of anything you share, and replace it if it leaks. No page on this site asks for one.
- Backoff
Also: Exponential backoff
Waiting before you retry a refused request, and waiting longer after each refusal in a row. It stops a program from hammering a server that has already asked it to slow down.
- Bid, ask and spread
The bid is the price at which you can sell, the ask (or offer) is the price at which you can buy, and the spread is the gap between them. A trade starts at a loss equal to the spread.
- Candle
Also: Bar, OHLC
A summary of the price over a fixed interval: the open, the high, the low and the close, sometimes with a volume. Charts and backtests are built from candles.
- CFD
Also: Contract for difference
A contract that pays the difference between the price of a market when you open the trade and when you close it. You never own the underlying asset. CFDs are leveraged, so losses can build quickly.
- Deal reference
Also: Order reference
An identifier returned when you submit an order, before the outcome is known. You use it to ask whether the order was accepted, rejected or filled.
- Demo account
Also: Paper trading account, Practice account
An account that trades with virtual money, for learning and testing. Prices are usually live or close to it, but fills on a demo account can differ from fills on a real one.
- Endpoint
One address in an API that does one job, such as listing your open positions. An endpoint is named by its method and its path, and its documentation says what to send and what comes back.
- Epic
Also: Instrument identifier
A name some APIs give to their own identifier for a tradable market. Every API has such an identifier under one name or another, and it is rarely the ticker you know, so you look it up with a search call first.
- FIX
Also: Financial Information eXchange
A long established messaging protocol for sending orders and market data between financial firms. It is fast and widely used by institutions, and harder to start with than a REST API.
- HTTP method
Also: GET, POST, PUT, PATCH, DELETE
The verb of a web request. GET reads something, POST creates or submits, PUT and PATCH change something that exists, and DELETE removes it. The same path can do different jobs under different methods.
- HTTP status code
The three digit number at the start of every reply. Codes from 200 to 299 mean the request was accepted, 400 to 499 mean something was wrong with the request, and 500 to 599 mean the server failed.
- Idempotency
The property that sending the same request twice has the same effect as sending it once. It matters most for orders: if a reply is lost, a request that is not idempotent can open the same trade twice when it is resent.
- JSON
A plain text format for structured data, made of names and values. Most broker APIs send and receive their data as JSON.
- Leverage and margin
Leverage lets a small deposit control a larger position. The deposit is the margin. Gains and losses are worked out on the whole position, so a small move in price is a large move against the deposit.
- MCP
Also: Model Context Protocol
An open protocol that lets an AI assistant call outside tools in a standard way. An MCP server for a trading API gives an assistant a set of actions it can ask to run, such as reading an account.
- OAuth
Also: OAuth 2.0
A standard way to let an application act for you without giving it your password. You approve the application on the provider's own site and it receives a token with limited rights, which can be withdrawn later.
- Pagination
Returning a long list in pages. You ask for a page, and the reply tells you how to ask for the next one. Trade history and price history are usually paginated.
- Polling
Asking for the latest value on a timer. It is simple to write, but every request counts against a rate limit and you only ever see the price at the moments you asked.
- Position
What you currently hold in a market: a direction, a size and the level it was opened at. A position stays open, with a running profit or loss, until it is closed.
- Rate limit
Also: Request allowance, Throttling
A cap on how many requests you may send in a period of time. A limit has a number, a window and a scope, the scope being what is counted: a key, an account, a session or an address. Going over it gets requests refused.
- REST
Also: REST API
A common style of API in which each request is an ordinary web request: a method such as GET or POST, a path, some headers and often a body in JSON. Each request stands alone and gets one reply.
- Sandbox
Also: Test environment, Simulation environment
A separate copy of an API for testing, with its own address and often its own keys. Nothing you do there touches real money. A key for the sandbox does not usually work on the live address, or the other way round.
- SDK
Also: Client library, Wrapper
Code someone has already written that wraps an API in the functions of a programming language, so you call a function and do not build each request by hand. An official SDK comes from the provider. A community one is maintained by volunteers.
- Session token
A temporary credential you receive after logging in, sent with each later request in place of your password. It expires after a period without use or after a fixed time, and then you log in again.
- Spread bet
A bet of a stake per point on whether a market will rise or fall, offered in the United Kingdom and Ireland. Like a CFD it is leveraged and you never own the asset.
- Stop and limit
Levels attached to a trade that close it automatically. A stop closes a losing trade at a set level to cap the loss, although in a fast market the fill can be worse than the level. A limit closes a winning trade at a set level to take the profit.
- Streaming
Receiving updates as they happen over a connection that stays open, in place of asking for the latest value again and again. Streaming suits live prices and notices that an order has filled.
- Webhook
A request a service sends to your own address when something happens, so that you do not have to keep asking. It needs a server of yours that is reachable from the internet.
- WebSocket
A connection that stays open so that both sides can send messages at any time. APIs use it to push prices and account updates to you without waiting to be asked.
- Working order
Also: Pending order
An order that has been accepted but has not filled, because it waits for the market to reach a level. Limit and stop orders are working orders until they trigger.