API reference
200 operations, generated from the OpenAPI document the services export (version 0.1.0). Each one has curl, Python and TypeScript samples, and Try it against the sandbox.
The API is at https://api.tickwire.io. Authenticate with auth-token (on /users/current/…),
X-API-Key (everywhere else) or Authorization: Bearer; the agent API takes
X-Tickwire-Agent-Key. See Authentication. Errors share one
envelope; see Errors.
- OpenAPI 3.1:
/openapi.json - Postman collection (imports into Bruno and Insomnia too):
tickwire.postman_collection.json - For LLMs:
/llms.txtand/llms-full.txt
Account REST API (/users/current)
The /users/current/… REST API: provisioning, account state, market data, history and trading. Code already written for this API style needs only a new base URL and key. Works for MT4 and MT5.
Accounts and provisioning
Account state
| GET | /users/current/accounts/{account_id}/account-information | Account Information |
| GET | /users/current/accounts/{account_id}/capabilities | Capabilities |
| GET | /users/current/accounts/{account_id}/orders | Orders |
| GET | /users/current/accounts/{account_id}/orders/{order_id} | Order |
| GET | /users/current/accounts/{account_id}/positions | Positions |
| GET | /users/current/accounts/{account_id}/positions/{position_id} | Position |
| GET | /users/current/accounts/{account_id}/server-time | Server Time |
Market data
| GET | /users/current/accounts/{account_id}/historical-market-data/symbols/{symbol}/ticks | Historical Ticks |
| GET | /users/current/accounts/{account_id}/historical-market-data/symbols/{symbol}/timeframes/{timeframe}/candles | Historical Candles |
| GET | /users/current/accounts/{account_id}/symbols | Symbols |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-book | Current Book |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-candles/{timeframe} | Current Candle |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-price | Current Price |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-tick | Current Tick |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/specification | Specification |
| POST | /users/current/accounts/{account_id}/symbols/{symbol}/unsubscribe | Unsubscribe |
History
| GET | /users/current/accounts/{account_id}/history-deals/position/{position_id} | History Deals By Position |
| GET | /users/current/accounts/{account_id}/history-deals/ticket/{ticket} | History Deals By Ticket |
| GET | /users/current/accounts/{account_id}/history-deals/time/{start_time}/{end_time} | History Deals By Time |
| GET | /users/current/accounts/{account_id}/history-orders/position/{position_id} | History Orders By Position |
| GET | /users/current/accounts/{account_id}/history-orders/ticket/{ticket} | History Orders By Ticket |
| GET | /users/current/accounts/{account_id}/history-orders/time/{start_time}/{end_time} | History Orders By Time |
Trading
| POST | /users/current/accounts/{account_id}/calculate-margin | Calculate Margin |
| POST | /users/current/accounts/{account_id}/trade | Trade |
| POST | /users/current/accounts/{account_id}/trade/check | Trade Check |
| GET | /users/current/accounts/{account_id}/trailing-stop-losses | List Trailing |
| DELETE | /users/current/accounts/{account_id}/trailing-stop-losses/{position_id} | Delete Trailing |
Health, snapshot and audit trail
| GET | /users/current/accounts/{account_id}/audit | Account Audit |
| GET | /users/current/accounts/{account_id}/health | Account Health |
| GET | /users/current/accounts/{account_id}/snapshot | Account Snapshot |
Tokens and discovery
| POST | /users/current/narrow-down-auth-token | Narrow Down |
| GET | /users/current/regions | Regions |
| GET | /users/current/servers/mt-client-api | Client Api Domain |
| GET | /users/current/tokens | List Tokens |
| POST | /users/current/tokens | Create Token |
| GET | /users/current/tokens/{token_id} | Get Token |
| PATCH | /users/current/tokens/{token_id} | Patch Token |
| DELETE | /users/current/tokens/{token_id} | Revoke Token |
| GET | /v1/access-rule-manifest | Access Rule Manifest |
| GET | /v1/known-mt-servers/{version}/search | Search Servers |
Terminal routes and batch orders
Per-account terminal routes on /mt4/{id}/… and /mt5/{id}/…, and batch orders on /v1/orders.
MT5 terminal
| GET | /mt5/{account_id}/AccountInfo | GET /mt5/{account_id}/AccountInfo |
| GET | /mt5/{account_id}/AccountSummary | GET /mt5/{account_id}/AccountSummary |
| POST | /mt5/{account_id}/CloseAll | POST /mt5/{account_id}/CloseAll |
| GET | /mt5/{account_id}/OpenedOrders | GET /mt5/{account_id}/OpenedOrders |
| GET | /mt5/{account_id}/OrderCalcMargin | GET /mt5/{account_id}/OrderCalcMargin |
| GET | /mt5/{account_id}/OrderCalcProfit | GET /mt5/{account_id}/OrderCalcProfit |
| POST | /mt5/{account_id}/OrderClose | POST /mt5/{account_id}/OrderClose |
| GET | /mt5/{account_id}/OrderHistory | GET /mt5/{account_id}/OrderHistory |
| POST | /mt5/{account_id}/OrderModify | POST /mt5/{account_id}/OrderModify |
| POST | /mt5/{account_id}/OrderSend | POST /mt5/{account_id}/OrderSend |
| GET | /mt5/{account_id}/PositionHistory | GET /mt5/{account_id}/PositionHistory |
| GET | /mt5/{account_id}/PriceHistory | GET /mt5/{account_id}/PriceHistory |
| GET | /mt5/{account_id}/ServerTimezone | GET /mt5/{account_id}/ServerTimezone |
| GET | /mt5/{account_id}/SymbolInfo | GET /mt5/{account_id}/SymbolInfo |
| GET | /mt5/{account_id}/getQuote | GET /mt5/{account_id}/getQuote |
| GET | /mt5/{account_id}/healthz | GET /mt5/{account_id}/healthz |
| GET | /mt5/{account_id}/livez | GET /mt5/{account_id}/livez |
| GET | /mt5/{account_id}/status | GET /mt5/{account_id}/status |
| GET | /mt5/{account_id}/symbols | GET /mt5/{account_id}/symbols |
MT4 terminal
| GET | /mt4/{account_id}/AccountInfo | GET /mt4/{account_id}/AccountInfo |
| GET | /mt4/{account_id}/AccountSummary | GET /mt4/{account_id}/AccountSummary |
| POST | /mt4/{account_id}/CloseAll | POST /mt4/{account_id}/CloseAll |
| GET | /mt4/{account_id}/OpenedOrders | GET /mt4/{account_id}/OpenedOrders |
| GET | /mt4/{account_id}/OrderCalcMargin | GET /mt4/{account_id}/OrderCalcMargin |
| GET | /mt4/{account_id}/OrderCalcProfit | GET /mt4/{account_id}/OrderCalcProfit |
| POST | /mt4/{account_id}/OrderClose | POST /mt4/{account_id}/OrderClose |
| GET | /mt4/{account_id}/OrderHistory | GET /mt4/{account_id}/OrderHistory |
| POST | /mt4/{account_id}/OrderModify | POST /mt4/{account_id}/OrderModify |
| POST | /mt4/{account_id}/OrderSend | POST /mt4/{account_id}/OrderSend |
| GET | /mt4/{account_id}/PositionHistory | GET /mt4/{account_id}/PositionHistory |
| GET | /mt4/{account_id}/PriceHistory | GET /mt4/{account_id}/PriceHistory |
| GET | /mt4/{account_id}/ServerTimezone | GET /mt4/{account_id}/ServerTimezone |
| GET | /mt4/{account_id}/SymbolInfo | GET /mt4/{account_id}/SymbolInfo |
| GET | /mt4/{account_id}/getQuote | GET /mt4/{account_id}/getQuote |
| GET | /mt4/{account_id}/healthz | GET /mt4/{account_id}/healthz |
| GET | /mt4/{account_id}/livez | GET /mt4/{account_id}/livez |
| GET | /mt4/{account_id}/status | GET /mt4/{account_id}/status |
| GET | /mt4/{account_id}/symbols | GET /mt4/{account_id}/symbols |
Batch orders
| POST | /v1/orders | Batch orders |
| POST | /v1/orders/close | Batch close |
Native /v1
Tickwire's own API: accounts, webhooks, keys, private servers, dedicated IPs and billing.
Sandbox
| GET | /v1/sandbox | Sandbox Info |
| POST | /v1/sandbox/keys | Create Key |
| POST | /v1/sandbox/signup | Signup |
Accounts
| GET | /v1/accounts | List Accounts |
| POST | /v1/accounts | Link Account |
| GET | /v1/accounts/{account_id} | Get Account |
| PATCH | /v1/accounts/{account_id} | Patch Account |
| DELETE | /v1/accounts/{account_id} | Unlink Account |
Webhooks and events
| POST | /v1/events/{event_id}/resend | Resend Event |
| GET | /v1/webhook-event-types | Event Types |
| POST | /v1/webhook-events/trigger | Trigger |
| POST | /v1/webhook-listeners | Create Listener |
| GET | /v1/webhook-listeners/{listener_id}/events | Listener Events |
| GET | /v1/webhooks | List Webhooks |
| POST | /v1/webhooks | Create Webhook |
| GET | /v1/webhooks/{webhook_id} | Get Webhook |
| PATCH | /v1/webhooks/{webhook_id} | Patch Endpoint |
| DELETE | /v1/webhooks/{webhook_id} | Delete Webhook |
| GET | /v1/webhooks/{webhook_id}/deliveries | List Deliveries |
| GET | /v1/webhooks/{webhook_id}/deliveries/{delivery_id} | Get Delivery |
| POST | /v1/webhooks/{webhook_id}/deliveries/{delivery_id}/resend | Resend Delivery |
| POST | /v1/webhooks/{webhook_id}/disable | Disable Endpoint |
| POST | /v1/webhooks/{webhook_id}/enable | Enable Endpoint |
| POST | /v1/webhooks/{webhook_id}/reveal-secret | Reveal Secret |
| POST | /v1/webhooks/{webhook_id}/rotate-secret | Rotate Secret |
| GET | /v1/webhooks/{webhook_id}/settings | Endpoint Settings |
Read-only keys
| GET | /v1/readonly-keys | List Ro Keys |
| POST | /v1/readonly-keys | Create Ro Key |
| GET | /v1/readonly-keys/{key_id} | Get Ro Key |
| PATCH | /v1/readonly-keys/{key_id} | Patch Ro Key |
| DELETE | /v1/readonly-keys/{key_id} | Delete Ro Key |
| POST | /v1/readonly-keys/{key_id}/rotate | Rotate Ro Key |
Private servers
| GET | /v1/private-servers | List Servers |
| POST | /v1/private-servers | Buy Server |
| GET | /v1/private-servers/regions | Regions |
| GET | /v1/private-servers/{server_id} | Get Server |
| PATCH | /v1/private-servers/{server_id} | Resize Server |
| DELETE | /v1/private-servers/{server_id} | Cancel Server |
| POST | /v1/private-servers/{server_id}/accounts | Add Server Account |
| DELETE | /v1/private-servers/{server_id}/accounts/{account_id} | Remove Server Account |
Dedicated IPs and billing
| GET | /v1/billing | Billing |
| POST | /v1/billing/upgrade | Upgrade |
| GET | /v1/billing/upgrade/quote | Upgrade Quote |
| GET | /v1/dedicated-ips | My Dedicated Ips |
| POST | /v1/dedicated-ips/move-accounts | My Move Accounts |
| GET | /v1/subscription | Subscription |
| GET | /v1/wallet | Wallet |
| GET | /v1/wallet/assets | Wallet Assets |
| POST | /v1/wallet/topup | Create Topup |
| GET | /v1/wallet/topup/{topup_id} | Get Topup |
| POST | /v1/wallet/topup/{topup_id}/confirm | Confirm Topup |
| GET | /v1/wallet/topups | List Topups |
Identity and other routes
| GET | /v1/api-version | Get Api Version |
| POST | /v1/api-version | Set Api Version |
| GET | /v1/meta/whoami | Whoami |
| GET | /v1/request-logs | List Request Logs |
| GET | /v1/request-logs/summary | Request Log Summary |
| GET | /v1/request-logs/{log_id} | Get Request Log |
AI agents
Scoped agent keys, kill switches, pre-trade hooks and holds, and the agent API itself.
Agent API
| GET | /v1/agent/accounts | Agent Accounts |
| GET | /v1/agent/accounts/{account_id}/account-information | Agent Account Info |
| GET | /v1/agent/accounts/{account_id}/health | Agent Health |
| GET | /v1/agent/accounts/{account_id}/history-deals | Agent Deals |
| GET | /v1/agent/accounts/{account_id}/orders | Agent Orders |
| GET | /v1/agent/accounts/{account_id}/positions | Agent Positions |
| GET | /v1/agent/accounts/{account_id}/snapshot | Agent Snapshot |
| GET | /v1/agent/accounts/{account_id}/symbols/{symbol}/current-price | Agent Price |
| GET | /v1/agent/accounts/{account_id}/symbols/{symbol}/specification | Agent Spec |
| POST | /v1/agent/accounts/{account_id}/trade | Agent Trade |
| GET | /v1/agent/audit | Agent Own Audit |
| GET | /v1/agent/me | Agent Me |
| GET | /v1/agent/requests/{idempotency_key} | Agent Request Status |
Agent keys and kill switches
| GET | /v1/agent-audit | Agent Audit |
| GET | /v1/agent-keys | List Agent Keys |
| POST | /v1/agent-keys | Create Agent Key |
| GET | /v1/agent-keys/{key_id} | Get Agent Key |
| PATCH | /v1/agent-keys/{key_id} | Patch Agent Key |
| DELETE | /v1/agent-keys/{key_id} | Revoke Agent Key |
| PUT | /v1/agent-keys/{key_id}/kill-switch | Set Key Kill Switch |
| GET | /v1/agent-kill-switches | List Kill Switches |
| PUT | /v1/agent-kill-switches/accounts/{account_id} | Set Account Kill Switch |
Pre-trade hooks and holds
| GET | /v1/pretrade-holds | List Holds |
| GET | /v1/pretrade-holds/{hold_id} | Get Hold |
| POST | /v1/pretrade-holds/{hold_id}/cancel | Cancel Hold |
| POST | /v1/pretrade-holds/{hold_id}/release | Release Hold |
| GET | /v1/pretrade-hooks | List Hooks |
| POST | /v1/pretrade-hooks | Create Hook |
| GET | /v1/pretrade-hooks/{hook_id} | Get Hook |
| PATCH | /v1/pretrade-hooks/{hook_id} | Patch Hook |
| DELETE | /v1/pretrade-hooks/{hook_id} | Delete Hook |
| POST | /v1/pretrade-hooks/{hook_id}/rotate-secret | Rotate Hook Secret |
Sign in with Tickwire (OAuth) and connected apps
| GET | /.well-known/oauth-authorization-server | As Metadata |
| GET | /oauth/authorize | Authorize |
| POST | /oauth/consent/decide | Consent Decide |
| POST | /oauth/consent/view | Consent View |
| POST | /oauth/register | Register |
| POST | /oauth/revoke | Revoke |
| POST | /oauth/token | Token |
| GET | /v1/connected-apps | List Apps |
| DELETE | /v1/connected-apps/{grant_id} | Disconnect App |
Guarded execution
Trades placed with an API key through the same guarded pipeline agents use.
Guarded trades
| POST | /v1/execution/accounts/{account_id}/trade | Guarded Trade |