# fxapis documentation — MT5 API and MarketLabs > fxapis is a hosted REST API for MetaTrader 5 (MT5). Connect an MT5 account with its login, password and server, then trade it and read its positions and history over HTTPS; MetaTrader 5 runs on fxapis's side, hosted in the EU, so there is nothing to install. MT5 only — no MT4. - Base URL: https://api.fxapis.com. Authenticate with `Authorization: Bearer `; keys are created in the console at https://fxapis.com/dashboard/keys (sign up at https://fxapis.com/sign-up). - Successful responses are `{ "data": … }`; failures are `{ "error": { "code", "message" } }`. Match on `code`. - Send an `Idempotency-Key` header with every order (honoured for 24 hours). An opening order whose result is unknown is confirmed against the broker's history; poll it, never resend it. - Official SDKs: TypeScript (`npm install fxapis`) and Python (`pip install fxapis`); examples and starters at https://github.com/FXapis. - Event webhooks: register an HTTPS endpoint with `POST /v1/webhooks` (scope `webhooks:write`) to get a signed, retried POST when an order fills, a position opens or closes, an account changes state or a multi-account order finishes. Verify each delivery's `fxapis-signature` with the SDKs' `verifyWebhook()` / `fxapis.webhooks.verify()`. - A hosted MCP server for AI agents at https://api.fxapis.com/mcp: Claude and ChatGPT connect by signing in to fxapis with OAuth; unattended agents can send an API key instead. - Works with any MetaTrader 5 broker or prop firm, demo or live; no broker partnerships. What varies by broker: https://docs.fxapis.com/guides/broker-compatibility. - Live and test keys are labels only: both reach real brokers. Test with demo accounts. - Every page below is also available as Markdown by appending `.mdx` to its URL. The raw OpenAPI document is at https://api.fxapis.com/docs/json. ## Get started - [Overview](https://docs.fxapis.com/index.mdx): Documentation for fxapis: the hosted MetaTrader 5 REST API — connect MT5 accounts, place and manage orders, trade many accounts at once, and read history — and MarketLabs, daily official market data and cited research. Guides and a full API reference. - [Quickstart](https://docs.fxapis.com/quickstart.mdx): From an API key to a filled order in about five minutes: connect an MT5 account to the fxapis API, bring it online, place a market order and close it. - [SDKs and examples](https://docs.fxapis.com/sdks.mdx): Official TypeScript and Python SDKs, runnable examples, MCP client configs, integrations and a Next.js starter — all open source on GitHub. - [Signals and click-to-trade](https://docs.fxapis.com/signals.mdx): A complete integration for apps whose members approve each trade: connecting their accounts, instant execution on approval, showing their trades, and closing. ## Guides - [Guides](https://docs.fxapis.com/guides.mdx): Step-by-step guides for the fxapis MetaTrader 5 API: complete programs in Python, Node.js, PHP, C#, Go, Java and Ruby, connecting accounts, multi-account… - [Place MetaTrader 5 orders from Python](https://docs.fxapis.com/guides/python.mdx): A complete Python program that connects an MT5 account, places a market order with an idempotency key, handles every failure correctly, reads positions and… - [Place MT5 orders from Node.js and TypeScript](https://docs.fxapis.com/guides/nodejs.mdx): A complete TypeScript program for Node.js that connects an MT5 account, places a market order with an idempotency key, retries safely, reads positions and… - [Place MetaTrader 5 orders from PHP](https://docs.fxapis.com/guides/php.mdx): A complete PHP program using Guzzle that connects an MT5 account, places a market order with an idempotency key, handles SEND_FAILED and ORDER_UNRESOLVED… - [Place MetaTrader 5 orders from C# and .NET](https://docs.fxapis.com/guides/csharp.mdx): A complete .NET 8 console program using HttpClient that connects an MT5 account, places a market order with an idempotency key, handles every failure… - [Place MetaTrader 5 orders from Go](https://docs.fxapis.com/guides/go.mdx): A complete Go program using net/http that connects an MT5 account, places a market order with an idempotency key, retries safely, never resends an unresolved… - [Place MetaTrader 5 orders from Java](https://docs.fxapis.com/guides/java.mdx): A complete Java 17 program using java.net.http.HttpClient and Jackson that connects an MT5 account, places a market order with an idempotency key, handles… - [Place MetaTrader 5 orders from Ruby](https://docs.fxapis.com/guides/ruby.mdx): A complete Ruby program using Net::HTTP that connects an MT5 account, places a market order with an idempotency key, retries safely, never resends an… - [Use the MetaTrader 5 API on Linux and macOS](https://docs.fxapis.com/guides/linux-macos.mdx): Why the official MetaTrader5 Python package only works on Windows next to a running terminal, the Wine, Docker and VPS workarounds people use on Linux and… - [Connect MT5 accounts: login, password, server](https://docs.fxapis.com/guides/connect-accounts.mdx): How to connect a MetaTrader 5 account to the fxapis API: finding the exact server name, trading versus investor password, two-factor sign-in, handling… - [Broker compatibility](https://docs.fxapis.com/guides/broker-compatibility.mdx): fxapis works with any MetaTrader 5 broker or prop firm, demo or live: what you need to connect an account, how the server search works, what differs from… - [Place one order across many MT5 accounts](https://docs.fxapis.com/guides/multi-account-orders.mdx): Send the same MetaTrader 5 trade to many accounts in one API call — up to 1,000 accounts, within your plan's limit: per-account volumes, barrier policies for… - [Copy trading](https://docs.fxapis.com/guides/copy-trading.mdx): Coming soon: copy an MT5 master account's trades to follower accounts, managed by fxapis: sizing, symbol mapping, risk limits, an executions log, webhooks… - [Idempotent MT5 orders: never double-fill](https://docs.fxapis.com/guides/idempotency.mdx): Why retrying a MetaTrader 5 order can open a second position, and how the fxapis Idempotency-Key prevents it: 24-hour keys, replays, in-flight and reuse… - [Webhooks](https://docs.fxapis.com/guides/webhooks.mdx): Get a signed HTTPS POST when an order fills, a position opens or closes, an account changes state, or a multi-account order finishes. - [TradingView alerts to MT5 — no EA, no VPS](https://docs.fxapis.com/guides/tradingview.mdx): Turn TradingView alerts into MetaTrader 5 orders with a secret webhook URL: create a hook in the console or the API, set up the TradingView alert step by… - [Call MT5 from n8n without an Expert Advisor](https://docs.fxapis.com/guides/n8n.mdx): Two ways to call the fxapis MetaTrader 5 API from n8n — the fxapis community node (n8n-nodes-fxapis) on self-hosted n8n, or HTTP Request templates on… - [Read MT5 quotes and recent candles over REST](https://docs.fxapis.com/guides/market-data.mdx): What fxapis market data is, and is not: a REST poll of the account's broker quotes, and up to 1,000 recent candles from that terminal. No tick history, no… - [MarketLabs — official data and daily research](https://docs.fxapis.com/guides/marketlabs.mdx): Daily official reference rates, trading sessions, the economic calendar, CFTC positioning and a daily cited research brief for your watchlist — on the plans… - [MCP server: connect AI agents to MetaTrader 5](https://docs.fxapis.com/guides/mcp.mdx): Connect Claude (claude.ai, Desktop, Code), ChatGPT and other AI agents to your MetaTrader 5 accounts through the fxapis MCP server: sign in, choose read-only… - [Native MT5 MCP versus a hosted MCP server](https://docs.fxapis.com/guides/mcp-native-vs-hosted.mdx): MetaQuotes' terminal MCP and fxapis's hosted MCP are different places to run MetaTrader 5. Neither is the only route. Compare where the terminal runs, how you… - [Claude plugin and skill](https://docs.fxapis.com/guides/claude-plugin.mdx): The fxapis plugin for Claude Code: the MCP server with sign-in, the trading-mt5-safely skill, status and positions commands, and a hook that confirms every… - [Read-only connector](https://docs.fxapis.com/guides/mcp-read-only.mdx): fxapis insights: a read-only MCP server for your MetaTrader 5 accounts — accounts, figures, positions, orders, deals, quotes and market hours — that never… - [Monitor MT5 accounts for prop-firm rules](https://docs.fxapis.com/guides/prop-firms.mdx): Use deals, positions and order history from the fxapis MT5 API to check prop-firm rules such as daily loss and maximum drawdown on your side, with read-only… - [Migrating from MetaApi to fxapis](https://docs.fxapis.com/guides/migrate-from-metaapi.mdx): A concept-by-concept guide for moving an MT5 integration from MetaApi to fxapis: provisioning and deploy versus connect and modes, RPC and streaming versus… ## Reference guides - [Authentication](https://docs.fxapis.com/authentication.mdx): How fxapis API keys work: the Bearer header, live and test keys, scopes, per-key limits, admin keys, rotation, authentication failures and member sessions. - [Accounts](https://docs.fxapis.com/accounts.mdx): Connecting MT5 accounts, keeping them online, and what each state means. - [Trading and history](https://docs.fxapis.com/trading.mdx): Orders, closes, pending orders, multi-account orders, and the history they leave. - [Instruments and symbols](https://docs.fxapis.com/instruments.mdx): Name a market once — XAUUSD, US30, BTCUSD — and trade each account's own broker symbol for it. List any connected broker's symbols, contract specifications… - [Errors](https://docs.fxapis.com/errors.mdx): Every fxapis API error code, what causes it and whether to retry: the shared error shape, the retry rules, and when an order's state is the real error. - [Security](https://docs.fxapis.com/security.mdx): How fxapis protects your broker passwords, API keys and data: per-account encryption, what each credential can do, console sign-in and vulnerability reports. - [Changelog](https://docs.fxapis.com/changelog.mdx): Dated list of changes to the fxapis MetaTrader 5 API, SDKs, MCP tools, MarketLabs and the console, newest first. ## API reference - [MetaTrader 5 REST API reference](https://docs.fxapis.com/api-reference.mdx): Every endpoint of the fxapis API, generated from its OpenAPI description. - Accounts - [Balance, equity and margin](https://docs.fxapis.com/api-reference/accounts/balance-equity-and-margin.mdx): GET /v1/accounts/{id}/figures: Balance, equity and margin. The account's money as its MetaTrader terminal reports it: balance, equity, margin, free margin… - [Connect an MT5 account](https://docs.fxapis.com/api-reference/accounts/connect-an-mt5-account.mdx): POST /v1/accounts: Connect an MT5 account. Stores the account and encrypts its password. Returns id, label, login, server, mode, state, stateDetail and more. - [Delete an account and its history](https://docs.fxapis.com/api-reference/accounts/delete-an-account-and-its-history.mdx): DELETE /v1/accounts/{id}: Delete an account and its history. Removes the account for good: its terminal is stopped, its password erased, and the record… - [Fetch one account](https://docs.fxapis.com/api-reference/accounts/fetch-one-account.mdx): GET /v1/accounts/{id}: Fetch one account. One connected account: its login, server, label, mode, current state and when it last changed. - [List connected accounts](https://docs.fxapis.com/api-reference/accounts/list-connected-accounts.mdx): GET /v1/accounts: List connected accounts. Every account in this workspace, newest first. Returns a list with id, label, login, server, mode, state and more. - [Move an account to another server](https://docs.fxapis.com/api-reference/accounts/move-an-account-to-another-server.mdx): POST /v1/accounts/{id}/server: Move an account to another server. For a login refused because it was added under the wrong server name: keeps the stored… - [Poll lifecycle state](https://docs.fxapis.com/api-reference/accounts/poll-lifecycle-state.mdx): GET /v1/accounts/{id}/status: Poll lifecycle state. The endpoint to poll after bringing an account online. Returns id, state, detail, since, mode and more. - [Replace an account's password](https://docs.fxapis.com/api-reference/accounts/replace-an-accounts-password.mdx): POST /v1/accounts/{id}/password: Replace an account's password. Gives a connected account a new trading password — after the member changed it at the broker… - [Search broker servers](https://docs.fxapis.com/api-reference/accounts/search-broker-servers.mdx): GET /v1/brokers/servers: Search broker servers. MT5 servers matching what someone typed — a broker's name (vantage), the start of a server name… - [What happened to an account](https://docs.fxapis.com/api-reference/accounts/what-happened-to-an-account.mdx): GET /v1/accounts/{id}/events: What happened to an account. The account's history in words, newest first: added, logging in, refused by the broker, online… - Lifecycle - [Bring an account online](https://docs.fxapis.com/api-reference/lifecycle/bring-an-account-online.mdx): POST /v1/accounts/{id}/warm: Bring an account online. Starts connecting the account and returns 202 immediately — the broker login is still in progress. - [Bring several accounts online at once](https://docs.fxapis.com/api-reference/lifecycle/bring-several-accounts-online-at-once.mdx): POST /v1/accounts/prepare: Bring several accounts online at once. Brings every account listed online and returns 202 with a result for each — the broker… - [Change how eagerly the account stays connected](https://docs.fxapis.com/api-reference/lifecycle/change-how-eagerly-the-account-stays-connected.mdx): POST /v1/accounts/{id}/mode: Change how eagerly the account stays connected. always_on: stays connected. Returns accountId, mode and restingState. - [Disconnect and erase the credential](https://docs.fxapis.com/api-reference/lifecycle/disconnect-and-erase-the-credential.mdx): POST /v1/accounts/{id}/disconnect: Disconnect and erase the credential. Takes the account offline and deletes the stored password. - [Restart the connection](https://docs.fxapis.com/api-reference/lifecycle/restart-the-connection.mdx): POST /v1/accounts/{id}/restart: Restart the connection. For an account that is online but misbehaving — degraded, stale quotes, a stuck sync. - [Take an account offline](https://docs.fxapis.com/api-reference/lifecycle/take-an-account-offline.mdx): POST /v1/accounts/{id}/cool: Take an account offline. Takes the account offline and keeps it, with its stored password, in standby — ready to be brought… - Instruments - [List the instruments a signal can name](https://docs.fxapis.com/api-reference/instruments/list-the-instruments-a-signal-can-name.mdx): GET /v1/instruments: List the instruments a signal can name. The markets fxapis names once, whatever each broker calls them: currency pairs, metals, indices… - [List the symbols an account's broker offers](https://docs.fxapis.com/api-reference/instruments/list-the-symbols-an-accounts-broker-offers.mdx): GET /v1/accounts/{id}/symbols: List the symbols an account's broker offers. Every symbol the account's broker offers it, with its contract specification, as… - [Market hours for a symbol or instrument, from the account's broker](https://docs.fxapis.com/api-reference/instruments/market-hours-for-a-symbol-or-instrument-from-the-accounts-broker.mdx): GET /v1/accounts/{id}/sessions: Market hours for a symbol or instrument, from the account's broker. When the account's broker lets orders be placed in a… - [Read an account's symbols from its broker now](https://docs.fxapis.com/api-reference/instruments/read-an-accounts-symbols-from-its-broker-now.mdx): POST /v1/accounts/{id}/symbols/sync: Read an account's symbols from its broker now. Reads the broker's symbol list again and remaps the instruments, for when… - [See how each instrument maps onto an account's broker](https://docs.fxapis.com/api-reference/instruments/see-how-each-instrument-maps-onto-an-accounts-broker.mdx): GET /v1/accounts/{id}/instruments: See how each instrument maps onto an account's broker. For every instrument, the symbol an order naming it will trade on… - Trading - [Cancel a pending order](https://docs.fxapis.com/api-reference/trading/cancel-a-pending-order.mdx): POST /v1/orders/{id}/cancel: Cancel a pending order. Removes a pending order that has not triggered. Returns id, accountId, clientOrderId, symbol and more. - [Close a position](https://docs.fxapis.com/api-reference/trading/close-a-position.mdx): POST /v1/accounts/{id}/positions/{positionId}/close: Close a position. Closes a position in whole, or partly if you send a volume. - [Confirm pending results with the broker now](https://docs.fxapis.com/api-reference/trading/confirm-pending-results-with-the-broker-now.mdx): POST /v1/accounts/{id}/reconcile: Confirm pending results with the broker now. Confirms the result of every opening order on this account still in unknown… - [Margin required, or profit at a price](https://docs.fxapis.com/api-reference/trading/margin-required-or-profit-at-a-price.mdx): POST /v1/accounts/{id}/calculate: Margin required, or profit at a price. Opens nothing and is safe to call freely. - [Move a pending order's price or levels](https://docs.fxapis.com/api-reference/trading/move-a-pending-orders-price-or-levels.mdx): POST /v1/orders/{id}/modify: Move a pending order's price or levels. Keeps the order's ticket. Returns id, accountId, clientOrderId, symbol and more. - [Move a position's stop loss or take profit](https://docs.fxapis.com/api-reference/trading/move-a-positions-stop-loss-or-take-profit.mdx): POST /v1/accounts/{id}/positions/{positionId}/modify: Move a position's stop loss or take profit. Send null to remove a level. - [Place a limit, stop or stop-limit order](https://docs.fxapis.com/api-reference/trading/place-a-limit-stop-or-stop-limit-order.mdx): POST /v1/accounts/{id}/orders/pending: Place a limit, stop or stop-limit order. A success here means placed and waiting, not filled — the broker answers 10008… - [Place a market order](https://docs.fxapis.com/api-reference/trading/place-a-market-order.mdx): POST /v1/accounts/{id}/orders/market: Place a market order. Sends a market order and waits for the broker's answer. - [Positions on an account](https://docs.fxapis.com/api-reference/trading/positions-on-an-account.mdx): GET /v1/accounts/{id}/positions: Positions on an account. What we last saw, with observedAt saying when. Returns a list with id, accountId and more. - Market data - [Live prices from the account's broker](https://docs.fxapis.com/api-reference/market-data/live-prices-from-the-accounts-broker.mdx): GET /v1/accounts/{id}/quotes: Live prices from the account's broker. Bid, ask and spread for up to 20 symbols or instruments, read from the account's own… - [Price history (candles) from the account's broker](https://docs.fxapis.com/api-reference/market-data/price-history-candles-from-the-accounts-broker.mdx): GET /v1/accounts/{id}/candles: Price history (candles) from the account's broker. Open, high, low and close bars for one symbol or instrument, read from the… - History - [An account's full deal history](https://docs.fxapis.com/api-reference/history/an-accounts-full-deal-history.mdx): GET /v1/accounts/{id}/deals: An account's full deal history. Everything the broker recorded against this account, including deals no order of yours caused — a… - [Deals produced by one order](https://docs.fxapis.com/api-reference/history/deals-produced-by-one-order.mdx): GET /v1/orders/{id}/deals: Deals produced by one order. One order can produce several deals — a partial fill leaves more than one. - [Fetch one order](https://docs.fxapis.com/api-reference/history/fetch-one-order.mdx): GET /v1/orders/{id}: Fetch one order. The authoritative record of one order: what was asked for, what the broker returned, and its own return code unmodified. - [List orders](https://docs.fxapis.com/api-reference/history/list-orders.mdx): GET /v1/orders: List orders. Every order this workspace has placed, newest first, across all accounts unless accountId narrows it. - Waves - [Cancel a multi-account order before it is sent](https://docs.fxapis.com/api-reference/waves/cancel-a-multi-account-order-before-it-is-sent.mdx): POST /v1/execution-waves/{id}/cancel: Cancel a multi-account order before it is sent. Only while nothing has been sent. - [Close the positions a multi-account order opened](https://docs.fxapis.com/api-reference/waves/close-the-positions-a-multi-account-order-opened.mdx): POST /v1/execution-waves/{id}/close: Close the positions a multi-account order opened. Closes, on every account at once, the position each filled account's… - [Follow a multi-account order](https://docs.fxapis.com/api-reference/waves/follow-a-multi-account-order.mdx): GET /v1/execution-waves/{id}: Follow a multi-account order. Poll this after creating a multi-account order. Returns id, label, clientWaveId, symbol and more. - [List multi-account orders](https://docs.fxapis.com/api-reference/waves/list-multi-account-orders.mdx): GET /v1/execution-waves: List multi-account orders. Multi-account orders in this workspace, newest first, with each one's state, symbol, side, number of… - [Place one trade on many accounts](https://docs.fxapis.com/api-reference/waves/place-one-trade-on-many-accounts.mdx): POST /v1/execution-waves: Place one trade on many accounts. A multi-account order: one trade placed on many accounts at once. - [Retry the accounts a multi-account order did not reach](https://docs.fxapis.com/api-reference/waves/retry-the-accounts-a-multi-account-order-did-not-reach.mdx): POST /v1/execution-waves/{id}/retry: Retry the accounts a multi-account order did not reach. Places a new multi-account order for the accounts of this one… - Copy trading - [Archive a strategy](https://docs.fxapis.com/api-reference/copy-trading/archive-a-strategy.mdx): DELETE /v1/copy/strategies/{id}: Archive a strategy. Only once no subscription copies it (pause or delete them first). - [Change a subscription's settings or status](https://docs.fxapis.com/api-reference/copy-trading/change-a-subscriptions-settings-or-status.mdx): PATCH /v1/copy/subscriptions/{id}: Change a subscription's settings or status. settings is merged into what is there: objects key by key, lists and… - [Delete a subscription](https://docs.fxapis.com/api-reference/copy-trading/delete-a-subscription.mdx): DELETE /v1/copy/subscriptions/{id}: Delete a subscription. closePositions is required. Returns id, deleted, deleting, closed, pending, failed and released. - [Fetch a strategy](https://docs.fxapis.com/api-reference/copy-trading/fetch-a-strategy.mdx): GET /v1/copy/strategies/{id}: Fetch a strategy. Returns id, accountId, name, status, masterAlwaysOn, followers, createdAt and updatedAt. - [Fetch a subscription](https://docs.fxapis.com/api-reference/copy-trading/fetch-a-subscription.mdx): GET /v1/copy/subscriptions/{id}: Fetch a subscription. Returns id, strategyId, followerAccountId, status, stopReason, stopDetail, stoppedAt, deleting and more. - [List a subscription's links](https://docs.fxapis.com/api-reference/copy-trading/list-a-subscriptions-links.mdx): GET /v1/copy/subscriptions/{id}/links: List a subscription's links. Which follower position copies which master position. - [List copy executions](https://docs.fxapis.com/api-reference/copy-trading/list-copy-executions.mdx): GET /v1/copy/executions: List copy executions. The copy-trading log: what each master change (and each drift correction or stop-out close) did on each… - [List strategies](https://docs.fxapis.com/api-reference/copy-trading/list-strategies.mdx): GET /v1/copy/strategies: List strategies. This workspace's copy-trading strategies, newest first, archived ones included. - [List subscriptions](https://docs.fxapis.com/api-reference/copy-trading/list-subscriptions.mdx): GET /v1/copy/subscriptions: List subscriptions. Followers, newest first, with their status, settings, equity, today's profit where the figures allow, and… - [Make an account a strategy](https://docs.fxapis.com/api-reference/copy-trading/make-an-account-a-strategy.mdx): POST /v1/copy/strategies: Make an account a strategy. Marks an account as a strategy: its trades are copied to every account that subscribes to it. - [Rename, pause or resume a strategy](https://docs.fxapis.com/api-reference/copy-trading/rename-pause-or-resume-a-strategy.mdx): PATCH /v1/copy/strategies/{id}: Rename, pause or resume a strategy. A paused strategy's master is not watched, and nothing is copied — closes included — until… - [Reset a stopped subscription](https://docs.fxapis.com/api-reference/copy-trading/reset-a-stopped-subscription.mdx): POST /v1/copy/subscriptions/{id}/reset: Reset a stopped subscription. Back to active (or to paused, if it was paused when it stopped), with every risk period… - [Subscribe an account to a strategy](https://docs.fxapis.com/api-reference/copy-trading/subscribe-an-account-to-a-strategy.mdx): POST /v1/copy/subscriptions: Subscribe an account to a strategy. The follower copies the strategy's master from now on, with its own settings; every setting… - [Whether copy trading is running](https://docs.fxapis.com/api-reference/copy-trading/whether-copy-trading-is-running.mdx): GET /v1/copy/status: Whether copy trading is running. paused true while copy trading is paused (it is coming soon): strategies and subscriptions can be read… - Alerts - [Alerts a hook received, and what became of each](https://docs.fxapis.com/api-reference/alerts/alerts-a-hook-received-and-what-became-of-each.mdx): GET /v1/alert-hooks/{id}/deliveries: Alerts a hook received, and what became of each. Newest first, kept for 30 days. - [Change an alert hook's name, accounts or defaults](https://docs.fxapis.com/api-reference/alerts/change-an-alert-hooks-name-accounts-or-defaults.mdx): PATCH /v1/alert-hooks/{id}: Change an alert hook's name, accounts or defaults. The URL does not change, so nothing needs editing in TradingView. - [Create a TradingView alert hook](https://docs.fxapis.com/api-reference/alerts/create-a-tradingview-alert-hook.mdx): POST /v1/alert-hooks: Create a TradingView alert hook. Returns a secret url to paste into a TradingView alert's Webhook URL. - [Delete an alert hook](https://docs.fxapis.com/api-reference/alerts/delete-an-alert-hook.mdx): DELETE /v1/alert-hooks/{id}: Delete an alert hook. Its URL stops working at once and cannot be brought back. Returns id, name, accountIds, defaults and more. - [Disable an alert hook](https://docs.fxapis.com/api-reference/alerts/disable-an-alert-hook.mdx): POST /v1/alert-hooks/{id}/disable: Disable an alert hook. Alerts are refused — answered 409 and recorded as rejected — until it is enabled again. - [Enable an alert hook](https://docs.fxapis.com/api-reference/alerts/enable-an-alert-hook.mdx): POST /v1/alert-hooks/{id}/enable: Enable an alert hook. Alerts are traded again from the next one. Returns id, name, accountIds, defaults, enabled and more. - [List TradingView alert hooks](https://docs.fxapis.com/api-reference/alerts/list-tradingview-alert-hooks.mdx): GET /v1/alert-hooks: List TradingView alert hooks. Newest first. Returns a list with id, name, accountIds, defaults, enabled, urlHint, lastUsedAt and createdAt. - [Read one alert hook](https://docs.fxapis.com/api-reference/alerts/read-one-alert-hook.mdx): GET /v1/alert-hooks/{id}: Read one alert hook. One alert hook: its name, accounts, defaults, whether it is enabled and when it was last used. - [Replace an alert hook's URL](https://docs.fxapis.com/api-reference/alerts/replace-an-alert-hooks-url.mdx): POST /v1/alert-hooks/{id}/rotate: Replace an alert hook's URL. Issues a new secret URL and retires the old one at once: alerts still pointing at it are… - Webhooks - [Change a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/change-a-webhook-endpoint.mdx): PATCH /v1/webhooks/{id}: Change a webhook endpoint. Change its url, events or description. Returns id, url, description, events, enabled, disabledAt and more. - [Create a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/create-a-webhook-endpoint.mdx): POST /v1/webhooks: Create a webhook endpoint. Events are POSTed to url as JSON — { id, type, createdAt, data } — signed in the fxapis-signature header with… - [Delete a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/delete-a-webhook-endpoint.mdx): DELETE /v1/webhooks/{id}: Delete a webhook endpoint. Nothing more is sent to it, including retries in progress. - [Delivery attempts to a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/delivery-attempts-to-a-webhook-endpoint.mdx): GET /v1/webhooks/{id}/deliveries: Delivery attempts to a webhook endpoint. Every attempt, newest first, kept 30 days: what was sent, what your endpoint… - [Disable a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/disable-a-webhook-endpoint.mdx): POST /v1/webhooks/{id}/disable: Disable a webhook endpoint. Events stop being sent to it until it is enabled again. - [Enable a webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/enable-a-webhook-endpoint.mdx): POST /v1/webhooks/{id}/enable: Enable a webhook endpoint. Events are sent again from the next one, and the failure count starts from zero. - [List webhook endpoints](https://docs.fxapis.com/api-reference/webhooks/list-webhook-endpoints.mdx): GET /v1/webhooks: List webhook endpoints. Newest first. Returns a list with id, url, description, events, enabled, disabledAt, disabledReason and more. - [One delivery attempt, in full](https://docs.fxapis.com/api-reference/webhooks/one-delivery-attempt-in-full.mdx): GET /v1/webhooks/{id}/deliveries/{deliveryId}: One delivery attempt, in full. The request as sent — URL, headers (signature included) and exact body — and… - [Read one webhook endpoint](https://docs.fxapis.com/api-reference/webhooks/read-one-webhook-endpoint.mdx): GET /v1/webhooks/{id}: Read one webhook endpoint. With its health: the last delivery, failures in a row, and why it was switched off if it was. - [Redeliver an event](https://docs.fxapis.com/api-reference/webhooks/redeliver-an-event.mdx): POST /v1/webhooks/{id}/deliveries/{eventId}/redeliver: Redeliver an event. Queues the event to this endpoint again, with a fresh retry schedule. - [Replay events to an endpoint](https://docs.fxapis.com/api-reference/webhooks/replay-events-to-an-endpoint.mdx): POST /v1/webhooks/{id}/replay: Replay events to an endpoint. Queues this window's events, of the types this endpoint receives, oldest first, with their… - [Rotate a webhook endpoint's secret](https://docs.fxapis.com/api-reference/webhooks/rotate-a-webhook-endpoints-secret.mdx): POST /v1/webhooks/{id}/rotate: Rotate a webhook endpoint's secret. Issues a new secret, returned once. Returns id, url, description, events, enabled and more. - [Send a test event](https://docs.fxapis.com/api-reference/webhooks/send-a-test-event.mdx): POST /v1/webhooks/{id}/test: Send a test event. Sends a webhook.test event to this endpoint only, within a few seconds. - Events - [List events](https://docs.fxapis.com/api-reference/events/list-events.mdx): GET /v1/events: List events. Everything that happened in this workspace while its plan included webhooks, exactly as webhooks deliver it, kept 7, 30 or 90… - [Read one event](https://docs.fxapis.com/api-reference/events/read-one-event.mdx): GET /v1/events/{id}: Read one event. Exactly as a webhook delivery carried it. Returns id, type, createdAt and data. - Workspace - [The workspace this credential belongs to](https://docs.fxapis.com/api-reference/workspace/the-workspace-this-credential-belongs-to.mdx): GET /v1/workspace: The workspace this credential belongs to. Its plan, and whether trading is switched off. Returns id, name, plan, planName and more. - API keys - [Create a key](https://docs.fxapis.com/api-reference/api-keys/create-a-key.mdx): POST /v1/api-keys: Create a key. Needs an admin key (fx_admin_…), made by the workspace owner in the console — or a signed-in owner or admin. - [List this workspace's keys](https://docs.fxapis.com/api-reference/api-keys/list-this-workspaces-keys.mdx): GET /v1/api-keys: List this workspace's keys. Needs an admin key (fx_admin_…), made by the workspace owner in the console — or a signed-in owner or admin. - [Read one key](https://docs.fxapis.com/api-reference/api-keys/read-one-key.mdx): GET /v1/api-keys/{id}: Read one key. Needs an admin key (fx_admin_…), made by the workspace owner in the console — or a signed-in owner or admin. - [Rename or re-scope a key](https://docs.fxapis.com/api-reference/api-keys/rename-or-re-scope-a-key.mdx): PATCH /v1/api-keys/{id}: Rename or re-scope a key. Needs an admin key (fx_admin_…), made by the workspace owner in the console — or a signed-in owner or admin. - [Revoke a key](https://docs.fxapis.com/api-reference/api-keys/revoke-a-key.mdx): POST /v1/api-keys/{id}/revoke: Revoke a key. Needs an admin key (fx_admin_…), made by the workspace owner in the console — or a signed-in owner or admin. - Members - [Change a member's role](https://docs.fxapis.com/api-reference/members/change-a-members-role.mdx): PATCH /v1/members/{id}: Change a member's role. Console only — not available with API keys. Returns id, name, email, role, you, keysCreated, createdAt and more. - [Invite someone](https://docs.fxapis.com/api-reference/members/invite-someone.mdx): POST /v1/members/invitations: Invite someone. Console only — not available with API keys. Returns id, email, role, url, invitedBy, expiresAt and more. - [List open invitations](https://docs.fxapis.com/api-reference/members/list-open-invitations.mdx): GET /v1/members/invitations: List open invitations. Console only — not available with API keys. Returns a list with id, email, role, url, invitedBy and more. - [List this workspace's members](https://docs.fxapis.com/api-reference/members/list-this-workspaces-members.mdx): GET /v1/members: List this workspace's members. Console only — not available with API keys. Returns a list with id, name, email, role, you and more. - [Remove a member](https://docs.fxapis.com/api-reference/members/remove-a-member.mdx): POST /v1/members/{id}/remove: Remove a member. Console only — not available with API keys. Returns id. Part of the Members section of the fxapis API reference. - [Send an invitation again](https://docs.fxapis.com/api-reference/members/send-an-invitation-again.mdx): POST /v1/members/invitations/{id}/resend: Send an invitation again. Console only — not available with API keys. - [Withdraw an invitation](https://docs.fxapis.com/api-reference/members/withdraw-an-invitation.mdx): POST /v1/members/invitations/{id}/revoke: Withdraw an invitation. Console only — not available with API keys. Returns id. - Billing - [Coins accepted for crypto payment](https://docs.fxapis.com/api-reference/billing/coins-accepted-for-crypto-payment.mdx): GET /v1/billing/crypto/coins: Coins accepted for crypto payment. Each with the network it must be sent on. Returns a list with ticker, label, network and more. - [Invoices, newest first](https://docs.fxapis.com/api-reference/billing/invoices-newest-first.mdx): GET /v1/billing/invoices: Invoices, newest first. Every invoice for this workspace, newest first, with its number, amount, status, provider and any refunds. - [One invoice](https://docs.fxapis.com/api-reference/billing/one-invoice.mdx): GET /v1/billing/invoices/{id}: One invoice. One invoice by id, with its lines, payment status and refunds. Returns id, number, plan, method, status and more. - [The available plans](https://docs.fxapis.com/api-reference/billing/the-available-plans.mdx): GET /v1/plans: The available plans. The plans on offer now: what each includes and what it costs. Returns a list with code, name, description and more. - [This month's usage and what it would cost](https://docs.fxapis.com/api-reference/billing/this-months-usage-and-what-it-would-cost.mdx): GET /v1/billing/usage: This month's usage and what it would cost. Counted as it happens rather than derived at the end of the month, so this is the same… - [Usage broken down by day](https://docs.fxapis.com/api-reference/billing/usage-broken-down-by-day.mdx): GET /v1/billing/usage/daily: Usage broken down by day. For a chart, or for checking an invoice line against the day it came from. - [What is paying for the plan](https://docs.fxapis.com/api-reference/billing/what-is-paying-for-the-plan.mdx): GET /v1/billing/subscription: What is paying for the plan. The workspace's subscription, if it has one: plan, card or crypto, status, the current paid period… - Health - [Liveness](https://docs.fxapis.com/api-reference/health/liveness.mdx): GET /healthz: Liveness. Says the fxapis API process is up, for liveness probes and uptime monitors. Returns status. - [Readiness](https://docs.fxapis.com/api-reference/health/readiness.mdx): GET /readyz: Readiness. Says the API can serve traffic right now, including storing and using account credentials. ## Optional - [llms-full.txt](https://docs.fxapis.com/llms-full.txt): The guides and top-level pages of these docs in one Markdown file. - [llms-api.txt](https://docs.fxapis.com/llms-api.txt): The full API reference, every endpoint, in one Markdown file. - [fxapis.com llms.txt](https://fxapis.com/llms.txt): The product, plans and limits. - [OpenAPI document](https://api.fxapis.com/docs/json): The raw OpenAPI 3.1 specification.