### Start a broker session Source: https://tickerall.com/docs/python Connect a broker account and get its accountId. Pass terminal_type to choose MOBILE (default) or WEB. WEB requires the broker's webTerminalUrl and a Pro/Enterprise plan. ```python session = client.sessions.start( broker="mt5", server="Exness-MT5Trial14", account=12345678, password="...", # Optional terminal type: "MOBILE" (default) or "WEB". terminal_type="MOBILE", ) # session.account_id, session.is_demo # For WEB, the broker's web-terminal URL is required: # web = client.sessions.start( # broker="mt5", server="YourBroker-Server", account=12345678, # password="...", terminal_type="WEB", # web_terminal_url="https://mt5.yourbroker.com", # ) ``` -------------------------------- ### POST /v1/sessions Source: https://tickerall.com/docs Connect a broker account to start a session and obtain an accountId. ```APIDOC ## POST /v1/sessions ### Description Connect a broker account. We authenticate and warm a live connection, then hand back an accountId — the handle for THIS broker connection. One API key can hold several broker accounts, so the id lives in this response (and in GET /v1/accounts), NOT in the key. Use it in every later /v1/accounts/:id call. Your password is held in memory only while the connection is live, never saved to disk. ### Method POST ### Endpoint /v1/sessions ### Parameters #### Request Body - **broker** (string: "mt4" | "mt5") - Required - Which platform your broker server runs. - **server** (string) - Required - Broker server name, e.g. "Exness-MT5Trial14". - **account** (number | string) - Required - Your numeric broker login — the account number your broker assigns (e.g. 12345678). NOT your TickerAll email. - **password** (string) - Required - Broker (investor or master) password. Used once to authenticate; never persisted. - **terminalType** (string: "MOBILE" | "WEB") - Optional - Which client the connection presents AS — MOBILE (default) or WEB. Both expose the full surface (account, quotes, positions, history). Omit for MOBILE. Choosing WEB (or CLIENT) requires a Pro or Enterprise plan. - **webTerminalUrl** (string) - Optional - The broker’s web-terminal URL, e.g. https://mt5.yourbroker.com. REQUIRED when terminalType is "WEB" — web terminals are per-broker-domain, so the URL must be supplied. Ignored for MOBILE. - **webEndpoint** (string) - Optional - Advanced, optional: an explicit WebSocket endpoint override (e.g. wss://host/path) for the rare broker whose WS host/path differs from the webTerminalUrl derivation. Ignored for MOBILE. ### Response #### Success Response (200) - **accountId** (string) - The account ID for the broker connection. - **isDemo** (boolean) - Whether the account is a demo account. - **status** (string) - Connection status, e.g. "connected". - **expiresAt** (string) - Timestamp when the connection expires. #### Response Example { "accountId": "acc_8Kd3...", "isDemo": true, "status": "connected", "expiresAt": "2026-05-22T18:42:10.000Z" } ### Notes - On the Free tier, only demo broker accounts are accepted — a real-money login is rejected with FREE_TIER_LIVE_REJECTED. - The connection stays warm for a while (see expiresAt). If it cools, calls return BROKER_ACCOUNT_NOT_HOT — just POST /v1/sessions again to reconnect. ``` -------------------------------- ### Install TickerAll with pip Source: https://tickerall.com/docs/python Install the TickerAll package. Requires Python 3.9+ and no native dependencies. ```python pip install tickerall ``` -------------------------------- ### Start broker session with sessions.start Source: https://tickerall.com/docs/typescript Connects a broker account and returns accountId, isDemo, status, and expiresAt. Pass terminalType to select MOBILE (default) or WEB; WEB requires webTerminalUrl and a Pro or Enterprise plan. ```TypeScript const session = await client.sessions.start({ broker: 'mt5', server: 'Exness-MT5Trial14', account: 12345678, password: process.env.MT5_PASSWORD!, // Optional terminal type — 'MOBILE' (default) or 'WEB'. Omit for MOBILE. terminalType: 'MOBILE', }) // session.accountId, session.isDemo // For WEB, the broker's web-terminal URL is required (TypeScript enforces it): // const web = await client.sessions.start({ // broker: 'mt5', server: 'YourBroker-Server', account: 12345678, // password: process.env.MT5_PASSWORD!, // terminalType: 'WEB', webTerminalUrl: 'https://mt5.yourbroker.com', // }) ``` -------------------------------- ### Keep a session alive Source: https://tickerall.com/docs/python Start a session and keep it alive. Credentials are cached in RAM for transparent re-arm. ```python session = client.sessions.keep_alive( broker="mt5", server="Exness-MT5Trial14", account=12345678, password="...", ) ``` -------------------------------- ### copy.createSet(input) Source: https://tickerall.com/docs/typescript Creates a copy set with a master account and optional followers, each with its own sizing and risk configuration. Arm the set to start mirroring. ```APIDOC ## copy.createSet(input) ### Description Creates a copy set — a master account plus optional followers, each with its own sizing + risk config. Arm it to start mirroring. ### Method copy.createSet ### Endpoint client.copy.createSet(input) ### Parameters #### Request Body - **name** (string) - Required - Name of the copy set. - **masterAccountId** (string) - Required - ID of the master account. - **followers** (array) - Optional - List of follower configurations. - **followerAccountId** (string) - Required - ID of the follower account. - **sizingMethod** (string) - Optional - Sizing method (e.g., 'proportional', 'multiplier'). - **sizingValue** (number) - Optional - Sizing value (e.g., 0.5 for multiplier). ### Request Example ```typescript const set = await client.copy.createSet({ name: 'My desk', masterAccountId: 'acc_master', followers: [ { followerAccountId: 'acc_1', sizingMethod: 'proportional' }, { followerAccountId: 'acc_2', sizingMethod: 'multiplier', sizingValue: 0.5 }, ], }) ``` ### Response #### Success Response - **set** (object) - The created copy set object. #### Response Example ```typescript // set object ``` ### Notes - After creation, use `client.copy.arm(set.id)` to start mirroring. - Use `client.copy.pause` to pause mirroring. ``` -------------------------------- ### Create and arm a copy set with client.copy.create_set Source: https://tickerall.com/docs/python Creates a copy set with a master account and optional followers, each with sizing and risk config. Arm it to start mirroring; pause with client.copy.pause. The returned set id is used in subsequent operations. ```python s = client.copy.create_set( "My desk", "acc_master", followers=[ {"follower_account_id": "acc_1", "sizing_method": "proportional"}, {"follower_account_id": "acc_2", "sizing_method": "multiplier", "sizing_value": 0.5}, ], ) client.copy.arm(s.id) # start mirroring (pause with client.copy.pause) ``` -------------------------------- ### Create a copy set and arm it Source: https://tickerall.com/docs/typescript Creates a copy set with a master account and two followers, one using proportional sizing and the other using a multiplier. Arms the set to start mirroring; pause with client.copy.pause. ```TypeScript const set = await client.copy.createSet({ name: 'My desk', masterAccountId: 'acc_master', followers: [ { followerAccountId: 'acc_1', sizingMethod: 'proportional' }, // by equity ratio { followerAccountId: 'acc_2', sizingMethod: 'multiplier', sizingValue: 0.5 }, ], }) await client.copy.arm(set.id) // start mirroring (pause with client.copy.pause) ``` -------------------------------- ### Start session and keep alive with sessions.keepAlive Source: https://tickerall.com/docs/typescript Starts a session and keeps it alive by caching credentials in RAM for transparent re-arm. Credentials are never persisted. ```TypeScript const session = await client.sessions.keepAlive({ broker: 'mt5', server: 'Exness-MT5Trial14', account: 12345678, password: '...', }) // later calls re-arm automatically if the account went cold ``` -------------------------------- ### Get account detail with accounts.get(account_id) Source: https://tickerall.com/docs/python Fetches a full snapshot including balance, leverage, and open positions when online. Iterates over positions to print ticket, symbol, side, volume, and profit. ```Python detail = client.accounts.get(account_id) for p in detail.positions: print(p.ticket, p.symbol, p.side, p.volume, p.profit) ``` -------------------------------- ### Install @tickerall/sdk with npm Source: https://tickerall.com/docs/typescript Adds the @tickerall/sdk package. Requires Node 18+ / Python 3.9+; no native dependencies. ```bash npm install @tickerall/sdk ``` -------------------------------- ### sessions.keep_alive(params) Source: https://tickerall.com/docs/python Starts a session and keeps it alive by caching credentials in RAM for transparent re-arm. ```APIDOC ## sessions.keep_alive(params) ### Description Starts a session and keeps it alive by caching credentials in RAM for transparent re-arm. ### Method POST ### Endpoint /sessions/keep_alive ### Parameters #### Request Body - **broker** (string) - Required - Broker identifier. - **server** (string) - Required - Broker server name. - **account** (number) - Required - Account number. - **password** (string) - Required - Account password. ### Request Example ```python session = client.sessions.keep_alive( broker="mt5", server="Exness-MT5Trial14", account=12345678, password="...", ) ``` ### Response Returns a session object with account_id, is_demo, status, expires_at. ``` -------------------------------- ### sessions.keepAlive(params) Source: https://tickerall.com/docs/typescript Starts a session and keeps it alive by caching credentials in RAM for transparent re-arm when the account goes cold. ```APIDOC ## sessions.keepAlive(params) ### Description Starts a session and keeps it alive by caching credentials in RAM for transparent re-arm when the account goes cold. ### Method sessions.keepAlive ### Parameters - **broker** (string) - Required - Broker identifier, e.g., 'mt5'. - **server** (string) - Required - Broker server name. - **account** (number) - Required - Account number. - **password** (string) - Required - Account password. ### Request Example ```typescript const session = await client.sessions.keepAlive({ broker: 'mt5', server: 'Exness-MT5Trial14', account: 12345678, password: '...', }) // later calls re-arm automatically if the account went cold ``` ### Response Returns a session object (same as sessions.start). ``` -------------------------------- ### GET /v1/accounts/:id Source: https://tickerall.com/docs Fetches live account info including balance, equity, margin, leverage, and current open positions. ```APIDOC ## GET /v1/accounts/:id ### Description Live account info — balance, equity, margin, leverage — plus the current open positions. ### Method GET ### Endpoint /v1/accounts/:id ### Parameters #### Path Parameters - **id** (string) - Required - accountId. ### Response #### Success Response (200) - **id** (string) - Account ID. - **broker** (string) - Broker type. - **server** (string) - Server name. - **accountNumber** (string) - Account number masked. - **isDemo** (boolean) - Whether demo account. - **status** (string) - Connection status (e.g., "online"). - **account** (object) - Account details. - **name** (string) - Account name. - **accountType** (string) - Account type (e.g., demo). - **leverage** (number) - Leverage value. - **balance** (number) - Account balance. - **currency** (string) - Currency code. - **equity** (number) - Equity value. - **margin** (number) - Margin value. - **freeMargin** (number) - Free margin value. - **marginLevel** (number) - Margin level. - **positions** (array) - List of open positions. - **ticket** (number) - Position ticket. - **symbol** (string) - Trading symbol. - **side** (string) - Side (BUY/SELL). - **volume** (number) - Volume. - **entryPrice** (number) - Entry price. - **stopLoss** (number) - Stop loss price. - **takeProfit** (number) - Take profit price. - **currentPrice** (number) - Current price. - **profit** (number) - Profit. - **swap** (number) - Swap. - **commission** (number) - Commission. - **comment** (string) - Comment. - **magic** (number) - Magic number. - **openTime** (string) - Open time. #### Response Example ```json { "id": "acc_8Kd3...", "broker": "mt5", "server": "Exness-MT5Trial14", "accountNumber": "****5678", "isDemo": true, "status": "online", "account": { "name": "Demo Account 12345678", "accountType": "demo", "leverage": 500, "balance": 9871.42, "currency": "USD", "equity": 9863.10, "margin": 142.50, "freeMargin": 9720.60, "marginLevel": 6921.5 }, "positions": [ { "ticket": 4072808150, "symbol": "BTCUSD", "side": "BUY", "volume": 0.10, "entryPrice": 77512.73, "stopLoss": 71000, "takeProfit": 84000, "currentPrice": 77640.10, "profit": 12.74, "swap": 0, "commission": 0, "comment": "my-strategy", "magic": 0, "openTime": "2026-05-22T17:55:03.000Z" } ] } ``` ``` -------------------------------- ### Manage followers with client.copy.add_follower, update_follower, remove_follower Source: https://tickerall.com/docs/python Attach or tune a follower with sizing, lot clamps, symbol allow/block, reverse copy, slippage guard, and per-broker symbol overrides. The example shows adding a follower with reverse and max slippage, updating a follower's max lot and symbol block, and removing a follower. ```python client.copy.add_follower(s.id, "acc_3", config={"reverse": True, "max_slippage_pips": 3}) client.copy.update_follower(s.id, "follower_id", {"max_lot": 1, "symbol_block": ["XAUUSD"]}) client.copy.remove_follower(s.id, "follower_id") ``` -------------------------------- ### GET /v1/accounts Source: https://tickerall.com/docs Lists every broker account attached to your API key, with connection state. ```APIDOC ## GET /v1/accounts ### Description List every broker account attached to your API key, with connection state. ### Method GET ### Endpoint /v1/accounts ### Response #### Success Response (200) - **id** (string) - Account ID. - **broker** (string) - Broker type (e.g., mt5). - **server** (string) - Server name. - **accountNumber** (string) - Account number masked to last 4 digits. - **isDemo** (boolean) - Whether the account is a demo account. - **status** (string) - Connection status (e.g., CONNECTED). - **hot** (boolean) - Whether the connection is hot. - **lastHotAt** (string) - Timestamp of last hot connection. - **createdAt** (string) - Account creation timestamp. #### Response Example ```json [ { "id": "acc_8Kd3...", "broker": "mt5", "server": "Exness-MT5Trial14", "accountNumber": "****5678", "isDemo": true, "status": "CONNECTED", "hot": true, "lastHotAt": "2026-05-22T18:30:01.000Z", "createdAt": "2026-05-20T09:11:55.000Z" } ] ``` ``` -------------------------------- ### accounts.get(accountId) - Get account snapshot Source: https://tickerall.com/docs/typescript Returns a full snapshot including balance/leverage info and open positions when online. Iterates over positions to log ticket, symbol, side, volume, and profit. ```TypeScript const detail = await client.accounts.get(accountId) for (const p of detail.positions) { console.log(p.ticket, p.symbol, p.side, p.volume, p.profit) } ``` -------------------------------- ### GET /v1/accounts/{accountId} Source: https://tickerall.com/docs Reads account state including balance, equity, and open positions using the accountId. ```APIDOC ## GET /v1/accounts/{accountId} ### Description Read account state (balance, equity, open positions) using the specified `accountId`. ### Method GET ### Endpoint https://api.tickerall.com/v1/accounts/{accountId} ### Parameters #### Path Parameters - **accountId** (string) - Required - The ID of the account to read. ### Response #### Success Response (200) - **status** (string) - Account status, e.g., "online" - **account** (object) - Details including balance - **account.balance** (number) - Account balance - **positions** (array) - List of open positions #### Response Example ```json { "status": "online", "account": { "balance": 9871.42, ... }, "positions": [...] } ``` ``` -------------------------------- ### Get tradeable symbols with accounts.symbols(account_id) Source: https://tickerall.com/docs/python Returns the broker-native symbol names this account can trade. ```Python symbols = client.accounts.symbols(account_id) ``` -------------------------------- ### Read account state with GET /v1/accounts/{accountId} Source: https://tickerall.com/docs Reads balance, equity, and open positions for a specific account using its accountId. The response includes account status and positions array. ```curl curl https://api.tickerall.com/v1/accounts/acc_8Kd3... \ -H "Authorization: Bearer cf_api_xxxx" # => { "status": "online", "account": { "balance": 9871.42, ... }, "positions": [...] } ``` -------------------------------- ### Get pending re-arm sessions Source: https://tickerall.com/docs/python Return always-hot accounts that currently have no live connection and need a credentials refresh. ```python pending = client.sessions.pending_rearm() ``` -------------------------------- ### GET /v1/bulk/accounts Source: https://tickerall.com/docs Reads live state for many accounts in one call (Pro/Enterprise). Returns account statuses and a summary. ```APIDOC ## GET /v1/bulk/accounts ### Description Read live state for multiple accounts in a single call (Pro/Enterprise). Returns each account's status and a summary. ### Method GET ### Endpoint https://api.tickerall.com/v1/bulk/accounts ### Parameters #### Query Parameters - **ids** (string) - Required - Comma-separated list of account IDs, e.g., "acc_8Kd3...,acc_9Lm4..." ### Response #### Success Response (200) - **accounts** (array) - List of account states - **accounts[].id** (string) - Account ID - **accounts[].status** (string) - Account status, e.g., "online" - **summary** (object) - Summary counts - **summary.total** (number) - Total number of accounts - **summary.online** (number) - Number of online accounts - **summary.offline** (number) - Number of offline accounts #### Response Example ```json { "accounts": [ { "id": "acc_8Kd3...", "status": "online", ... }, ... ], "summary": { "total": 2, "online": 2, "offline": 0 } } ``` ``` -------------------------------- ### GET /v1/accounts/:id - Live account info response Source: https://tickerall.com/docs Response for fetching live account info including balance, equity, margin, leverage, and open positions. If the connection has cooled, status is "offline" with a hint instead of live data. Money fields may be null on MT4 accounts that haven't pushed a balance frame yet. ```json { "id": "acc_8Kd3...", "broker": "mt5", "server": "Exness-MT5Trial14", "accountNumber": "****5678", "isDemo": true, "status": "online", "account": { "name": "Demo Account 12345678", "accountType": "demo", "leverage": 500, "balance": 9871.42, "currency": "USD", "equity": 9863.10, "margin": 142.50, "freeMargin": 9720.60, "marginLevel": 6921.5 }, "positions": [ { "ticket": 4072808150, "symbol": "BTCUSD", "side": "BUY", "volume": 0.10, "entryPrice": 77512.73, "stopLoss": 71000, "takeProfit": 84000, "currentPrice": 77640.10, "profit": 12.74, "swap": 0, "commission": 0, "comment": "my-strategy", "magic": 0, "openTime": "2026-05-22T17:55:03.000Z" } ] } ``` -------------------------------- ### Get closed-trade history with optional filters Source: https://tickerall.com/docs/python Fetches closed round-trip trades from the broker's recent deal window plus any closes seen live this session. Optionally filter by symbol, from/to dates, or limit. Each trade includes ticket, side, volume, open_price, close_price, profit, and more. ```Python trades = client.history.get(account_id, symbol="BTCUSD", limit=100) # each: ticket, side, volume, open_price, close_price, profit, ... ``` -------------------------------- ### Get symbol specs with accounts.symbol_specs(account_id) Source: https://tickerall.com/docs/python Retrieves per-symbol volume specs (min/max/step), trade mode, and base, profit, and margin currencies. Use to validate order sizes and denote instruments in their real currency (MT5 only). ```Python specs = client.accounts.symbol_specs(account_id) # each: name, volume_min, volume_max, volume_step, spec_source, trade_mode, base_currency, profit_currency, margin_currency ``` -------------------------------- ### Create Tickerall client Source: https://tickerall.com/docs/python Create a client with an API key. Optional parameters include base_url, stream_url, timeout, user_agent, and on_rearm. Can be used as a context manager. ```python from tickerall import Tickerall client = Tickerall(api_key="cf_live_...") # base_url=..., stream_url=..., timeout=30.0, user_agent=... optional. # Also usable as a context manager: with Tickerall(api_key="cf_live_...") as client: ... ``` -------------------------------- ### new Tickerall(config) Source: https://tickerall.com/docs/python Creates a TickerAll client instance. Only apiKey is required; baseUrl, streamUrl, timeout, userAgent, and onRearm are optional. ```APIDOC ## new Tickerall(config) ### Description Creates a TickerAll client instance. Only apiKey is required; baseUrl, streamUrl, timeout, userAgent, and onRearm are optional. ### Method Constructor ### Parameters - **api_key** (string) - Required - Your TickerAll API key. - **base_url** (string) - Optional - Base URL for REST API. - **stream_url** (string) - Optional - WebSocket stream URL. - **timeout** (number) - Optional - Request timeout in seconds. - **user_agent** (string) - Optional - User agent string. - **on_rearm** (function) - Optional - Callback for re-arm events. ### Request Example ```python from tickerall import Tickerall client = Tickerall(api_key="cf_live_...") # base_url=..., stream_url=..., timeout=30.0, user_agent=... optional. # Also usable as a context manager: with Tickerall(api_key="cf_live_...") as client: ... ``` ### Response Returns a Tickerall client instance. ``` -------------------------------- ### accounts.symbols(accountId) - Get tradeable symbols Source: https://tickerall.com/docs/typescript Returns the broker-native symbol names this account can trade. ```TypeScript const symbols = await client.accounts.symbols(accountId) ``` -------------------------------- ### sessions.start(params) Source: https://tickerall.com/docs/python Connects a broker account and returns its accountId, isDemo, status, and expiresAt. Pass terminalType to pick the terminal type (MOBILE default, or WEB). ```APIDOC ## sessions.start(params) ### Description Connects a broker account and returns its accountId, isDemo, status, and expiresAt. Pass terminalType to pick the terminal type (MOBILE default, or WEB). ### Method POST ### Endpoint /sessions/start ### Parameters #### Request Body - **broker** (string) - Required - Broker identifier (e.g., "mt5"). - **server** (string) - Required - Broker server name. - **account** (number) - Required - Account number. - **password** (string) - Required - Account password. - **terminal_type** (string) - Optional - Terminal type: "MOBILE" (default) or "WEB". - **web_terminal_url** (string) - Optional - Required if terminal_type is "WEB". ### Request Example ```python session = client.sessions.start( broker="mt5", server="Exness-MT5Trial14", account=12345678, password="...", terminal_type="MOBILE", ) ``` ### Response #### Success Response (200) - **account_id** (string) - The account ID. - **is_demo** (boolean) - Whether the account is a demo account. - **status** (string) - Session status. - **expires_at** (string) - Session expiration timestamp. #### Response Example ```json { "account_id": "...", "is_demo": true, "status": "active", "expires_at": "2025-01-01T00:00:00Z" } ``` ``` -------------------------------- ### Place orders on many accounts with bulk.place Source: https://tickerall.com/docs/python Place an order on 1-50 accounts in one request. Each entry mirrors an orders.place body plus its target accountId. The response provides a summary (total/filled/failed) and per-account results (accountId, status, ticket, price, code, reason). ```Python res = client.bulk.place([ {"accountId": "acc_8Kd3...", "symbol": "BTCUSD", "side": "BUY", "volume": 0.1}, {"accountId": "acc_9Lm4...", "type": "limit", "symbol": "BTCUSD", "side": "BUY", "volume": 0.1, "price": 60000}, ]) # res.summary -> total / filled / failed # res.results[] -> accountId, status, ticket, price, code, reason ``` -------------------------------- ### Create Tickerall client with apiKey Source: https://tickerall.com/docs/typescript Creates a client instance. Only apiKey is required; baseUrl, streamUrl, timeout, userAgent, and onRearm are optional. ```TypeScript import { Tickerall } from '@tickerall/sdk' const client = new Tickerall({ apiKey: process.env.TICKERALL_API_KEY!, // baseUrl?: 'https://api.tickerall.com' // streamUrl?: 'wss://api.tickerall.com/v1/stream' // timeout?: 30_000 (ms, per request) }) ``` -------------------------------- ### Place a market order with SL/TP (orders.place) Source: https://tickerall.com/docs/python Places a market order for BTCUSD with a stop loss and take profit. The response includes order.ticket and order.status. ```python order = client.orders.place( account_id, type="market", symbol="BTCUSD", side="BUY", volume=0.1, stop_loss=58000, take_profit=72000, ) # order.ticket, order.status ``` -------------------------------- ### Queue-and-replay for price-insensitive orders Source: https://tickerall.com/docs/python Opt into queue-and-replay for pending orders or SL/TP edits. The call is held and retried with the stable key until connectivity returns, up to queue_max_s seconds. ```python client.orders.place( account_id, type="limit", symbol="BTCUSD", side="BUY", volume=0.1, price=60000, queue_if_reconnecting=True, queue_max_s=60.0, ) ``` -------------------------------- ### Execute across accounts with POST /v1/bulk/orders Source: https://tickerall.com/docs Places the same order across multiple accounts in one call. Requires a Pro or Enterprise plan. Each account's outcome is reported separately, and an Idempotency-Key header is required. Also shows how to read live state for many accounts in one call. ```curl # Place the same 0.10-lot BUY across TWO accounts in one call (Pro/Enterprise) curl -X POST https://api.tickerall.com/v1/bulk/orders \ -H "Authorization: Bearer cf_api_xxxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "orders": [ { "accountId": "acc_8Kd3...", "symbol": "BTCUSD", "side": "BUY", "volume": 0.10 }, { "accountId": "acc_9Lm4...", "symbol": "BTCUSD", "side": "BUY", "volume": 0.10 } ] }' # => { "results": [ { "accountId": "acc_8Kd3...", "status": "filled", ... }, ... ], # "summary": { "total": 2, "filled": 2, "failed": 0 } } # Read live state for many accounts in one call curl "https://api.tickerall.com/v1/bulk/accounts?ids=acc_8Kd3...,acc_9Lm4..." \ -H "Authorization: Bearer cf_api_xxxx" # => { "accounts": [ { "id": "acc_8Kd3...", "status": "online", ... }, ... ], # "summary": { "total": 2, "online": 2, "offline": 0 } } ``` -------------------------------- ### POST /v1/sessions Source: https://tickerall.com/docs Creates a broker session by sending broker credentials. Authenticates against the broker and returns an accountId. The password is held in memory only while the connection is live. ```APIDOC ## POST /v1/sessions ### Description Connect a broker account by sending broker credentials. Authenticates against the broker and returns an `accountId`. The password is held in memory only while the connection is live, never saved to disk. ### Method POST ### Endpoint https://api.tickerall.com/v1/sessions ### Parameters #### Request Body - **broker** (string) - Required - Broker name (e.g., "mt5") - **server** (string) - Required - Broker server name (e.g., "Exness-MT5Trial14") - **account** (number) - Required - Broker account number - **password** (string) - Required - Broker password - **terminalType** (string) - Optional - Terminal type: "MOBILE" (default), "WEB", or "CLIENT". WEB/CLIENT require Pro or Enterprise. ### Request Example ```json { "broker": "mt5", "server": "Exness-MT5Trial14", "account": 12345678, "password": "your-broker-password", "terminalType": "MOBILE" } ``` ### Response #### Success Response (200) - **accountId** (string) - The ID of the connected account, e.g., "acc_8Kd3..." - **isDemo** (boolean) - Whether the account is a demo account - **status** (string) - Connection status, e.g., "connected" #### Response Example ```json { "accountId": "acc_8Kd3...", "isDemo": true, "status": "connected", ... } ``` ``` -------------------------------- ### Query stream state, wait, unsubscribe, and close Source: https://tickerall.com/docs/python Shows how to inspect the stream connection state, wait until connected, unsubscribe from tick subscriptions, and close the stream. The state can be 'connecting', 'open', 'reconnecting', or 'closed'. ```Python stream.get_state() # connecting | open | reconnecting | closed stream.is_connected() stream.wait_until_connected(30.0) stream.unsubscribe_ticks(account_id, ["ETHUSD"]) stream.close() ``` -------------------------------- ### List all accounts with accounts.list() Source: https://tickerall.com/docs/python Retrieves all broker accounts linked to your API key. ```Python accounts = client.accounts.list() ``` -------------------------------- ### GET /v1/accounts - List accounts response Source: https://tickerall.com/docs Response for listing all broker accounts attached to the API key. The accountNumber is masked to the last 4 digits. A hot=false status indicates the connection has cooled and requires POST /v1/sessions to re-warm. ```json [ { "id": "acc_8Kd3...", "broker": "mt5", "server": "Exness-MT5Trial14", "accountNumber": "****5678", "isDemo": true, "status": "CONNECTED", "hot": true, "lastHotAt": "2026-05-22T18:30:01.000Z", "createdAt": "2026-05-20T09:11:55.000Z" } ] ``` -------------------------------- ### Place and close an order with POST /v1/accounts/{accountId}/orders Source: https://tickerall.com/docs Places a market order and closes it. Requires a unique Idempotency-Key header to prevent duplicate actions on retry. The close call uses the ticket from the open response. ```curl # Open a 0.10-lot BUY market order (note the unique Idempotency-Key) curl -X POST https://api.tickerall.com/v1/accounts/acc_8Kd3.../orders \ -H "Authorization: Bearer cf_api_xxxx" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "type": "market", "symbol": "BTCUSD", "side": "BUY", "volume": 0.10, "stopLoss": 71000, "takeProfit": 84000 }' # => { "ticket": 4072808150, "status": "open", ... } # Close it (ticket from the response above) curl -X DELETE https://api.tickerall.com/v1/accounts/acc_8Kd3.../positions/4072808150 \ -H "Authorization: Bearer cf_api_xxxx" \ -H "Idempotency-Key: $(uuidgen)" # => { "ticket": 4072808150, "closed": true, ... } ``` -------------------------------- ### accounts.symbolSpecs(accountId) - Get volume specs and currencies Source: https://tickerall.com/docs/typescript Returns per-symbol volume specs (min/max/step), trade mode, and base, profit (quote), and margin currencies. Use to validate order sizes and denote instruments in their real currency (MT5 only). ```TypeScript const specs = await client.accounts.symbolSpecs(accountId) // each: { name, volumeMin, volumeMax, volumeStep, specSource, tradeMode, baseCurrency, profitCurrency, marginCurrency } ``` -------------------------------- ### Queue-and-replay for price-insensitive orders Source: https://tickerall.com/docs/typescript Opt into queue-and-replay for pending orders or SL/TP edits. The call is held and retried with the stable key until connectivity returns, up to queueMaxMs. ```TypeScript await client.orders.place( accountId, { type: 'limit', symbol: 'BTCUSD', side: 'BUY', volume: 0.1, price: 60000 }, { queueIfReconnecting: true, queueMaxMs: 60_000 }, ) ``` -------------------------------- ### Manage followers with addFollower, updateFollower, removeFollower Source: https://tickerall.com/docs/typescript Shows how to add a follower with reverse copy and slippage guard, update a follower's max lot and symbol block, and remove a follower. ```TypeScript await client.copy.addFollower(set.id, { followerAccountId: 'acc_3', reverse: true, maxSlippagePips: 3 }) await client.copy.updateFollower(set.id, 'follower_id', { maxLot: 1, symbolBlock: ['XAUUSD'] }) await client.copy.removeFollower(set.id, 'follower_id') ``` -------------------------------- ### stream.connect() Source: https://tickerall.com/docs/typescript Open the realtime WebSocket stream, register callbacks, and subscribe to topics. The stream heartbeats, reconnects with backoff, and re-subscribes automatically. ```APIDOC ## stream.connect() ### Description Open the stream, register callbacks, and subscribe to topics. ### Method CONNECT ### Endpoint stream.connect() ### Parameters None ### Request Example ```json const stream = await client.stream.connect() stream.on('tick', (e) => console.log(e.symbol, e.bid, e.ask, e.timestamp)) stream.on('position', (e) => console.log(e.event, e.position.ticket, e.position.profit)) stream.on('account', (e) => console.log(e.snapshot.balance)) stream.on('reconnect', (e) => console.log('reconnecting', e.attempt)) await stream.subscribeTicks(accountId, ['BTCUSD', 'ETHUSD']) await stream.subscribePositions(accountId) await stream.subscribeAccount(accountId) ``` ### Response #### Success Response (200) - **stream** (object) - The connected stream instance with event registration and subscription methods. #### Response Example ```json // stream object with on(), subscribeTicks(), subscribePositions(), subscribeAccount() ``` ``` -------------------------------- ### Connect to realtime stream and subscribe to topics Source: https://tickerall.com/docs/python Opens the self-healing WebSocket stream, registers callbacks for ticks, positions, account snapshots, and reconnects, then subscribes to the desired topics. The stream heartbeats, reconnects with backoff, and re-subscribes automatically. ```Python stream = client.stream.connect() stream.on("tick", lambda e: print(e.symbol, e.bid, e.ask, e.timestamp)) stream.on("position", lambda e: print(e.event, e.position.ticket, e.position.profit)) stream.on("account", lambda e: print(e.snapshot.balance)) stream.on("reconnect", lambda e: print("reconnecting", e["attempt"])) stream.subscribe_ticks(account_id, ["BTCUSD", "ETHUSD"]) stream.subscribe_positions(account_id) stream.subscribe_account(account_id) ``` -------------------------------- ### orders.place(account_id, params) Source: https://tickerall.com/docs/python Places a market, limit, or stop order. Requires price for limit and stop orders. Supports stop-loss and take-profit parameters. ```APIDOC ## orders.place(account_id, params) ### Description Place a market / limit / stop order. price is required for limit & stop. ### Method orders.place ### Endpoint orders.place(account_id, params) ### Parameters #### Path Parameters - **account_id** (string) - Required - The account identifier. #### Request Body - **type** (string) - Required - Order type: "market", "limit", or "stop". - **symbol** (string) - Required - Trading symbol (e.g., "BTCUSD"). - **side** (string) - Required - Order side: "BUY" or "SELL". - **volume** (number) - Required - Order volume. - **price** (number) - Optional - Required for limit and stop orders. - **stop_loss** (number) - Optional - Stop-loss price. - **take_profit** (number) - Optional - Take-profit price. ### Request Example ```python order = client.orders.place( account_id, type="market", symbol="BTCUSD", side="BUY", volume=0.1, stop_loss=58000, take_profit=72000, ) ``` ### Response #### Success Response (200) - **ticket** (string) - Order ticket identifier. - **status** (string) - Order status. #### Response Example ```python # order.ticket, order.status ``` ``` -------------------------------- ### POST /v1/accounts/{accountId}/orders Source: https://tickerall.com/docs Places a new order (e.g., market order) on the specified account. Requires an Idempotency-Key header. ```APIDOC ## POST /v1/accounts/{accountId}/orders ### Description Place a new order (e.g., market order) on the specified account. State-changing calls require an `Idempotency-Key` header to prevent duplicate executions. ### Method POST ### Endpoint https://api.tickerall.com/v1/accounts/{accountId}/orders ### Parameters #### Path Parameters - **accountId** (string) - Required - The ID of the account to place the order on. #### Headers - **Idempotency-Key** (string) - Required - A unique string per logical action to prevent double-firing on retries. #### Request Body - **type** (string) - Required - Order type, e.g., "market" - **symbol** (string) - Required - Trading symbol, e.g., "BTCUSD" - **side** (string) - Required - Order side: "BUY" or "SELL" - **volume** (number) - Required - Order volume in lots, e.g., 0.10 - **stopLoss** (number) - Optional - Stop loss price - **takeProfit** (number) - Optional - Take profit price ### Request Example ```json { "type": "market", "symbol": "BTCUSD", "side": "BUY", "volume": 0.10, "stopLoss": 71000, "takeProfit": 84000 } ``` ### Response #### Success Response (200) - **ticket** (number) - Order ticket number - **status** (string) - Order status, e.g., "open" #### Response Example ```json { "ticket": 4072808150, "status": "open", ... } ``` ``` -------------------------------- ### Migrate terminal type with accounts.migrate(account_id, to) Source: https://tickerall.com/docs/python Switches the terminal type (MOBILE↔WEB) on a live account. Preserves open positions/orders/balance, runs only when idle, and returns status "noop" if already on the target type. ```Python res = client.accounts.migrate(account_id, "WEB") # res.terminal_type, res.status ("noop" | "migrated") ``` -------------------------------- ### accounts.migrate(account_id, to) Source: https://tickerall.com/docs/python Switches the terminal type (MOBILE↔WEB) on a live account, preserving open positions and balance. ```APIDOC ## accounts.migrate(account_id, to) ### Description Switches the terminal type (MOBILE↔WEB) on a live account. Open positions/orders/balance are preserved (they live broker-side). The switch is zero-gap — the new transport is warmed before the old is dropped — and runs only when the account is idle. Returns status:"noop" if already on `to`. ### Method POST ### Endpoint /accounts/{account_id}/migrate ### Parameters #### Path Parameters - **account_id** (string) - Required - The unique identifier of the account. #### Request Body - **to** (string) - Required - The target terminal type: "MOBILE" or "WEB". ### Request Example ```python res = client.accounts.migrate(account_id, "WEB") # res.terminal_type, res.status ("noop" | "migrated") ``` ### Response #### Success Response (200) - **terminal_type** (string) - The terminal type after migration (e.g., "WEB") - **status** (string) - Migration status: "noop" or "migrated" #### Response Example ```json { "terminal_type": "WEB", "status": "migrated" } ``` ```