Skip to main content

AI access: let your AI tool read your combos, PnL and positions

Connect an AI tool installed on your computer, such as Claude Code or Cursor, to your Trade. It can read your combos, PnL, balances and positions to help you analyze them and work out parameters. It can only read: it cannot place orders or change settings.

What the AI can read and what it cannot do

Once connected, you ask your AI tool in your own words and it reads data from your Trade to answer. It can read:

  • Combos, parameters, state and combo positions

  • Fills and funding fee settlement details

  • PnL, fees and funding fees

  • Balances and positions of each account

  • Position difference

  • Recent errors (including the exchange’s own wording)

  • Minimum order size and precision

In Trade, an AI tool can only read. It cannot:

  • Create combos, edit parameters, run, stop, set reduce-only, resume opening positions

  • Manual trading, transfers, borrow / repay, delete a combo

  • Change any setting

  • Read exchange API keys and the sign-in password

Any parameters the AI suggests are its own estimate. Whether to use them and how to enter them is up to you, in Trade.

AI answers can be wrong and are not investment advice. Trading involves risk; you bear all PnL.

Which AI tools can connect

Trade is open only to AI tools installed on your computer. When you generate a pass you can choose Claude Code, Claude Desktop, Codex, Cursor or VS Code, and each one gets a ready-made configuration. Choose Other to get the URL and header instead; any tool that supports remote MCP servers can use them.

Claude on the web, Claude on mobile and ChatGPT on the web cannot connect to Trade. With those, you can only add the Z Market Lab address: the AI can look up market data and opportunities, but it cannot read the combos and positions in this Trade.

Connect

  1. Open the AI access page from the Trade sidebar and choose Generate pass.

  2. Under “Which tool it is used in”, pick the tool you use. The name is filled in for you and can be changed. Choose “Generate”.

  3. The window shows the steps for that tool and a complete configuration with the pass already in it, so there is nothing to replace by hand. Follow the steps to add it to your AI tool:

    • Claude Code: run the two commands shown in a terminal, then type /mcp in Claude Code, choose zml and sign in with your Z Market Lab account.

    • Cursor: click the two add buttons in the window, or add the configuration to Cursor’s MCP configuration file.

    • VS Code: paste the configuration into the file named in the steps.

    • Codex: add the configuration to the file named in the steps.

    • Claude Desktop: install Node.js first, paste the configuration into Claude’s configuration file, save, then quit Claude completely and open it again.

  4. Tick “I have added it to my AI tool or saved it somewhere safe”, then close the window. The configuration is shown only this once.

After the AI tool uses the pass for the first time, reopen the AI access page: the row for this pass changes from “Not used yet” to “Last used” with a time. If it still shows “Not used yet” after you reopen the page, see AI tool cannot connect to ZML Trade.

If you open Trade by the server’s IP address and its certificate is self-signed, AI tools refuse to connect. The AI access page says so, and the same article explains what to do.

In the online demo you can view this page, but you cannot generate a pass.

Add Z Market Lab as well

Except for Other, each tool’s configuration also includes the Z Market Lab address. The first time the AI tool uses it, follow the tool’s prompt to open the authorization page in your browser, sign in with your Z Market Lab account and click “Allow”. If you have no account, create one on that page.

With both connected, the AI can first look up an opportunity’s past spread and funding rates on Z Market Lab, then read this Trade’s balances, minimum order size and precision, and work out a set of parameters. The Z Market Lab side cannot read the combos, balances or positions in this Trade.

Example questions

The AI access page lists three questions you can copy as they are:

  • Which combo earned the most this week? Why has the SOL one still not opened a position?

  • Are there any position differences? What errors has the exchange reported recently?

  • For the SOPH opportunity between OKX and Aster, calculate a set of combo parameters with 500 USDT, based on the spread and funding rate of the past 7 days.

The first two use only this Trade’s data. The third needs Z Market Lab connected as well, so the AI can look up past spreads and funding rates.

Keeping and revoking passes

Anyone who holds a pass can read your combos, balances and positions. They can only read, and a pass cannot be used to sign in to Trade. Keep it as safe as an API key: it is stored in the configuration of the AI tool on your computer, and you should not send it to anyone.

The command that adds Trade to Claude Code contains the pass and stays in your terminal history. If other people can use your computer, delete that line from the history after running it.

  • Shown once: a pass is shown only when it is generated and cannot be viewed again. If you lose it, revoke the old one and generate a new one.

  • Revoke: on the AI access page, choose Revoke on the row of that pass and confirm. It takes effect immediately and AI tools using it are disconnected. Revoke a pass when you change computers, stop using it or suspect it has leaked.

  • Changing your password invalidates every pass: after you change your sign-in password or username, or reset the password on the server, every pass generated before that stops working. Generate a new one if you still need it.

  • No expiry of its own: a pass stays valid until you revoke it or change your password. “Sign out all other devices” does not invalidate passes; its confirmation window tells you how many passes are still in use.

Who the data passes through

Your AI tool connects from your computer directly to your own server. What AI reads goes through the AI service you use.