API reference
213 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· Interactive Swagger UI - 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 | Get account information |
| GET | /users/current/accounts/{account_id}/capabilities | Get the account's capabilities |
| GET | /users/current/accounts/{account_id}/orders | List pending orders |
| GET | /users/current/accounts/{account_id}/orders/{order_id} | Get a pending order |
| GET | /users/current/accounts/{account_id}/positions | List open positions |
| GET | /users/current/accounts/{account_id}/positions/{position_id} | Get a position |
| GET | /users/current/accounts/{account_id}/server-time | Get the server time |
Market data
| GET | /users/current/accounts/{account_id}/historical-market-data/symbols/{symbol}/ticks | Get historical ticks |
| GET | /users/current/accounts/{account_id}/historical-market-data/symbols/{symbol}/timeframes/{timeframe}/candles | Get historical candles |
| GET | /users/current/accounts/{account_id}/symbols | List symbols |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-book | Get the market depth |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-candles/{timeframe} | Get the current candle |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-price | Get the current price |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/current-tick | Get the current tick |
| GET | /users/current/accounts/{account_id}/symbols/{symbol}/specification | Get a symbol's specification |
| POST | /users/current/accounts/{account_id}/symbols/{symbol}/unsubscribe | Unsubscribe from a symbol |
History
| GET | /users/current/accounts/{account_id}/history-deals/position/{position_id} | Get deals by position |
| GET | /users/current/accounts/{account_id}/history-deals/ticket/{ticket} | Get deals by ticket |
| GET | /users/current/accounts/{account_id}/history-deals/time/{start_time}/{end_time} | Get deals by time |
| GET | /users/current/accounts/{account_id}/history-orders/position/{position_id} | Get history orders by position |
| GET | /users/current/accounts/{account_id}/history-orders/ticket/{ticket} | Get history orders by ticket |
| GET | /users/current/accounts/{account_id}/history-orders/time/{start_time}/{end_time} | Get history orders by time |
Trading
| POST | /users/current/accounts/{account_id}/calculate-margin | Calculate Margin |
| POST | /users/current/accounts/{account_id}/trade | Execute a 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, uptime, snapshot and audit trail
| GET | /users/current/accounts/{account_id}/audit | Account Audit |
| GET | /users/current/accounts/{account_id}/health | Get the account's health |
| GET | /users/current/accounts/{account_id}/snapshot | Account Snapshot |
| GET | /users/current/accounts/{account_id}/uptime | Get account uptime |
Speed and execution quality
| GET | /users/current/accounts/{account_id}/execution-quality | Account Execution Quality |
| GET | /users/current/accounts/{account_id}/speed | Account Speed |
| GET | /users/current/execution-quality/compare | Compare Execution Quality |
| GET | /users/current/speed | Organisation Speed |
Tokens and discovery
| POST | /users/current/narrow-down-auth-token | Narrow down an auth token |
| GET | /users/current/regions | List regions |
| GET | /users/current/servers/mt-client-api | Get the client API domain |
| GET | /users/current/tokens | List tokens |
| POST | /users/current/tokens | Create a token |
| GET | /users/current/tokens/{token_id} | Get a token |
| PATCH | /users/current/tokens/{token_id} | Update a token |
| DELETE | /users/current/tokens/{token_id} | Revoke a token |
| GET | /v1/access-rule-manifest | Get the access rule manifest |
| GET | /v1/known-mt-servers/{version}/search | Search known MT 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, own addresses and billing.
Sandbox
| GET | /v1/sandbox | Sandbox Info |
| POST | /v1/sandbox/keys | Create a sandbox key |
| POST | /v1/sandbox/signup | Sign up for the sandbox |
Accounts
| GET | /v1/accounts | List accounts |
| POST | /v1/accounts | Link an account |
| GET | /v1/accounts/{account_id} | Get an account |
| PATCH | /v1/accounts/{account_id} | Update an account |
| DELETE | /v1/accounts/{account_id} | Unlink an account |
Webhooks and events
| POST | /v1/events/{event_id}/resend | Resend Event |
| GET | /v1/webhook-event-types | List webhook event types |
| POST | /v1/webhook-events/trigger | Trigger a test webhook event |
| POST | /v1/webhook-listeners | Create Listener |
| GET | /v1/webhook-listeners/{listener_id}/events | Listener Events |
| GET | /v1/webhooks | List webhooks |
| POST | /v1/webhooks | Create a webhook |
| GET | /v1/webhooks/{webhook_id} | Get a webhook |
| PATCH | /v1/webhooks/{webhook_id} | Update a webhook |
| DELETE | /v1/webhooks/{webhook_id} | Delete a 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 | Get webhook settings |
Read-only keys
| GET | /v1/readonly-keys | List read-only keys |
| POST | /v1/readonly-keys | Create a read-only key |
| GET | /v1/readonly-keys/{key_id} | Get a read-only key |
| PATCH | /v1/readonly-keys/{key_id} | Update a read-only key |
| DELETE | /v1/readonly-keys/{key_id} | Delete a read-only key |
| POST | /v1/readonly-keys/{key_id}/rotate | Rotate a read-only key |
Private servers
| GET | /v1/private-servers | List private servers |
| POST | /v1/private-servers | Buy a private server |
| GET | /v1/private-servers/regions | List private server regions |
| GET | /v1/private-servers/{server_id} | Get a private server |
| PATCH | /v1/private-servers/{server_id} | Resize a private server |
| DELETE | /v1/private-servers/{server_id} | Cancel a private server |
| POST | /v1/private-servers/{server_id}/accounts | Add an account to a private server |
| DELETE | /v1/private-servers/{server_id}/accounts/{account_id} | Remove an account from a private server |
Own addresses and billing
| GET | /v1/billing | Get billing |
| POST | /v1/billing/upgrade | Upgrade the subscription |
| GET | /v1/billing/upgrade/quote | Quote an upgrade |
| GET | /v1/dedicated-ips | List my own addresses |
| POST | /v1/dedicated-ips/move-accounts | Move accounts onto my own address |
| GET | /v1/subscription | Get the subscription |
| GET | /v1/wallet | Get the wallet balance |
Identity and other routes
| GET | /v1/api-version | Get the pinned API version |
| POST | /v1/api-version | Pin the API version |
| GET | /v1/meta/whoami | Who am I |
| GET | /v1/request-logs | List Request Logs |
| GET | /v1/request-logs/summary | Request Log Summary |
| GET | /v1/request-logs/{log_id} | Get Request Log |
| GET | /v1/signal-webhooks | List Signal Webhooks |
| POST | /v1/signal-webhooks | Create Signal Webhook |
| GET | /v1/signal-webhooks/{webhook_id} | Get Signal Webhook |
| PATCH | /v1/signal-webhooks/{webhook_id} | Patch Signal Webhook |
| DELETE | /v1/signal-webhooks/{webhook_id} | Revoke Signal Webhook |
| GET | /v1/signal-webhooks/{webhook_id}/events | Signal Webhook Events |
| POST | /v1/signal-webhooks/{webhook_id}/rotate | Rotate Signal Webhook |
| POST | /v1/signals/{token} | Receive Signal |
AI agents
Scoped agent keys, kill switches, pre-trade hooks and holds, and the agent API itself.
Agent API
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 |
| PUT | /v1/agent-keys/{key_id}/live-trading | Set Live Trading |
| 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 | Get OAuth server metadata |
| GET | /oauth/authorize | Authorize |
| POST | /oauth/consent/decide | Consent Decide |
| POST | /oauth/consent/view | Consent View |
| POST | /oauth/register | Register an OAuth client |
| POST | /oauth/revoke | Revoke an OAuth token |
| POST | /oauth/token | Get an OAuth 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 | Place a guarded trade |