Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Developer reference

TickerAll API Docs

Everything you need to connect a broker account and trade it from your own code — REST endpoints, the realtime WebSocket, authentication, and copy-paste examples in curl, TypeScript, and Python.

Quickstart Get an API key

SDKs and tools

Overview #overview

TickerAll is a hosted API for connecting to and automating your own MT4/MT5 broker accounts. You write your strategy in any language; we hold a fast, persistent connection straight to your broker and keep it live for you, exposed over a clean REST + WebSocket API — so there's no MT4/MT5 terminal in the path, no EA bridge to wire up, and no reconnect churn when your strategy needs it.

Base URL https://api.tickerall.com
Realtime wss://api.tickerall.com
Format JSON in, JSON out
Auth Bearer API key

The API has two planes:

REST control + data plane
https://api.tickerall.com Connect accounts, read balance and positions, list symbols, and place / close / modify orders. Standard JSON over HTTPS.
Realtime data plane
wss://api.tickerall.com A single long-lived WebSocket streams live ticks, position updates, and account updates as they happen.

One API key can hold many broker accounts at once — each scoped by its accountId. Symbol names are pass-through: you see the broker’s native names (e.g. EURUSD, BTCUSD), with no remapping. Prefer a typed client over raw HTTP? Grab the official SDKs linked at the top — TypeScript and Python, both wrapping this same REST + WebSocket API.

Quickstart #quickstart

From zero to a live order in four calls — then, on Pro, fan the same actions out across every account at once (step 5). Each step builds on the last. Prefer to click through it first? The dashboard's Test panel runs every one of these calls from your browser — no code.

Step 1 of 5

POST your broker credentials to /v1/sessions. We authenticate against the broker and return an accountId.

By default your password is held in memory only while your connection is live, never saved to disk. The only exception is the opt-in remembered credentials setting (Pro and Enterprise, for customers who can't keep credentials on their own side): switch it on and we store the password encrypted, solely to restore the connection after a restart; switch it off and it is deleted immediately. To change a stored password, connect again with the new one: it replaces the stored one once the broker has accepted it. A password the broker refuses changes nothing, and leaving the password out uses the stored one.

curl
curl -X POST https://api.tickerall.com/v1/sessions \
  -H "Authorization: Bearer cf_api_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "broker": "mt5",
    "server": "Exness-MT5Trial14",
    "account": 12345678,
    "password": "your-broker-password",
    "terminalType": "MOBILE"
  }'
# terminalType is optional — "MOBILE" (default), "WEB", or "CLIENT" (desktop terminal). WEB/CLIENT require Pro or Enterprise.

# => { "accountId": "acc_8Kd3...", "isDemo": true, "status": "connected", ... }
Try it in the test panel

Authentication #authentication

Every request authenticates with a TickerAll API key sent as a bearer token. Sign up, open API keys in your dashboard, and create a key — it looks like cf_api_…. Treat it like a password; it carries the access of your whole account.

HTTP header
Authorization: Bearer cf_api_xxxxxxxxxxxxxxxxxxxx

Send this header on every REST call. For the WebSocket, send the same header on the upgrade request, or pass ?token=<key> in the URL where headers are awkward (e.g. browser clients).

A missing or invalid key returns 401 UNAUTHORIZED. Keys are validated on our side; revoking a key from the dashboard takes effect within a few minutes.

Kinds of key
Read-only keys.
When creating a key you can mark it Read-only — a data-only credential. It reads everything (accounts, symbols, candles, positions, history, the stream) and can connect accounts with POST /v1/sessions. Every trade call returns 403 FORBIDDEN. Ideal for backtesting, analytics, or any integration that should never place orders. A full-access (default) key can trade.
Isolated keys.
A key marked Isolated sees only the accounts it connected, and no other key sees them. Keys that are not isolated share one pool of accounts. The dashboard always shows every account. A broker login is linked once: connecting one that another of your keys holds out of this key's sight returns 409 BROKER_ACCOUNT_HELD_BY_ANOTHER_KEY. Move an account between the shared pool and an isolated key with POST /v1/accounts/:id/migrate-key (full-access key or dashboard).
Removing accounts with a read-only key.
A read-only key cannot trade, but it can manage the accounts it can see: DELETE /v1/accounts/:id, DELETE /v1/sessions/:accountId and PATCH /v1/accounts/:id/always-hot. A shared read-only key sees the shared pool; an isolated read-only key sees only the accounts it owns.
Investor-only keys.
A key marked Investor-only is always read-only and connects only investor-password (read-only) broker logins. Everything above about read-only keys applies to it unchanged.

