Passa al contenuto principale

Vibe Coding Bookmap Add-ons — Starter Guide

informazioni

The guide assumes you have the Bookmap app installed on your computer.
If it is not installed, please use this link: https://bookmap.com/portal/

1. Getting an AI agent

1.1 Difference between the AI chat and AI agent

AI is quite widespread now and you probably have already used it. But usually it is just a chat: you prompt the AI, maybe share some files and photos, and then the AI responds in text, sometimes also sharing files in return.

An AI agent, on the other hand, is capable of this and more. It works with the files directly on your computer, uses commands, and builds projects as a developer. But the agent can't just run in the browser, you need to install an app for it to be able to perform such tasks.

Also, as there are many sites with the AI chats, there are also different options on what agent to choose. They may have different pricing, features, and accuracy. But as long as the main functionality of working with files and commands is there, you can use it for vibe-coding.

1.2 What to use

Here are some popular AI agent options you can try:

  • Claude Code - based on Claude from Anthropic.
  • Codex - based on ChatGPT from OpenAI.
  • GitHub Copilot - also based on ChatGPT, but is created by Microsoft and GitHub.
  • Cursor - based on Grok from SpaceXAI.

The guide will use Claude Code as the example, but you aren't restricted to using it. Depending on your existing experience and subscriptions, you can use other agents. The UI may be different, but all the concepts will apply.

attenzione

If you decide to use other agents not listed here, you need to make sure that the agent can work on your computer. To test it, install the agent and ask it to
"Find my Bookmap installation folder and tell me where it is."

Then judge the agent based on the result:

  • If the agent is successful, it means it could access and search the files. It passes.
  • If the agent refuses and is unable to search the files, it also won't be able to build add-on projects. It fails.

If your agent offers a free tier or trial, run this check there before committing to it.

1.3 Agent installation

To install an agent you need to create an account, download the agent app, and sign in. If the agent is locked behind the paid subscriptions, you will also need to buy the subscription before using the agent.

In the case of Claude Code:

  • go to claude.ai/login
  • there, register or log in via email or other services
  • after the registration process, you will be redirected to the subscription plan selection. If you already had an account, click on this link claude.ai/upgrade
  • select the subscription tier for your account

    At the time of writing, Claude agents are only available in paid subscription tiers. They differ in the amount of processing and thinking that the agent is limited to. The more frequent and the more complex tasks are given to the AI, the quicker it will reach this limit. You can start with the cheapest tier and upgrade if you see that you need to extend the limits.

  • go to claude.ai/download and download the desktop app
  • run the installation file
  • when the installation is complete, open the Claude Desktop app and log in using your Claude account
  • in the app, on the top left, select the Code tab

And here is the agent that will help with building custom add-ons. Note that only Claude in the Code tab is suitable for add-on development.

2. Setting up

2.1 What needs to be set up

Besides the Bookmap app itself, the agent needs two things installed in order to create add-ons: Python and Bookmap's skill.

Python is a programming language for making and running code. It is used by the agent to run some helping scripts during the setup and development.

Skill is a set of instructions for AI agents. Skills are made of plain text files, but they can unlock many possibilities. The skill provided by Bookmap contains all the necessary information about add-on development so the agent knows exactly what to do right away.

You don't need to look up and install them manually. The AI agent can do it for you.

2.2 Installation process

informazioni

For the AI to run commands, edit files, etc., it needs your permission. So, during this installation process and your other work you would need to monitor the agent and allow it to perform the actions as they come up.

If it becomes overwhelming, you can enable the automatic mode. It will allow the agent to execute your tasks by itself. There is a risk that something can go wrong. The later models are equipped with better safeguards and reasoning. Also, the AI can help you fix things when they go wrong. But the risk is still there.
If you want to be safer, you can disable the automatic mode and review the actions before they are executed.

In Claude Code you can select the mode right under the input field, on the left.

During the installation, start with installing Python. Ask the AI agent to do it by using this prompt:

Install the latest Python 3 on my computer. If Python is already installed, update it.

The agent will check the existing installations and install the up to date version. During the installation you may be prompted by the system to enter your password to confirm the installation.

Then install the skill by prompting:

Install the skill from https://github.com/BookmapAPI/ai-skills

The agent will check the skill, download it, and make it available for future use.

With the skill installed, ask the agent to do the rest of the setup required by the skill:

Set up my computer for Bookmap add-on development

