MetaKit
beta
API Reference

Base URL: https://api.metakit.cloud

Deals / Positions / Orders

All nested under the account they belong to, and all paginated.

GET

/v1/accounts/{id}/deals

List deals

Closed trade history (executed transactions). By default returns the entire history; narrow it with from/to.

Parameters
NameTypeRequiredDescription
fromISO dateNoStart of range (default: all history).
toISO dateNoEnd of range (default: now).
Example request
curl https://api.metakit.cloud/v1/accounts/123/deals \
  -H "Authorization: Bearer stk_live_..."
Example response
{
  "data": [
    { "ticket": 123, "order": 456, "positionId": 456,
      "time": "2026-01-21T14:18:24.000Z", "symbol": "EURUSD",
      "type": "sell", "entry": "out", "reason": "take_profit",
      "volume": 0.5, "price": 1.1192, "commission": -3.5, "swap": 0,
      "fee": 0, "profit": 125.5, "magic": 0, "comment": "" }
  ],
  "page": 1, "limit": 25, "total": 621, "total_pages": 25
}
// entry: "in" opened the position, "out" closed it (profit realized here).
// reason: why it happened — "stop_loss", "take_profit", "client", "expert", ...
GET

/v1/accounts/{id}/positions

List positions

Live open positions.

Example request
curl https://api.metakit.cloud/v1/accounts/123/positions \
  -H "Authorization: Bearer stk_live_..."
Example response
{
  "data": [
    { "ticket": 456, "time": "2026-07-10T11:00:00.000Z", "symbol": "GBPUSD",
      "type": "sell", "volume": 0.2, "priceOpen": 1.3213, "priceCurrent": 1.3201,
      "sl": 0, "tp": 0, "swap": -1.2, "profit": 24.0, "comment": "" }
  ],
  "page": 1, "limit": 25, "total": 2, "total_pages": 1
}
GET

/v1/accounts/{id}/orders

List orders

Pending orders.

Example request
curl https://api.metakit.cloud/v1/accounts/123/orders \
  -H "Authorization: Bearer stk_live_..."
Example response
{
  "data": [
    { "ticket": 789, "time": "2026-07-10T10:00:00.000Z", "symbol": "XAUUSD",
      "type": "buy_limit", "volume_initial": 0.1, "volume_current": 0.1,
      "price_open": 2350.0, "sl": 2340.0, "tp": 2400.0, "price_current": 2361.5,
      "comment": "" }
  ],
  "page": 1, "limit": 25, "total": 1, "total_pages": 1
}