Postman & Insomnia #collections

Prefer a GUI client? Import a ready-made collection — every REST endpoint below, with the Authorization bearer token wired up, an auto-generated Idempotency-Key on every write, example request bodies, and an example response on each call. Set two variables and start sending. Download the file, or use the Copy to clipboard option and paste it straight into the app.

Each block below has both, and so does each tool's menu at the top of the page: Download file for saving the .json file, and Copy to clipboard — then paste it straight into Postman or Insomnia, no file needed.

Postman

Download file
How to import
  1. Import, then drop in the file, or Raw text, then paste the copied JSON.
  2. Open the collection’s Variables and set apiKey to your cf_api_… key.
  3. Run Open a broker session, then set accountId (and ticket once you have one).

Insomnia

Download file
How to import
  1. Import, then From File, or From Clipboard after copying.
  2. Open Manage Environments and set apiKey, then accountId.
  3. The realtime feed is included as a ready WebSocket request.
baseUrl and wsBaseUrl come pre-filled. The WebSocket connect URL and subscribe frame are bundled in too — as a runnable request in Insomnia, and documented in the WebSocket (realtime) folder in Postman.

Conventions #conventions

The rules every call follows.

The basics
Base URLs
REST: https://api.tickerall.com, WebSocket: wss://api.tickerall.com/v1/stream
Content type
Request and response bodies are JSON. Send Content-Type: application/json on calls with a body.
Timestamps & numbers
Timestamps are ISO-8601 UTC strings. Tickets are integers. Prices and volumes are JSON numbers (lots for volume, e.g. 0.10).
Worth reading once 4

Sessions #sessions

A session is a warm, authenticated connection to one broker account. Start one to get an accountId; delete it to disconnect.

Accounts #accounts

List your connected accounts, or fetch one account’s live financials and open positions.

Symbols #symbols

Discover the instruments you can trade on an account, in the broker’s native names.

Candles & history #candles

Historical OHLC bars are included on every plan — no extra charge. The public endpoint GET /v1/public/candles (no API key required) returns bars at any of nine timeframes: M1, M5, M15, M30, H1, H4, D1, W1, MN1. Coarser timeframes reach further back — daily bars reach back years; a single request returns as much as fits in a few seconds.

The authed GET /v1/accounts/:id/candles takes either a look-back window (hours) or an exact date range (from + to). from and to accept ISO-8601 (2026-11-09T14:00:00Z), Unix seconds (1794232800) or Unix milliseconds (1794232800000) — the same formats as the history endpoints. Every response reports how much of the requested window was actually served via coverage and truncated. An empty candles list with 200 means there are no bars in that range (for example, the market was closed).

Orders #orders

Place market or pending orders, close positions (full or partial), and modify stop-loss / take-profit. All three require an Idempotency-Key header.

OCO orders #oco

An OCO (one-cancels-other) pair is two pending orders where the first to fill cancels the other — for example a buy-stop above and a sell-stop below, to catch a breakout either way. Arm a pair, list an account’s groups, or cancel a whole armed group. OCO is on Pro and Enterprise; arming a pair takes the same Idempotency-Key header as placing an order.

Expiring positions #expirations

Schedule an open position to close by itself at a wall-clock time (options-style expiry). The server closes it at expireAt; setting one again replaces it. Schedule or clear the expiry of a position, list an account’s expirations, or cancel one by its id. Expiring positions are on Pro and Enterprise.

This is separate from the expiry of a pending order (good-till-date and DAY, the timeType field on Orders), which the broker enforces itself.

Trade history #history

Your account’s closed-trade history — executed trades paired into round-trips (entry + exit) with realised P/L, the equivalent of MT5’s history_deals_get. Returns the recent window your broker provides on connect plus anything closed live during the session; filter by symbol and close-time range.

