Skip to main content

Requirements for a Broker integration

The Level2 platform requires the following APIs to properly function and connect with the broker. To better understand why we require these APIs, let's divide the Level2 platform into two parts:

  1. The frontend: What the user sees and actions on
  2. The backend: What the services do upon users' actions

Based on these two categories we've divided the requisites for each in the following way:

The frontend

1. List of all supported symbols

Level2 fetches market data directly from the broker so that all ticks and symbols are in sync with the broker platform. This includes pnl calculation and charts that we show on the platform. Symbols are the starting point of a strategy and hence we require an API from the broker for the same.

2. Websocket Market data feed

Level2 utilises the socket feed on the frontend to show price changes for symbols to the users.

The backend

1. Historical Market data feed

The system relies on historical market data feed for processing the strategies created by the users periodically.

2. Trading APIs

a. Create new order [Market / Limit / Bracket Order]

The system needs to have access to place these three types of orders [Market/Limit/Bracket Order (BO)] on behalf of the user. The order type differs as per the preference/the strategy created by the user.

b. Current open positions of a user

Current open positions help the system to verify whether the order(s) created by Level2 services are still running or not. This helps us in calculating accurate pnl and also making the strategy eligible to place new trades.

c. Order history of a user

Order history lets the Level2 system know about the status and meta data of a particular trade. Level2 utilises the said meta data to update its local orderbook that it uses to show in the platform.

d. Cancel/Close order

Cancel/Close order is used by the system to close orders as directed in the strategy or done via implicit/explicit actions of the user.

Summary

So, to summarise, here is the list of APIs that the Level2 system needs to function:

  1. List of all supported symbols
  2. Websocket Market data feed
  3. Historical Market data feed
  4. Create new order [Market / Limit / Bracket Order]
  5. Current open positions of a user
  6. Order history of a user
  7. Cancel/Close order

Contact us

If you have any questions regarding the APIs and the integration please share it with us on shantanu@trylevel2.com.