{
  "openapi": "3.1.0",
  "info": {
    "title": "MetaApi (independent, unofficial description by Broker API Hub)",
    "version": "2026-10-12",
    "description": "An independent, unofficial description of the MetaApi, built by Broker API Hub from MetaApi's public documentation. It is not MetaApi's own specification, and Broker API Hub is not affiliated with or endorsed by MetaApi.\n\nIt is generated from 17 endpoint records. Every operation carries x-source, the page it was read on, and x-checked, the date that page was last checked. No operation here is recorded as conflicting or unverified. An operation this file does not list is not recorded here, which is not evidence that it does not exist.\n\nSecurity schemes are only the authentication headers the endpoint records list. How a credential is obtained and how long it lasts is on https://openbrokerapi.com/platforms/metaapi.\n\nResponse schemas: none is recorded.\n\n2 operations carry a mock reply as an example under the default response. Its values are invented.\n\nWhere this file and MetaApi's own documentation differ, the documentation wins. Educational only. Nothing here is advice.",
    "x-independent": true,
    "x-licence": "All rights reserved. Given for reference. Not part of the CC BY 4.0 downloads.",
    "x-cite": "Broker API Hub, MetaApi OpenAPI description, openbrokerapi.com/specs/metaapi.json, newest check 2026-10-12",
    "x-generated": "2026-10-12",
    "x-generated-basis": "The newest checked date among the endpoint records in this file. It is not the date the file was built.",
    "x-page": "https://openbrokerapi.com/platforms/metaapi",
    "x-base-addresses": {
      "region": "Varies by region. The reference says the address in its examples is valid for the New York region only and that the addresses for other regions are on MetaApi's API access page",
      "new_york": "https://mt-client-api-v1.new-york.agiliumtrade.ai",
      "new_york_market_data": "https://mt-market-data-client-api-v1.new-york.agiliumtrade.ai"
    },
    "x-base-addresses-note": "The base addresses exactly as the platform record words them. Only an entry that is a plain address is listed under servers. A platform API is hosted for each broker or firm that offers it, so where the record holds no plain address the base address is the one your own broker gives you."
  },
  "externalDocs": {
    "description": "MetaApi's own documentation",
    "url": "https://metaapi.cloud/docs/client/"
  },
  "servers": [
    {
      "url": "https://mt-client-api-v1.new-york.agiliumtrade.ai",
      "description": "Recorded on the MetaApi record as \"new_york\"."
    },
    {
      "url": "https://mt-market-data-client-api-v1.new-york.agiliumtrade.ai",
      "description": "Recorded on the MetaApi record as \"new_york_market_data\"."
    }
  ],
  "tags": [
    {
      "name": "Historical data"
    },
    {
      "name": "Market data"
    },
    {
      "name": "Terminal state"
    },
    {
      "name": "Trade"
    }
  ],
  "paths": {
    "/users/current/accounts/{accountId}/account-information": {
      "get": {
        "operationId": "get-account-information",
        "summary": "Read the MetaTrader account's balance, equity, margin, free margin, leverage and currency, with its broker and server.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is the MetatraderAccountInformation model. The mock reply uses the field names of the page's example with invented values, and keeps the two enum values the example shows.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readAccountInformation/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshTerminalState",
            "in": "query",
            "required": false,
            "description": "Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "default": {
            "description": "A mock reply held on this site's record. The values are invented and the record holds no status code for it.",
            "content": {
              "application/json": {
                "example": {
                  "_mock": true,
                  "broker": "Mock Broker Ltd",
                  "currency": "USD",
                  "server": "Mock-Demo",
                  "balance": 10000,
                  "equity": 10000,
                  "margin": 0,
                  "freeMargin": 10000,
                  "leverage": 100,
                  "marginLevel": 0,
                  "tradeAllowed": true,
                  "marginMode": "ACCOUNT_MARGIN_MODE_RETAIL_HEDGING",
                  "name": "Mock Trader",
                  "login": 1,
                  "credit": 0,
                  "accountCurrencyExchangeRate": 1,
                  "type": "ACCOUNT_TRADE_MODE_DEMO"
                }
              }
            }
          }
        },
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readAccountInformation/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-account-information"
      }
    },
    "/users/current/accounts/{accountId}/calculate-margin": {
      "post": {
        "operationId": "post-calculate-margin",
        "summary": "Work out the margin that opening a given trade on the account would need, without placing it.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. The body is the MarginOrder model, read the same day on its own page. Documented replies: 200 with the Margin model, 400 when the body is not valid, 401 and 404. No mock reply is recorded.",
        "tags": [
          "Trade"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/calculateMargin/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "description": "The order's symbol. Marked required."
                  },
                  "type": {
                    "type": "string",
                    "description": "The order type. One of: ORDER_TYPE_BUY, ORDER_TYPE_SELL. Marked required."
                  },
                  "volume": {
                    "type": "number",
                    "description": "The order volume, greater than 0. Marked required."
                  },
                  "openPrice": {
                    "type": "number",
                    "description": "The order's open price, greater than 0. Marked required."
                  }
                },
                "required": [
                  "symbol",
                  "type",
                  "volume",
                  "openPrice"
                ]
              }
            }
          }
        },
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/calculateMargin/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/post-calculate-margin"
      }
    },
    "/users/current/accounts/{accountId}/historical-market-data/symbols/{symbol}/timeframes/{timeframe}/candles": {
      "get": {
        "operationId": "get-historical-candles",
        "summary": "Download historical candles for one symbol and timeframe, loaded backwards from a start time, up to 1000 at a time.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. This call is served from a different host from the other MetaApi calls: the page's example uses mt-market-data-client-api-v1.new-york.agiliumtrade.ai. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. The rate limiting page adds that historical market data limits are counted apart from the rest and that concurrent requests per account are limited too. The page warns that the terminal may need longer than the default timeout of 4 minutes, and that an MT5 terminal can hang when candles are asked for a symbol with missing market data. The reply is a list of MetatraderCandle, so no mock object is shown.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readHistoricalCandles/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "The symbol to load candles for, such as a currency pair or an index. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeframe",
            "in": "path",
            "required": true,
            "description": "The candle size. For MT5: 1m, 2m, 3m, 4m, 5m, 6m, 10m, 12m, 15m, 20m, 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1d, 1w, 1mn. For MT4: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1mn. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "query",
            "required": false,
            "description": "The time to load candles from. Candles are loaded backwards, so this is the latest time wanted. Left empty, the newest candles are returned. The page leaves its required column empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "The most candles to return, 1000 or fewer. The page leaves its required column empty.",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readHistoricalCandles/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-historical-candles"
      }
    },
    "/users/current/accounts/{accountId}/history-deals/position/{positionId}": {
      "get": {
        "operationId": "get-history-deals-by-position",
        "summary": "List the history deals that belong to one position.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of MetatraderDeal, so no mock object is shown.",
        "tags": [
          "Historical data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readDealsByPosition/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "positionId",
            "in": "path",
            "required": true,
            "description": "The position's id. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readDealsByPosition/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-deals-by-position"
      }
    },
    "/users/current/accounts/{accountId}/history-deals/time/{startTime}/{endTime}": {
      "get": {
        "operationId": "get-history-deals-by-time",
        "summary": "List the account's history deals inside a time range, a page at a time.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of MetatraderDeal, so no mock object is shown.",
        "tags": [
          "Historical data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readDealsByTimeRange/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "path",
            "required": true,
            "description": "Start of the range, inclusive, in ISO format. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endTime",
            "in": "path",
            "required": true,
            "description": "End of the range, exclusive, in ISO format. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Paging offset. Default 0, smallest 0. The page leaves its required column empty.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Paging limit. Default 1000, between 1 and 1000. The page leaves its required column empty.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readDealsByTimeRange/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-deals-by-time"
      }
    },
    "/users/current/accounts/{accountId}/history-orders/time/{startTime}/{endTime}": {
      "get": {
        "operationId": "get-history-orders-by-time",
        "summary": "List the account's completed orders inside a time range, a page at a time.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of MetatraderOrder, so no mock object is shown.",
        "tags": [
          "Historical data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readHistoryOrdersByTimeRange/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startTime",
            "in": "path",
            "required": true,
            "description": "Start of the range, inclusive, in ISO format. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endTime",
            "in": "path",
            "required": true,
            "description": "End of the range, exclusive, in ISO format. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "Paging offset. Default 0, smallest 0. The page leaves its required column empty.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Paging limit. Default 1000, between 1 and 1000. The page leaves its required column empty.",
            "schema": {
              "type": "number"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveHistoricalData/readHistoryOrdersByTimeRange/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-history-orders-by-time"
      }
    },
    "/users/current/accounts/{accountId}/orders": {
      "get": {
        "operationId": "get-orders",
        "summary": "List the open, pending orders on the MetaTrader account.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of MetatraderOrder, so no mock object is shown.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readOrders/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshTerminalState",
            "in": "query",
            "required": false,
            "description": "Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readOrders/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-orders"
      }
    },
    "/users/current/accounts/{accountId}/orders/{orderId}": {
      "get": {
        "operationId": "get-order",
        "summary": "Read one open order by its id, the ticket number.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the order does not exist. The reply is the MetatraderOrder model. No mock reply is recorded.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readOrder/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "description": "The order's id, its ticket number. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshTerminalState",
            "in": "query",
            "required": false,
            "description": "Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readOrder/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-order"
      }
    },
    "/users/current/accounts/{accountId}/positions": {
      "get": {
        "operationId": "get-positions",
        "summary": "List the open positions on the MetaTrader account.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of MetatraderPosition, so no mock object is shown. The fields in the page's example are id, type, symbol, magic, time, brokerTime, openPrice, currentPrice, currentTickValue, stopLoss, volume, swap, profit, updateTime, commission, clientId, unrealizedProfit and realizedProfit.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readPositions/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshTerminalState",
            "in": "query",
            "required": false,
            "description": "Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readPositions/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-positions"
      }
    },
    "/users/current/accounts/{accountId}/positions/{positionId}": {
      "get": {
        "operationId": "get-position",
        "summary": "Read one open position by its id, the ticket number.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the position does not exist. The reply is the MetatraderPosition model. No mock reply is recorded.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readPosition/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "positionId",
            "in": "path",
            "required": true,
            "description": "The position's id, its ticket number. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "refreshTerminalState",
            "in": "query",
            "required": false,
            "description": "Whether to refresh the terminal state before reading, which slows the request. Defaults to false. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readPosition/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-position"
      }
    },
    "/users/current/accounts/{accountId}/server-time": {
      "get": {
        "operationId": "get-server-time",
        "summary": "Read the trading server's time for the MetaTrader account.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is the ServerTime model. No mock reply is recorded.",
        "tags": [
          "Terminal state"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readServerTime/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/readTradingTerminalState/readServerTime/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-server-time"
      }
    },
    "/users/current/accounts/{accountId}/symbols": {
      "get": {
        "operationId": "get-symbols",
        "summary": "List the symbols available on the MetaTrader account, as plain names.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found or not yet provisioned. The reply is a list of strings, so no mock object is shown.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbols/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbols/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbols"
      }
    },
    "/users/current/accounts/{accountId}/symbols/{symbol}/current-candles/{timeframe}": {
      "get": {
        "operationId": "get-symbol-current-candle",
        "summary": "Read the candle now forming for one symbol at one timeframe.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the symbol is not defined for the broker. The reply is the MetatraderCandle model. No mock reply is recorded.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readCandle/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "The symbol, such as a currency pair or an index. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeframe",
            "in": "path",
            "required": true,
            "description": "The candle size. For MT5: 1m, 2m, 3m, 4m, 5m, 6m, 10m, 12m, 15m, 20m, 30m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1d, 1w, 1mn. For MT4: 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w, 1mn. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keepSubscription",
            "in": "query",
            "required": false,
            "description": "If true, the account keeps a long term subscription to the symbol's market data, so later calls answer faster. Otherwise the subscription lapses after 12 minutes. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readCandle/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-candle"
      }
    },
    "/users/current/accounts/{accountId}/symbols/{symbol}/current-price": {
      "get": {
        "operationId": "get-symbol-current-price",
        "summary": "Read the current price of one symbol.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the symbol is not defined for the broker. The reply is the MetatraderSymbolPrice model. No mock reply is recorded.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbolPrice/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "The symbol, such as a currency pair or an index. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keepSubscription",
            "in": "query",
            "required": false,
            "description": "If true, the account keeps a long term subscription to the symbol's market data, so later calls answer faster. Otherwise the subscription lapses after 12 minutes. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbolPrice/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-price"
      }
    },
    "/users/current/accounts/{accountId}/symbols/{symbol}/current-tick": {
      "get": {
        "operationId": "get-symbol-current-tick",
        "summary": "Read the latest tick of one symbol. The page says MT4 G1 accounts do not support this call.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the symbol is not defined for the broker. The reply is the MetatraderTick model. No mock reply is recorded.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readTick/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "The symbol, such as a currency pair or an index. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "keepSubscription",
            "in": "query",
            "required": false,
            "description": "If true, the account keeps a long term subscription to the symbol's market data, so later calls answer faster. Otherwise the subscription lapses after 12 minutes. The page leaves its required column empty.",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readTick/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-current-tick"
      }
    },
    "/users/current/accounts/{accountId}/symbols/{symbol}/specification": {
      "get": {
        "operationId": "get-symbol-specification",
        "summary": "Read the trading specification of one symbol.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. Documented error replies: 401 when authorisation fails and 404 when the account is not found, not yet provisioned, or the symbol is not defined for the broker. The reply is the MetatraderSymbolSpecification model. No mock reply is recorded.",
        "tags": [
          "Market data"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbolSpecification/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "required": true,
            "description": "The symbol, such as a currency pair or an index. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/retrieveMarketData/readSymbolSpecification/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/get-symbol-specification"
      }
    },
    "/users/current/accounts/{accountId}/trade": {
      "post": {
        "operationId": "post-trade",
        "summary": "Send one trade command to the MetaTrader account. The actionType in the body decides what it does: open at market, place, change or cancel a pending order, or change or close a position.",
        "description": "Read on 12 Oct 2026 on MetaApi's own reference page for this call. The method, path, parameters and required marks are that page's. The page writes each path parameter with a colon, as in :accountId, and this record writes it in braces. The page says the address in its example, on the host mt-client-api-v1.new-york.agiliumtrade.ai, is valid for the New York region only, and that the addresses for other regions are on MetaApi's API access page. MetaApi does not count requests against this call: its rate limiting page says REST calls draw on CPU credits, granted per application, per server and per account, and that going over is answered 429 with a recommended time to retry. The body is the MetatraderTrade model, read the same day on its own page (metaapi.cloud/docs/client/models/metatraderTrade/). The model's general table marks only actionType as required and then gives a table for each command with that command's own required fields, which the descriptions above repeat. Fields the general table leaves unmarked are recorded as not required. The mock reply uses the field names of the page's example, with its code and message for a completed request and an invented orderId. The page's examples for position commands also carry positionId.",
        "tags": [
          "Trade"
        ],
        "externalDocs": {
          "description": "MetaApi's own reference for this operation",
          "url": "https://metaapi.cloud/docs/client/restApi/api/trade/"
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "description": "The MetaTrader account's id on MetaApi, shown in the web application once the account has been added, or read through the provisioning API. Marked required.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "actionType": {
                    "type": "string",
                    "description": "The command. Marked required. One of: ORDER_TYPE_SELL, ORDER_TYPE_BUY, ORDER_TYPE_BUY_LIMIT, ORDER_TYPE_SELL_LIMIT, ORDER_TYPE_BUY_STOP, ORDER_TYPE_SELL_STOP, ORDER_TYPE_BUY_STOP_LIMIT, ORDER_TYPE_SELL_STOP_LIMIT, POSITION_MODIFY, POSITION_PARTIAL, POSITION_CLOSE_ID, POSITIONS_CLOSE_SYMBOL, POSITION_CLOSE_BY, ORDER_MODIFY, ORDER_CANCEL."
                  },
                  "symbol": {
                    "type": "string",
                    "description": "The symbol to trade. The model marks it required for the order types and for POSITIONS_CLOSE_SYMBOL."
                  },
                  "volume": {
                    "type": "number",
                    "description": "The order volume. The model marks it required for the order types and for POSITION_PARTIAL."
                  },
                  "openPrice": {
                    "type": "number",
                    "description": "The limit or stop price. The model marks it required for pending orders and for ORDER_MODIFY."
                  },
                  "stopLimitPrice": {
                    "type": "string",
                    "description": "The price at which a stop limit order is placed. The model marks it required for the two stop limit types and types it as a string."
                  },
                  "stopLoss": {
                    "type": "number",
                    "description": "Stop loss, a price unless stopLossUnits says otherwise."
                  },
                  "takeProfit": {
                    "type": "number",
                    "description": "Take profit, a price unless takeProfitUnits says otherwise."
                  },
                  "stopLossUnits": {
                    "type": "string",
                    "description": "How stopLoss is read: an absolute price or a relative amount. Default ABSOLUTE_PRICE. One of: ABSOLUTE_PRICE, RELATIVE_PRICE, RELATIVE_POINTS, RELATIVE_PIPS, RELATIVE_CURRENCY, RELATIVE_BALANCE_PERCENTAGE."
                  },
                  "takeProfitUnits": {
                    "type": "string",
                    "description": "How takeProfit is read, with the same kinds of value as stopLossUnits. Default ABSOLUTE_PRICE."
                  },
                  "stopPriceBase": {
                    "type": "string",
                    "description": "The price a relative stop loss or take profit is measured from. One of: CURRENT_PRICE, OPEN_PRICE, STOP_PRICE."
                  },
                  "openPriceUnits": {
                    "type": "string",
                    "description": "How openPrice is read: an absolute price or a relative amount. Default ABSOLUTE_PRICE."
                  },
                  "openPriceBase": {
                    "type": "string",
                    "description": "The price a relative open price is measured from. One of: CURRENT_PRICE, OPEN_PRICE, STOP_LIMIT_PRICE."
                  },
                  "stopLimitPriceUnits": {
                    "type": "string",
                    "description": "How stopLimitPrice is read: an absolute price or a relative amount. Default ABSOLUTE_PRICE."
                  },
                  "stopLimitPriceBase": {
                    "type": "string",
                    "description": "The price a relative stop limit price is measured from, for ORDER_MODIFY. One of: CURRENT_PRICE, STOP_LIMIT_PRICE."
                  },
                  "trailingStopLoss": {
                    "type": "object",
                    "description": "A distance trailing stop loss, in the TrailingStopLoss model."
                  },
                  "orderId": {
                    "type": "string",
                    "description": "The order's id. The model marks it required for ORDER_MODIFY and ORDER_CANCEL."
                  },
                  "positionId": {
                    "type": "string",
                    "description": "The position's id. The model marks it required for POSITION_MODIFY, POSITION_PARTIAL, POSITION_CLOSE_ID and POSITION_CLOSE_BY."
                  },
                  "closeByPositionId": {
                    "type": "string",
                    "description": "The opposite position used to close by. The model marks it required for POSITION_CLOSE_BY."
                  },
                  "comment": {
                    "type": "string",
                    "description": "A comment on the order."
                  },
                  "clientId": {
                    "type": "string",
                    "description": "An id of the client's own, carried onto the position, history orders and history deals that follow from the trade."
                  },
                  "magic": {
                    "type": "number",
                    "description": "The magic number, the id of an expert adviser."
                  },
                  "slippage": {
                    "type": "number",
                    "description": "Slippage in points, zero or more. Ignored when changing a position or an order and when cancelling."
                  },
                  "fillingModes": {
                    "type": "array",
                    "description": "The filling modes allowed, in order of preference. By default all are allowed."
                  },
                  "expiration": {
                    "type": "object",
                    "description": "When a pending order expires: a type, one of ORDER_TIME_GTC, ORDER_TIME_DAY, ORDER_TIME_SPECIFIED or ORDER_TIME_SPECIFIED_DAY, and a time for the types that need one. The model says MetaTrader 4 supports ORDER_TIME_SPECIFIED only."
                  }
                },
                "required": [
                  "actionType"
                ]
              }
            }
          }
        },
        "responses": {
          "default": {
            "description": "A mock reply held on this site's record. The values are invented and the record holds no status code for it.",
            "content": {
              "application/json": {
                "example": {
                  "_mock": true,
                  "numericCode": 10009,
                  "stringCode": "TRADE_RETCODE_DONE",
                  "message": "Request completed",
                  "orderId": "1"
                }
              }
            }
          }
        },
        "security": [
          {
            "auth-token": []
          }
        ],
        "x-source": "https://metaapi.cloud/docs/client/restApi/api/trade/",
        "x-checked": "2026-10-12",
        "x-page": "https://openbrokerapi.com/platforms/metaapi/endpoints/post-trade"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "auth-token": {
        "type": "apiKey",
        "in": "header",
        "name": "auth-token",
        "description": "A header the MetaApi endpoint records list on requests. Read its value from your own environment. Never paste it into a web page or a chat."
      }
    }
  }
}