Bulk operations #bulk

Execute one action across many of your accounts in a single request — place, close, modify, and cancel over a whole set of accounts, or read live state for your entire roster at once. Every bulk call reports each account’s outcome separately: a mix of successes and failures still returns 200, with a per-account results array and a summary tally, so a partial success is never ambiguous.

Bulk operations require a Pro or Enterprise plan; on the Free and Trader plans they return 403. The write calls take the same Idempotency-Key header as their single-account counterparts.

Copy Trading #copy

Mirror one master account’s trades to many follower accounts — each scaled, symbol-mapped, and risk-clamped to its own size. Create a set, tune each follower, arm it, and the moment the master trades (through TickerAll) the followers follow. All accounts are your own (self-copy).

Copy Trading requires a Pro or Enterprise plan; on the Free and Trader plans these calls return 403 (COPY_REQUIRES_PRO). Sizing, lot clamps, exposure caps, symbol allow/block lists, reverse copy, a slippage guard, and per-broker symbol overrides are all per-follower. Read a set’s /stats and /log for a full picture of what mirrored.

Once a set is armed, any trade on the master mirrors to its followers automatically — whether it was placed through this API, the dashboard, a Telegram/Discord command, a webhook, or a TradingView alert. Point a TradingView strategy (or any signal source) at your master account and the whole set follows.

Copy-event delivery (webhooks)

Set a webhookUrl on a copy set (with an optional webhookSecret) to receive a JSON POST for every mirror outcome — ok, skipped, or failed. It’s the same stream the set’s /log records, delivered as it happens. Delivery is best-effort and never blocks or delays a trade.

POST body — one copy event
{
  "event": "copy.open.ok",          // copy.<action>.<result>
  "setId": "cset_7Hb2...",
  "setName": "My desk",
  "action": "open",                  // open | close | partial_close | modify | pending_cancel | pending_modify
  "result": "ok",                    // ok | skipped | failed
  "followerAccountId": "acc_1",
  "symbol": "EURUSD",
  "mappedSymbol": "EURUSDm",         // the follower broker's symbol
  "volume": 0.25,
  "masterTicket": "123456",
  "followerTicket": "998877",
  "reason": null,                    // why, when skipped/failed
  "latencyMs": 140,
  "ts": "2026-08-29T12:00:00.000Z"
}

The event is copy.<action>.<result> (e.g. copy.close.failed) so you can route on it. When a webhookSecret is set, each request carries an X-Tickerall-Signature: sha256=<hex> header — the HMAC-SHA256 of the raw request body, keyed by your secret. Verify it before trusting the payload:

Verify the signature, Node
import { createHmac, timingSafeEqual } from 'crypto'

function verify(rawBody, signatureHeader, secret) {
  const expected = 'sha256=' + createHmac('sha256', secret).update(rawBody).digest('hex')
  const a = Buffer.from(signatureHeader), b = Buffer.from(expected)
  return a.length === b.length && timingSafeEqual(a, b)
}
Live chat alerts, no bot setup Discord / Telegram Discord and Telegram channels both expose an incoming webhook URL. Point webhookUrl at one to stream mirror events straight into a chat — a zero-code way to get live copy alerts on your phone.

Seats (white-label) #seats

Serve many downstream customers through one TickerAll account. A seat is one of your sub-users; you hold one key per environment (not one per customer) and name the seat on each request with the X-Tickerall-User: <externalId> header. Connections you open under that header belong to the seat. Seats are an Enterprise opt-in feature — off by default, and while off your key behaves exactly as a normal key.

Quota. Each seat has a connection cap (maxConnections), and the sum of all seat caps must stay within your reserved capacity (your committed max accounts). You distribute your reserved pool across seats; a create, patch, or auto-create that would exceed it is rejected with 422 POOL_FULL. You are billed by your reserved capacity, used or not — seats only partition it, with no per-seat fee.

Per-seat rate limits. Each seat gets its own request budget (your tier default, or a per-seat rateLimit override), so one busy seat never spends another’s budget.

Isolation, by construction. A seat sees only its own accounts and data — never another seat’s, and never yours. Your plain key (no acted-as header) sees across all seats for management.

