MetaKit
beta
API Reference

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

Accounts

Connect and manage MT5 accounts. Each account occupies one slot of its tier.

GET

/v1/accounts

List accounts

Paginated list of connected accounts with live data when running.

Parameters
NameTypeRequiredDescription
pageintegerNoPage number (default 1).
limitintegerNoItems per page (default 25, max 100).
Example request
curl https://api.metakit.cloud/v1/accounts \
  -H "Authorization: Bearer stk_live_..."
Example response
{
  "data": [
    {
      "id": 1,
      "created_at": "2026-07-10T12:00:00.000Z",
      "updated_at": "2026-07-10T12:05:00.000Z",
      "platform": "mt5",
      "type": "full",
      "account_name": "My Account",
      "account_number": 40317,
      "broker_id": 210,
      "server": "itexsys-Platform",
      "status": "connected",
      "last_ping": "2026-07-10T12:05:00.000Z",
      "client_name": null,
      "mode": "demo",
      "leverage": 100,
      "currency": "USD",
      "balance": 100000,
      "credit": 0,
      "equity": 99850,
      "free_margin": 98500,
      "used_margin": 1350,
      "open_trades": 2,
      "pending_orders": 0,
      "daily_profit": -150,
      "weekly_profit": 320,
      "monthly_profit": 1240,
      "total_profit": 8420
    }
  ],
  "page": 1, "limit": 25, "total": 1, "total_pages": 1
}
GET

/v1/accounts/{id}

Get account

A single account by its numeric id.

Example request
curl https://api.metakit.cloud/v1/accounts/123 \
  -H "Authorization: Bearer stk_live_..."
Example response
{ "id": 1, "platform": "mt5", "type": "full", "status": "connected", "balance": 100000, "...": "..." }
POST

/v1/accounts

Connect account

Connect an MT5 account into a free slot of the given tier. Returns 402 if no slot is available.

Request body
{
  "name": "My Account",
  "number": 40317,
  "password": "secret",
  "broker_id": 210,
  "server": "itexsys-Platform",
  "type": "full"
}
Example request
curl https://api.metakit.cloud/v1/accounts \
  -H "Authorization: Bearer stk_live_..." \
  -H "Content-Type: application/json" \
  -X POST \
  -d '{...'
Example response
{ "id": 2, "status": "starting", "account_name": "My Account", "...": "..." }
PATCH

/v1/accounts/{id}

Update account

Rename the account, or change the connection. To change the connection, provide broker_id, server AND password together (the container is recreated). Otherwise only account_name is updated.

Request body
{ "account_name": "Renamed" }
// or, to change the connection (all three required):
{ "broker_id": 42, "server": "ICMarketsSC-MT5", "password": "newpass" }
Example request
curl https://api.metakit.cloud/v1/accounts/123 \
  -H "Authorization: Bearer stk_live_..." \
  -H "Content-Type: application/json" \
  -X PATCH \
  -d '{ "account_name": "Renamed" }...'
Example response
{ "id": 1, "account_name": "Renamed", "...": "..." }
DELETE

/v1/accounts/{id}

Delete account

Stop and remove the container and free the slot. Returns 204.

Example request
curl https://api.metakit.cloud/v1/accounts/123 \
  -H "Authorization: Bearer stk_live_..." \
  -X DELETE
Example response
204 No Content