The agent will understand that your question relates to Bookmap's skill and load it. The skill includes checks for the right setup. If anything is missing, AI will install it. For example Java and some development tools.

After the setup and installations are done, it is recommended to restart your computer.

If during the installation process anything goes wrong or you have additional questions, you can ask the AI agent. Agents are very proficient with using and setting up computer environments.

If the steps from the next section work for you, your setup is now correct.

3. Building and loading the add-on

3.1 Creating a folder for your projects

First, create an empty folder (e.g. Documents/bookmap-addons). Then let the agent know that it should work inside of this folder. It will keep all your add-ons organized in one place without the agent guessing where to create new projects.

In Claude Code, add the folder using the "+" icon near the mode selection.

3.2 Building the add-on

Now we will make the first add-on.

Prompt the agent:

Create a new Bookmap add-on project using the Simplified API. It should draw a moving average of the traded price on the main chart, with a setting for the averaging interval in seconds. Also include historical data.

A couple things to break down in this prompt:

  • Bookmap supports two sets of tools for creating add-ons:
    • Core API covers all the possible functionality a Bookmap add-on can have. But it is complex and requires more code. So, the agent would have to spend more effort to make the add-on, reaching the limits faster.
    • Simplified API was introduced to reduce the complexity. It lacks some features, but it requires less code, simplifying the work for the AI agent. So, if the add-on doesn't need the features specific to Core API, it is recommended to use the Simplified version. More on the possibilities and limitations will be described in sections below.
  • If you want some values to be customizable, mention that you want to add them to the add-on's settings. Otherwise, the agent may create the add-on with everything specified in the code, with no customization.
  • Bookmap provides different tools for tracking live and historical data by the add-ons. So, to ensure that the agent will use historical data in the add-on's calculations, you should specify it explicitly.

3.3 What happens while it builds

When the task was given to the agent, it will start thinking, planning, and creating the project. When all the code and other files are created, the AI agent will build the add-on into a single .jar file that can be loaded into Bookmap.

When the agent is done, it will report the results and tell you where the .jar file is located. Usually it is <your folder>/build/libs/<add-on-name>.jar. Go to the folder it specified and check that your add-on is there.

3.4 Using the add-on in Bookmap

attenzione

Custom add-ons aren't permitted to run on paid data from exchanges like CME.
Such add-ons can be enabled and tested on:

  • Free data (e.g. crypto instruments)
  • Delayed data (e.g. DXFeed delayed)
  • Replays

To use your add-ons on the paid instruments, they should be verified and signed by the Bookmap team. The exact signing process is described in sections below.

To use the created add-on, open Bookmap in replay mode or with an allowed instrument open. Then click the Configure add-ons button or go to Settings -> Configure add-ons. To load the add-on click on Add. In the file browser, go to the folder where your add-on is located and click Open. Now you can enable the add-on. After a bit of loading time, you should see the moving average line on the chart. Going to add-on's settings and changing the interval should reload and change the line accordingly.

3.5 When it doesn't work

AI can make mistakes introducing bugs and problems to the add-on during development. But the agents can also fix the issues if you tell them about it. A good practice is to describe what was done before the issue appeared, how the issue presents itself, and attach a screenshot of the problem. It is just like texting support, but with quicker feedback.

Introducing new features, discovering bugs, fixing them, and polishing the add-on is a standard process during development, don't be afraid of it. With each back and forth you are closer to your goal.

Another issue that might come up: the add-on was changed and a new version was built, but in Bookmap there are no changes. It is related to how the add-ons are loaded in Bookmap. When the file of the add-on is changed, the app doesn't know about it and keeps using the old version. To update the add-on, you should remove the existing version and then load the newly built add-on file again. In this case Bookmap will receive the updated code and apply the changes.

If you see that the chart or the application lags when your add-on is enabled, it means that the data processing is too heavy. Describe to the agent in what cases the lag appears, how it looks, and ask AI to find ways to optimize the add-on.

3.6 Introducing changes

When the add-on you made works, you might want to add some new features and functionality or tune the behavior. To do that, it is a good practice to copy the current .jar file of the add-on to a safe place, back it up. Then describe your idea to the AI agent. You can also brainstorm and plan the feature with the agent before starting to create it.

When the agent is done, go to Bookmap, remove the old version of the add-on, load the new one and test the change. The add-on polishing workflow begins again.

More of what capabilities you can use in the add-ons will be described in the further sections. Also, check the restrictions of what the add-ons are prohibited to do before creating new projects and features.

