ALOR Broker API
The ALOR Broker trading system provides users with the ability of receiving exchange information and managing trade orders using program interaction interfaces, better known as Application Programming Interfaces (APIs).
The presented documentation describes the ways of interaction with available interfaces, as well as their known features and limitations.
Exchanges
Using the API, the user can interact with the following exchanges:
- Moscow Exchange (MOEX)
- SPB Exchange (SPBX)
Requests to exchanges are standardized by the trading system and differ only by the parameters passed in the request itself.
Data types
As a response to a request, the trading system provides the user with the following types of data:
- All trades data
- All orders data
- List of available securities
- Quotes of available securities
- Market depth
- Historical data
- Portfolio positions
- Client data
Most data requests require authorization using a trading account.
Order types
Using the trading system API the user can manage the following types of orders:
- Market orders
- Limit orders
- Conditional orders (Orders executed only when the specified conditions are reached)
All order-related requests require authorization using a trading account.
Environments
ALOR Broker trading system API provides access to two operation environments: Test and Production.
- Test environment is the playground intended for testing requests and API-based applications;
- Production environment is the working environment intended for interaction with the real exchanges.
The system environments are architecturally identical to each other: the set of servers, the list of supported commands, their parameters, the syntax of queries and the format of returned responses are the same. Thus, the Test Environment can be used to test commands and develop applications in a sandbox, and then adapt the results to work with the Production Environment without making significant changes.
Learn more about System environments
Interfaces
The user can interact with the trading system API using the following interfaces based on connection protocols:
The data is also available via GraphQL API.
The provided interfaces support only secure versions of the connection protocols (https
and wss
).
Authorization
Most of the operations supported by the API are related to trading portfolios or information associated with them. Due to that, executed requests require the sender to confirm access rights to the requested resource.
Depending on the user's tasks, the API offers two authorization options:
- Using
JWT token
. This option is intended for authorizing requests performed by the API user on his/her own behalf: usage of personal trading robots, manual sending of requests to interfaces, etc. - Using
OAuth 2.0
auth service. This option is intended to make it easier for a third-party developer to authorize requests from users of his application. For example, usage of public trading terminals and other applications that use trading account data in their work.
All authorization options provide access to the trading system comparable to using a combination of login and password of a trading account. Ensure the protection of the chosen authorization method and related data.
Learn more about Authorization.
What's next?
To get started with the API more quickly, check out the Quick Start Guides for Production and Test environments for a step-by-step description of how to interact with the system.
To interact with the system more efficiently, we recommend reading the following articles:
- Information about developer account
- Binding trading account
- Specifics of authorization with JWT token
The system-supported requests to HTTP API and WebSocket API and their features are described in their respective sections.
By using the resources (documented and not) provided by the system, you accept the Platform Rules that are in force at the time you execute the request.