Two ways a seat is addressed. The default is the acted-as header above, where only your server holds a credential. Optionally, you can mint a seat its own cf_seat_ token so the seat’s end-user builds their own app against TickerAll directly — it is used as a normal Authorization: Bearer cf_seat_… and is confined to that one seat. A leaked seat token cannot reach sibling seats, other tokens, or your env/management key, and is revoked independently (no cascade).

Webhooks & TradingView #webhooks

Turn a POSTed JSON payload into a trade — from a TradingView alert, or any source that can send an HTTP POST (a script, Zapier, your own backend). Each connected account has its own incoming webhook URL, and the URL identifies the account — so no login or credentials ever go in the payload. Create one under Dashboard > Webhooks, where you also get per-symbol aliases, an optional shared secret, and a dry-run test.

1Create a webhook for a connected account in the dashboard and copy its URL
2Paste the URL into the alert's "Webhook URL", or POST to it from any other source
3Put the JSON in the alert message, or in the POST body
Webhook URL — per account, shown in the dashboard
/api/webhooks/tv/<token>     # TradingView — paste into the alert's "Webhook URL"
/api/hook/<token>            # any other source — same token, same account
Fields

Put the JSON in the TradingView alert message (or the POST body). Only action plus the fields that action needs are required:

action
buy, sell, close, close_all, modify, modify_all
symbol
auto-resolved to the broker’s name (BTCUSD becomes BTCUSDm), case-insensitive
type
add "limit" / "stop" + price for a pending order ("stop_limit" is refused with status 400)
optional
volume (a partial close), sl, tp, ticket (target one position), comment (cut to 31 characters), dedupe_id (run once — see below), price (also the new trigger price when modify targets a pending order), test (a dry run — see below)
Actions 6

One position or several

One position or several. close and modify act on one position: the one with the ticket you send, or, by symbol, the first open position on it. That is all you need on a netting account, which holds one position per symbol. On a hedging account, where each order opens its own position, use close_all and modify_all to act on every position of a symbol without knowing any ticket.

Avoiding duplicate orders

Avoiding duplicate orders. Alert services re-send a delivery they think failed, and without protection each delivery is a new order. Add a dedupe_id (any text up to 128 characters, unique per alert) and the command runs once: a repeat with the same id on the same webhook within 10 minutes places nothing and returns the first result with "duplicate":true. A command that failed is not remembered, so it can be sent again.

dedupe_id may also be a number, which is read as its digits (42 and "42" are the same id); text is trimmed of spaces at both ends. An id that is empty, longer than 128 characters or of another type is refused with status 400 and nothing is placed.

The id must be the same when one alert is delivered again and different for the next alert. In TradingView, build it from placeholders, for example "dedupe_id":"{{ticker}}-{{strategy.order.id}}-{{time}}" (the order and its bar).

Do not use a constant: every alert after the first would be treated as a repeat for 10 minutes.
Dry run

Dry run. Add "test": true to a trade command (buy, sell, close, close_all, modify, modify_all) and it is checked but not run: nothing is placed, closed or changed, on a demo or a live account, and it is not recorded as a delivery of the webhook. It goes through the same URL, and the same secret when one is required.

A dry run checks three things: that action is one of the six, that the account is connected, and, when you send a symbol, that it resolves to a symbol of your broker (buy, sell and modify_all need one). It does not check volume, price, sl, tp or ticket, it does not ask the broker whether the order would be accepted, and dedupe_id is not read, so a dry run never uses up an id.

