View as Markdown

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.

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

Market data

History

Trading

Health, snapshot and audit trail

Account REST API (/users/current): 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

Account REST API (/users/current): 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

Terminal routes and batch 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

Terminal routes and batch orders: 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

Terminal routes and batch orders: 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

Native /v1: Sandbox
GET /v1/sandbox Sandbox Info
POST /v1/sandbox/keys Create Key
POST /v1/sandbox/signup Signup

Accounts

Native /v1: 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

Native /v1: 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

Native /v1: 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

Native /v1: 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

Native /v1: 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

Native /v1: 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

Agent keys and kill switches

AI agents: 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

AI agents: 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

AI agents: 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

Guarded execution: Guarded trades
POST /v1/execution/accounts/{account_id}/trade Guarded Trade