Running your own server
Call TraderX tools from your own code, a VPS or CI with a personal key.
Create a personal key
Servers and scripts can't sign in through a browser, so they use a personal key. It works until you revoke it.
Keep the key private
Open Settings > AI agents
Sign in to TraderX and open Settings > AI agents.
Create a key
Give it a name you will recognise later, like the machine or app it runs on.
Copy it once
The key starts with
bbtx_pat_and is shown only once. It doesn't expire; it works until you revoke it.
export TRADERX_API_KEY="bbtx_pat_..."Never paste a key into a chat
Call the tools from code
Any MCP client library works. This example uses the official TypeScript SDK (@modelcontextprotocol/sdk) to list your strategies:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://mcp.bbtraderx.com/mcp"),
{ requestInit: { headers: { Authorization: `Bearer ${process.env.TRADERX_API_KEY}` } } },
);
const client = new Client({ name: "my-traderx-script", version: "1.0.0" });
await client.connect(transport);
const strategies = await client.callTool({ name: "strategy_list", arguments: {} });
console.log(strategies.content);Tool names and what they return are in Tools. Each key can make 60 requests a minute.
Existing order API
If your server already sends orders to https://execute.bbtraderx.com with a strategy key, nothing changes: that API keeps working exactly as before. The same strategy keys can also connect to the agent server, where they see only their own strategy.