Example. Trading session using APIv4 and WebSocket API
Standard limits for requests are 300 requests per minute for all endpoints (for PRO accounts - 1200 requests per minute). To minimize the number of requests per minute, we highly recommend using WebSocket API along with APIv4. Getting up-to-date information about the markets and your orders via WebSocket API allows you to spend the APIv4 limit only to create and cancel orders.
OHLCV is an acronym that stands for Open, High, Low, Close, and Volume and refers to a type of chart used to represent the price movement of a financial asset.
The <symbol>@ohlcv stream provides a continuous feed of the most recent OHLCV data for the specified trading pair. This data can be used to track the price movement of the trading pair over time and identify trends or patterns in the data and build charts for visualisation.
The <symbol>@trade stream provides real-time updates for the latest trades executed for a specific trading pair. Each trade update includes information such as the trade ID, the price at which the trade was executed, the quantity of the asset traded, the timestamp of the trade, etc.
The aggregated trade stream differs from the regular trade stream in that it provides summarized information for multiple trades executed at the same price and time, instead of individual updates for each trade. The stream also includes a trade ID representing the first and last trade executed in the aggregation, which can be used to reference the aggregated trades.
The order stream provides real-time updates for changes to a user's order. Each update includes information about the order, such as the order ID, the symbol, the order side (buy or sell), the order type (limit, market, etc.), the order status (open, filled, cancelled, etc.), and the price and quantity of the order.
The trade stream provides real-time updates for new trades executed by a user. Each update includes information about the trade, such as the trade ID, the pair, the trade side (buy or sell), the price and quantity of the trade, the timestamp of the trade, etc.
You can also use WebSocket API to track balance changes in real time:
The accounts stream provides real-time updates for changes to a user's account balances. Each update includes information about the account balance, such as the asset and the available and blocked balance on it.
To get the order history, please use the appropriate endpoints: