Bookmap API
API modules
Bookmap supports two API types: the Addons API (also called the L1 or Layer 1 API) and the Connect API (also called the L0 or the Layer 0 API).
See the below table for differences.
L1 / Addons API | L0 / Connect API | |
---|---|---|
Usage | Create custom add-ons (indicators, trading strategies) | Create custom market data and trading connections |
Details | Develop add-ons such as indicators, alerts, trading strategies, etc. Such add-ons can be used in real time and in replay, and in general don’t depend on data source type (unless it uses a know-how specific for some data source) | Develop adapters that connect Bookmap to additional market data and/or trading services such as digital/crypto exchanges, market data vendors, brokers, order management systems (OMS), etc. |
Extensions | “Intercept / Inject” mode - override upstream and downstream market data and trading messages. See below some of the use cases. Another extension of this API is a “Simplified” development framework which makes addon development easier. In alpha stage is also our new Python API. | Quant solution - Allows to connect Bookmap to proprietary market data and trading sessions for debriefing, development, real-time monitoring of trading systems. It also includes a collection of useful tools for the quantitative finance industry, especially HFT. |
Addons API (L1)
Depending on code complexity and features, there are two types of L1 API:
Simplified API
- recommended for beginners. very simple and contains many examples
- does not support "inject" or and "data editor" mode
- Has both Java and Python interfaces
How to start with Simplified API
- read the readme for the DemoStrategies project
- see examples in the DemoStrategies simplified.demo sub-package and in the simple-demo project
- if your programming language is Python please see the Python API page for details
Core API
- a bit more complex and has not as many examples
- supports "inject" and "data editor" mode (is able to transform data passed to Bookmap)
- experience with the Simplified API is recommended
How to start with the Core API
- read the readme for the DemoStrategies project
- see examples in the DemoStrategies simpledemo sub-package
Connect API (L0)
To be able to develop adapters with L0 API you need to fall in either Quant solution or Connect solution category. Once your category is approved you can run your custom L0 API adapters in Bookmap.
How to start with the L0 API
- read the readme for the Layer0ApiDemo project
- see examples in the Layer0ApiDemo project
- you may also want to take a look at the Bitmex adapter implementation
Resources
- repository with docs and examples
- forum with API sub-forum
- API channel in Discord
- Python API channel in Discord
- Simplified API videos on YouTube
Q&A and notes
How to write an add-on or adapter in languages other than Java?
With Python API you can write your L1 add-ons in Python. Also, you can use all supported OS interprocess communication methods including web sockets, JNI, etc. However, you can load your own minimalistic Java module that acts as a proxy agent.
How does Bookmap route orders and market data?
Neither orders nor real-time market data travel through Bookmap servers*. Bookmap is a front end and connects directly to the target connection using credentials (when relevant) configured by the user.
* Except for Bookmap Data connections which is our custom solution.
What types of trading strategies can be developed with Bookmap API?
There are no restrictions. Implement any business logic or complex orders management. However, always be aware of risks, especially those associated with latency. Traders must always consider the worst case scenarios in regards to their orders.
Semi-automatic trading strategies
Bookmap API allows trading strategies to “intercept” and manage / modify orders, sent by the user from the chart. This mode may also appear as “inject” mode. It can be useful, for instance, for randomizing the take-profit & stop-loss distances. Another example is a risk module, Note, however, that Bookmap expects a valid feedback about the status of all orders sent from the chart. It’s the responsibility of such a strategy to provide this feedback.
Can I use real time data to develop with the API
For Crypto development real time data can be used. Due to data vendors and exchanges restrictions, development with the Bookmap API for stocks and futures can be done with delayed data only.
Can I use the developed products for non-display purposes?
For stocks and futures developments are limited to display purposes only. Should you desire to develop a product that that uses stocks or futures data for non-display purpose, you must obtain a proper license from the data vendor whose data you intend to use with the product.
If you have further questions, please send us an email to support@bookmap.com