4. Bookmap add-ons possibilities and restrictions

Legend:

  • ˢ - Simplified API only
  • ᶜ - Core API only
  • unmarked - both.
Input
Market dataTrades (price, size, aggressor, OTC) · Best bid & offer · Depth by price (MBP) · Depth by order (MBO, only on supported data feeds) · Barsˢ (OHLC, buy/sell volume, VWAP, 50 ms–30 min) · Session stateᶜ
Your accountOrders & fillsᶜ · Position, P&L, open ordersᶜ · Balanceᶜ · List of connected accountsᶜ
ContextBookmap's clock (replay time in replay) · Timer · Instrument facts (tick size, multiplier, delay, etc.)
HistoryAccumulated live data · Historical data · Specific data period on demandᶜ
Other instrumentsData from any instrument open in Bookmap · Subscribe to extra symbolsᶜ
From the traderSettings panel · Hover, click, drag add-on's drawingsᶜ · Right-click menusᶜ · Hotkeysᶜ
From other add-onsCustom messages
ProcessingJust examples, any logic you can describe can be coded by the agent
CountingSums & counts per level, side, time window · Delta · Imbalance ratios
DetectionFixed thresholds (size, levels, time) · Self-adjusting (difference from average/maximum over time window)
WeightingRecent or nearby counts more (half-life by age or by distance) · Totals: running, reset every N seconds, sliding window, until the sign flips
Deriving dataReal size of a big order from its chain of fills (MBO) · Custom copy of the order book: replenishment, pulled vs filled, level age
RearrangingBars: time, reversal, range, volume · Cross-instrument: spreads, ratios, lead/lag · Technical analysis · Use past generated data in calculations
About youBreak-even · Trade stats: MFE/MAE, duration
Output
Main chartLines (styling, gaps, above or beneath other lines, own scale) · Icons at price & time · Free-hand drawingᶜ (any shape, image or text, over the chart) · Bookmap Notificationsᶜ
Sub-chartLines: one or several, own or shared scale · Erase and redraw own past values
ReadoutsWidgets: value, fixed range, how long it stays, grouped indications
Whole chartsFiltered copy of the instrumentᶜ (live only)
WindowsStandalone windows with anything, e.g. position table, checklist, price ladder
AlertsBookmap sound, voice, popupsᶜ · Own panel in Bookmap's alert settingsᶜ · Custom alerts
Actions
OrdersPlace: limit, market, stop, stop-limit · Order duration · Modify, cancel · Brackets: TP/SL, multi-tier, trailing · OCO / OSO · Route to an account · Refuse the trader's orders by a rule before they reach the brokerᶜ
PlatformSwitch chart tabᶜ · Show bottom / alert / shortcut panelᶜ · Set the order size in the Trading Control Panelᶜ · Change selected accountᶜ
To other add-onsSend custom messages
Not available
Isn't supported by APIToolbar or menu buttons · Per-price columns · Drawing over the whole window · Change layout · Alter another add-on's drawing · MBO on Instrument Copy
Bookmap policyMarket data leaving Bookmap: sent anywhere or saved to a file · AI running inside an add-on · Unsigned add-ons on paid live data
attenzione

Every add-on uses only one API type: Simplified or Core. Both can't be used at the same time. Simplified add-ons can still borrow a few Core-only features as a workaround and the use of it should be minimized. It might help when the code of a Simplified API add-on is already established but a feature from the Core API is now needed. If during the planning of the add-on you see that something would require Core API, ask the AI agent to use it from the get-go.

5. Add-on signing

5.1 Why signing is needed

Unknown add-ons aren't allowed to run on paid live data from exchanges like CME. Bookmap has to verify them first. This protects the data providers from custom add-ons collecting and/or sharing the market data.

Until the add-on is verified, you can develop and test it on:

  • Free data (e.g. crypto instruments)
  • Delayed data (e.g. DXFeed delayed)
  • Replays

If the available instruments suffice your needs, you don't need to sign your add-on to use it.

5.2 Getting an add-on signed

When you have a version of the add-on you are happy with, the process is:

  1. Contact Bookmap support at support@bookmap.com and say you want to sign an add-on.
  2. Sign the Developer Agreement. Support will send it to you and explain the details. Among other things, you agree not to share the market data your add-on has access to.
  3. Ask the agent to prepare the add-on for signing. The add-on's code has to include a special marker that is described in the skill for the agent.
  4. Build the add-on and send the .jar file to support.
  5. Support verifies the add-on. If the add-on passes the checks, it will be signed and remembered by the Bookmap servers.
  6. The .jar file you shared will now be considered signed.