When all three pass the status is 200 and the body says what a real command would do. When one fails, the body is { "ok": false, "dryRun": true, "error": "…" } with status 400 (unknown or missing action, or a missing symbol), 422 (the symbol is not one of your broker's) or the status of the account read, for example 409 when the account is not connected.

Dry run, the command
{
  "action": "buy",
  "symbol": "XAUUSD",
  "volume": 0.10,
  "test": true
}
Dry run, the response
{
  "ok": true,
  "dryRun": true,
  "account": "acc_8Kd3...",
  "wouldRun": {
    "action": "buy",
    "requested": "XAUUSD",
    "symbol": "XAUUSDm",
    "volume": 0.10
  },
  "message": "Setup OK — the account is live and “XAUUSD” resolves to XAUUSDm. A real alert would buy XAUUSDm."
}
Settings and templates

Each webhook has an optional required secret and per-symbol aliases in its settings, plus a Test button that dry-runs a payload before you go live. When the secret is required, the JSON must include "secret":"your secret"; a request without the right one is refused with status 401 and places nothing. Live trading follows the same plan rules as the rest of the API — see Plans & limits.

Want a full walkthrough with Pine Script templates and copy-paste alerts? See the companion guide: github.com/TickerAll/tradingview-mt5-mt4.

WebSocket — realtime data #websocket

Open a single long-lived WebSocket to wss://api.tickerall.com/v1/stream for live data. Authenticate with the same bearer token (header on the upgrade, or ?token=… in the URL). After connecting, send a subscribe message listing the channels you want.

URL wss://api.tickerall.com/v1/stream
Auth Bearer token: a header on the upgrade, or ?token= in the URL
Channels ticks, positions, orders, account, history

There are five channel kinds — ticks (per-symbol price updates), positions (open/update/close events), orders (your resting pending LIMIT/STOP orders — the full book, re-sent whole on every change),account (a full account snapshot on subscribe, then a balance update on every balance change — trade settlement, deposit, withdrawal), and history (trades as they close: the new history rows only, with no snapshot on subscribe). All are scoped by accountId.

The server also broadcasts an event frame — a service channel for maintenance notices, all-clears, news, changelog notes and announcements, sent to every connected client. You never subscribe to it; on connect the server replays the currently active notices (newest first, up to ~20) so a client joining mid-maintenance catches up. A client that doesn't handle event simply ignores it — the existing frames are unchanged.

What you send 3

What you receive 10

Maintenance window (schedule + live flag)

Subscribe rejection codes
INVALID_MESSAGE
The frame was not valid JSON or did not match the message schema.
RATE_LIMIT
You sent messages too fast. Slow down and retry.
NOT_FOUND
Subscribe rejected: no account with that accountId.
FORBIDDEN
Subscribe rejected: that account is not yours.
BROKER_ACCOUNT_NOT_HOT
Subscribe rejected: connection cooled. Call POST /v1/sessions to reconnect.
CHANNEL_LIMIT
Subscribe rejected: too many channels on this connection.
NOT_HOT
Subscribe rejected: there is no active session for that account. It is not connected, its connection has cooled, or it is not an account this key can stream. Call POST /v1/sessions to reconnect, then subscribe again.
INTERNAL
Subscribe rejected: that channel could not be set up because of an unexpected error on our side. The other channels in the same message are answered on their own. Subscribe to it again after a short wait; if it keeps happening, contact support.
STREAM_DROPPED
Sent as an error frame, not as a subscribe rejection: the live stream of one account stopped, so its channels no longer deliver. message names the accountId. Subscribe to that account’s channels again; if that subscribe is rejected with NOT_HOT, call POST /v1/sessions first.

Protocol-level problems arrive as an error frame: { "type": "error", "code": "RATE_LIMIT", "message": "Slow down." }. The connection sends WebSocket ping frames as a heartbeat — reply with pong (most client libraries do this automatically) or you will be disconnected.

What to do with each: NOT_HOT and BROKER_ACCOUNT_NOT_HOT mean reconnect the account with POST /v1/sessions, then subscribe again. STREAM_DROPPED and INTERNAL mean subscribe again after a short wait. RATE_LIMIT means slow down and send the message again. INVALID_MESSAGE, NOT_FOUND, FORBIDDEN and CHANNEL_LIMIT will not change on a retry: fix the message, the account id or the number of channels first.

Rate limits #rate-limits

The API meters requests in four classes, each with its own budget per window. The limits scale with your plan tier. They are fair-use protection, separate from billing — reads and demo orders are never charged (see Plans & limits).

Request classes 4
connect
Opening or reconnecting broker sessions.
order
Placing, modifying, or cancelling orders.
candle
Candle fetches.
read
Everything else — account, position, and trade-history reads.
Check your live budget

Check your live budget any time with GET /v1/rate-limits:

Response headers on every call

You don’t have to poll the endpoint — every API response carries the live budget for the class that request fell into, as standard headers:

RateLimit-Limit
Requests allowed per window for that class.
RateLimit-Remaining
Requests still available in the current window.
RateLimit-Reset
Seconds until that class’s window resets.
RateLimit-Policy
The policy for that class, e.g. 600;w=60;name="order".

The same budget is also sent under the GitHub-style aliases X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, for libraries that expect those names. One difference to note: X-RateLimit-Reset is an absolute UTC epoch-seconds time (when the window resets), whereas RateLimit-Reset above is the number of seconds remaining.

Request id on every response

Every response also carries an X-Request-Id — a correlation id for that request. Send your own X-Request-Id and we echo it back; omit it and we generate one. Quote it when you contact support so we can trace the exact call in our logs.

When you’re rate-limited (429)

Exceed a class’s budget and the call returns 429. The response adds a Retry-After header (seconds to wait) and a body naming the bucket (the request class), its limit, and the retryAfterSeconds until it clears. Back off until the window resets, then retry.

429 Too Many Requests
{
  "error": "rate_limited",
  "message": "Too many order requests for this API key: 600 per minute. Retry in 18s.",
  "bucket": "order",
  "limit": 600,
  "retryAfterSeconds": 18
}

Errors #errors

Every REST error uses the same envelope and a meaningful HTTP status. error is a stable machine code; message is human-readable. Validation failures add a details array naming the offending fields.

Each code below says whether sending the same request again can help, under Retry?. A code marked temporary is safe to retry after a wait; back off between tries, and honour Retry-After when the response carries it. Use the filter, the status and the kind to narrow the list.

error envelope
{
  "error": "BROKER_REJECTED",
  "message": "Broker rejected the order: invalid volume",
  "details": [ /* present only on VALIDATION_ERROR */ ]
}
Common error codes 77

10 of 77 codes shown

Plans & limits #pricing

Tiers, account caps, always-hot, and prices live on the pricing page — the single source of truth for what each plan includes and costs. This section covers only what plans mean for the API: what’s metered, and the responses that gate each tier.

What’s metered Reads — balances, positions, ticks, candles, history — are not metered on any plan. Demo orders are never charged. What a paid plan buys is your account capacity — how many broker accounts you can connect and trade. On Trader that is live accounts (demo is free); on Pro and Enterprise, demo and live both count. A per-account cap, not a per-call quota.
Pro & Enterprise features Bulk operations (/v1/bulk/*) and Copy Trading (/v1/copy/*) require a Pro or Enterprise plan. Choosing a non-mobile connection origin (the web or desktop terminal) is a Pro feature too.
Responses that gate a plan 4

The plan-gating responses you’ll see from the API:

Bulk endpoints return 403 on the Free and Trader plans — they need Pro or Enterprise.
Automatic capacity

Automatic capacity (monthly Trader and Pro plans, off by default, switched on in Billing only) raises your paid capacity by itself when a connect needs it, up to a limit you set. On a card plan the prorated difference is added to your next invoice. On prepaid credit the added account connects at once and is charged from your balance only once it has been used for an hour in total; removed before that, it costs nothing. The API tells you each time:

billing.capacityRaised
The connect that raised it returns billing.capacityRaised (from, to, monthlyFromUsd, monthlyToUsd, chargedNowUsd — 0 on a card plan, where it goes on the next invoice; on prepaid credit chargedAfterUseMinutes says how much use is needed before it is charged) and a readable billing.warning. The field is absent on every other response.
autoCapacity
GET /v1/billing/usage returns autoCapacity: enabled, maxAccounts, and nextAccountRaisesBill with nextAccountCostUsd when the next account you connect will raise the bill — check it before a batch of connects.
details.autoCapacity
If the payment does not go through, or your limit is reached, the connect is refused with the same 402, and details.autoCapacity says why (reason, message, and a payUrl when paying fixes it). Nothing is charged or granted in that case.

For the actual tiers, prices, caps, and overage, see the pricing page. Need more than Pro covers? Talk to us about Enterprise.

Ready to ship?

Grab an API key and make your first POST /v1/sessions in five minutes.

Sign up — free