kopiard
Trade API for AI agents · MT5

Give your AI agent a trading account. No terminal.

You connect an MT5 account once. We host the terminal. Your agent trades it by API key, and every key has hard limits and a halt switch.

Get a key Read the API docs

Sign in with Telegram. Sandbox tier is free: 1 account, 2 keys.

curl -s -X POST "https://kopiard-api.cableseer.workers.dev/v1/accounts/ACCOUNT_ID/orders" \
  -H "Authorization: Bearer kp_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol":"EURUSD","side":"buy","type":"market","volume":0.01,"sl":1.08,"client_id":"my-agent-0001"}'
Key placeholder only. SDK packages are built but not published yet; REST works today.
Demo · scripted, not live dataOrders sent
Agent idle
    01 · How it works

    Connect once. Cap it. Let the agent trade.

    STEP 01

    Connect an MT5 account

    Pick the broker server, type the login and the trading password. It is encrypted on your device before it leaves it. We start a terminal for it.

    STEP 02

    Create a key with limits

    Choose read or trade, the accounts it can see, a max lot, open-position cap, symbols and a daily loss. The secret is shown once.

    STEP 03

    Your agent trades

    REST, SDK or MCP. Or skip the agent and trade by hand from the Desk in the browser. Same account, same terminal.

    Your agentClaude, a script, your appBearer key
    REST · SSE · MCP
    Kopiard APIScopes, limits, auditRate limit, idempotency
    commands
    Hosted terminalMT5 + our EAHard caps, halt
    MT5 login
    Your brokerYour MT5 brokerHedging account
    You, in the Desk, enter at the API too. Resume is yours alone.
    02 · Safety

    Built for agents that can lose money.

    An agent will eventually do something you did not plan. So the limits live outside the agent, in code it cannot edit, and the stop button only works one way.

    Scopes

    read sees state and streams. trade places, modifies and closes. Independent: a trade-only key cannot read.

    Per-key limits

    Max lot, max open positions, allowed symbols, daily loss percent, expiry. Breach it and you get key_limit, not a fill.

    Halt by key

    The agent can stop itself in one call. A halted account refuses everything except close, close-all and cancel.

    Resume only by a human

    There is no resume call for API keys. Only your signed-in session can lift a halt, from the Desk.

    Idempotent orders

    Send a client_id. A retry after a timeout returns the original result and never fills twice.

    Audit log

    Every command is recorded: which key, what it asked, what the broker said. Newest 2,000 kept per account.

    Caps in the terminal too

    Account-level max lot, max positions and symbol list are also enforced by the EA inside the terminal, set by you from the Desk.

    Credentials stay encrypted

    Locked on your device with our public key. Only the node running your account can decrypt, and keys never grant access to it.

    Worked examples · responses from the API
    RefusedPOST /v1/accounts/acc_123/orders → 422
    {
      "error": {
        "code": "key_limit",
        "message": "volume 0.50 exceeds this key's max_volume 0.10",
        "request_id": "req_8f3a21"
      }
    }
    HaltedPOST /v1/accounts/acc_123/orders → 423
    {
      "error": {
        "code": "halted",
        "message": "Trading is halted on this account. Only a human can resume it from the Desk.",
        "request_id": "req_8f3a47"
      }
    }
    // GET /v1/accounts/acc_123  ->  "halted": true

    Messages are illustrative; codes, statuses and shapes are the real contract. See Errors.

    03 · What you get

    Everything to trade a hosted account. Nothing you have to run.

    REST + live stream

    JSON over HTTPS, plus a Server-Sent Events stream of account, quotes, positions and orders.

    SDKs

    TypeScript (zero dependencies) and Python (sync and async). Built, with a retry layer that reuses your client_id.

    MCP server

    Twelve tools for Claude and other agents. Every tool description states the limits and that resume is human-only.

    Trade Desk

    Trade manually in the browser: order ticket, positions, pending orders, history, margin gauge, key management, kill switch.

    Your own broker

    Bring your MT5 broker server. Tested so far on IC Markets and Tickmill demo accounts; results depend on the broker. Hedging accounts are required.

    Full order set

    Market, limit, stop and stop-limit orders, SL and TP, partial close, modify, cancel, close-all, closed-trade history.

    Roadmap
    • Coming Candle history endpoint
    • Coming Webhooks
    • Coming SDK packages on npm and PyPI (built, not published)
    04 · API pricing

    Priced by how many accounts you run.

    Trade API tiers and limits
    Sandbox, Builder, Scale, Fleet, Enterprise. Turn on JavaScript to see the full table.

    Requests, streams and history are counted per trading account. Over a limit you get a clear error (429 rate_limited with Retry-After, or 422 tier_limit), never a silent drop. Paid checkout is not switched on yet; talk to us on Telegram.

    Get a key Talk to us for Enterprise

    05 · Also from Kopiard

    The copier. One master, many followers.

    Copy a master account to any number of follower accounts, within seconds, with no VPS to run. The master connects with an investor password, read-only. Each follower has an equity guard (daily loss and max drawdown that close its mirrored positions and pause the link) and owns its manual-close policy: if you close a copied trade yourself, it stays closed or reopens, your choice.

    Start copying

    Starter

    $9/month
    • 1 master + 1 follower

    Trader

    $25/month
    • Up to 5 accounts
    • Equity guard

    Pro

    $79/month
    • Up to 20 accounts
    +84.20
    Master
    +83.90
    Follower 1
    +83.40
    Follower 2

    Generation loss: in the dashboard every follower figure fades by how far it drifted from the master. Example figures.

    06 · Security

    Your password is locked before it leaves your device.

    Passwords are encrypted on your device with our public key, so what reaches our servers is ciphertext. Only the node running your account can read it, and only while it runs that account. The login file is deleted after 60 seconds and the folder wiped when the account stops. API keys are stored as hashes and shown once.

    Where the password goes
    1. Your deviceencrypts
    2. Kopiard serversciphertext only
    3. Account nodedecrypts in memory
    07 · FAQ

    Developer questions.

    How fast is it?

    Orders typically complete in under a second, plus broker time; state is fresh to within about two seconds. Copier lag is measured at about 50 ms of pipeline plus broker time. This is not an HFT product. Your numbers depend on your broker and the node.

    Which brokers work?

    MT5 broker servers in general, tested so far on IC Markets and Tickmill demos. Results depend on the broker: symbol names, stops levels, fills and spreads are theirs. The account must be a hedging account; netting accounts are refused with netting_unsupported.

    Can an agent resume a halted account?

    No. A key can halt, never resume. Resume is a signed-in human action in the Desk. This is deliberate.

    Where do my passwords live?

    Encrypted on your device, stored as ciphertext, readable only by the node that runs your account. The trading password is needed for the trader role; keep a dedicated account for your agent.

    Can I trade manually too?

    Yes. The Desk is a full browser terminal for the same account: order ticket, positions, pending orders, history. Positions you open by hand show up in the API state.

    Are the SDKs on npm and PyPI?

    Not yet. They are built and tested against a fake server and live in the repository. The REST API is the supported path today; the docs page shows every call.

    What if my agent retries?

    Send a client_id (40 characters at most) on every write. A repeat returns the original result with Idempotent-Replay: true.

    Give your agent an account. Keep the stop button.

    Get a key Read the API docs