The signed file can be loaded into Bookmap the usual way and will work on all instruments, including paid live data. You can also share this file with other Bookmap users, and it will work on live data for them too.

attenzione

The signature belongs to the exact file you sent. Any change to the add-on, even a small one, means a new build, and the new file is unsigned again. It goes back to free data, delayed data and replays until you repeat the process. Renaming the signed file is fine. Rebuilding it is not.

5.3 Working on a signed add-on

Because every rebuild loses the signature, it is worth planning around it:

  • Finish and test the add-on on free, delayed or replay data first. Sign it once, when the add-on is stable.
  • Keep the signed .jar file in a safe place, separately from the project folder, so a later build doesn't overwrite it.
  • If you want to keep improving the add-on, do it by creating a new version. The old signed file keeps working on live data while you develop, and the new version gets signed when it is ready.

If the add-on is signed but still won't enable on a live instrument, the most likely reason is the missing marker in the code. Describe the situation to the AI agent; it knows the signing process and the common issues around it.

6. AI best practices

When working with AI, there are some limitations you will have to work around. They are mostly related to the thinking limits. To optimize your usage and extend the time you can use the AI before hitting the limits, there are some concepts you can utilize.

Complexity

The AI usage doesn't just check how many messages you sent. Instead, it checks how hard and for how long the AI was thinking. A bunch of easy questions can require the same amount of usage as just one complex task or question.

This part comes with the work you need done, so it can't be optimized easily. Use it as the baseline to determine how much you should optimize other aspects.

Context

When you work with AI for a long time, it has to remember more and more things and then check its memories when thinking. It is useful to make the AI coherent during long conversations, but it is also very costly. The more information and memories the AI has to keep and analyze, the quicker it will hit the usage limit. Even easy tasks could require considerably more usage to be spent if the chat is long and there is a lot of memory that was used.

To optimize the amount of context the AI holds, it is a good practice to start new chats and continue the work there instead of using the same chat for a prolonged amount of time.

But won't the new chat forget what the add-on and the current task are?

Regarding the add-on and the project, the AI documents its work as it goes. There is usually one file that describes the project as a whole, as well as smaller comments around the created code that explain it. This way, even new chats can quickly pick up what the project is and how it is written.

If the chat already became too long in the middle of working on a new thing, you still can benefit from starting a new chat. To make it continue from the point you stopped on, ask the original long chat to create a handover document for the new chat. The document will contain the summary of the work that was done, what else needs to be done, and some other details. This way the new chat can get all the necessary information without holding the whole conversation in its memory.

Research

AI generally doesn't like to ask questions before digging and trying to understand the situation as much as it can. That means that if the question or a task is vague or doesn't provide enough context and information, the AI can spend a lot of time trying to find and fill all the missing pieces itself, and only then ask if its assumptions are correct. While it makes the AI more autonomous, it also can take a lot of resources.

To make the AI spend less time researching, it is a good practice to explain and give all the context you have around your task. When the AI is provided with the answers already, it doesn't have to spend time looking for them in the first place. It just starts working on the task itself or formulates questions on it quicker if something is not clear.

Another useful thing is to plan the work that needs to be done before starting to execute the task. Ask AI to look at the task at hand, search for potential problems and decisions that need to be made now, ask more questions. This way you can catch the issues before they appear, as well as helping AI to better understand the context beforehand.

Model size

When using AI you may notice that providers let you choose between different available models. Some are faster (smaller), some are smarter (bigger). But other than the speed and accuracy, the size of the model also impacts how much usage is spent when the model is thinking.

A bigger model doesn't always imply it has more information. The difference comes from how easily the model can apply the information to make decisions. You can imagine it as smaller models having fuzzier memories of the same knowledge base. This is a reason why smaller models are less accurate and more prone to hallucinations.

But how to optimize the usage without compromising on the quality of the work?

A good middle ground is to discuss and plan the feature and its implementation with the bigger model to create a playbook for completing the whole task. Then you can hand a smaller model this plan and let it do the actual work. Small models may have worse decision making, but they are still capable agents when they already know what needs to be done.

Experiment with different models and find the right combination for you. For Claude it is recommended to use Opus for planning and Sonnet for execution.