API reference · v1

Forexizer Connect API

Connect reads MetaTrader 4 and 5 accounts for you. You send an account's login, server and investor password once. We log in on a schedule, read the history and give it back as JSON.

Early access. We issue API keys by hand while v1 settles. Field names on this page may still change before general availability, and we'll email key holders before any change.

Introduction

The base URL is https://connect.forexizer.com/v1. Requests and responses are JSON. Times are ISO 8601 in UTC, and money is a decimal number in the account's currency.

Authentication

Send your API key as a bearer token on every request. Keep it on your server. Never ship it in a browser or mobile app.

Authorization: Bearer fxc_live_…

Quickstart

  1. Ask your user for their account number, broker server and investor password.
  2. Connect the account. The first sync starts at once.
  3. Wait for the account.connected webhook, or poll the account until its status is connected.
  4. Read the trades. After that, listen for trade.closed.

Connect an account

POST/v1/accounts
FieldTypeDescription
platformstringmt4 or mt5.
loginstringThe account number.
serverstringThe broker server, exactly as MetaTrader shows it, such as Broker-Live.
passwordstringThe investor (read-only) password. A trading password is refused and deleted.
referencestring, optionalYour own id for this account, returned on every object and webhook.
curl https://connect.forexizer.com/v1/accounts \
  -H "Authorization: Bearer $CONNECT_KEY" \
  -d '{"platform":"mt5","login":"12345678","server":"Broker-Live","password":"…","reference":"user_42"}'

Returns 201 with the account object, in status connecting.

The account object

GET/v1/accounts/{id}
GET/v1/accounts
{
  "id": "acc_9f2k",
  "platform": "mt5",
  "login": "12345678",
  "server": "Broker-Live",
  "reference": "user_42",
  "status": "connected",
  "currency": "USD",
  "balance": 10432.18,
  "equity": 10518.02,
  "last_synced_at": "2026-12-04T16:41:22Z",
  "error": null
}
StatusMeaning
connectingThe first sync hasn't finished yet.
connectedThe last sync worked.
login_failedThe broker refused the login, or the password was a trading password. error says which. Syncing stops until you connect it again with new details.
unavailableThe broker couldn't be reached. We keep trying on schedule.

The password is never returned.

Trigger a sync

POST/v1/accounts/{id}/sync

Queues a sync now instead of waiting for the schedule. Returns 202. Available on paid plans, at most once per account every minute. Most syncs finish in about ten seconds; a first sync of a long history takes longer.

Delete an account

DELETE/v1/accounts/{id}

Stops syncing and deletes the account, its stored password and its trades from Connect. Returns 204. The account stops counting toward your plan at once.

Trades

GET/v1/accounts/{id}/trades

Closed trades, newest first. Query parameters: since (ISO time, by close time), limit (up to 500, default 100) and cursor (from next_cursor).

{
  "data": [{
    "id": "trd_71hc",
    "ticket": "48211937",
    "symbol": "EURUSD",
    "side": "buy",
    "volume": 0.5,
    "open_time": "2026-12-03T08:14:05Z",
    "open_price": 1.08412,
    "close_time": "2026-12-03T11:52:40Z",
    "close_price": 1.08777,
    "commission": -3.5,
    "swap": 0,
    "profit": 182.4
  }],
  "next_cursor": null
}

profit is the trade's gross result. Net result is profit + commission + swap. A position closed in parts returns one trade per partial close.

Balance operations

GET/v1/accounts/{id}/operations

Deposits, withdrawals, credits and other non-trade changes to the balance, newest first. Same paging as trades.

{ "data": [{ "id": "op_2m8q", "type": "deposit", "amount": 5000, "time": "2026-11-28T09:00:11Z", "comment": "Deposit" }] }

Webhooks

Give us an HTTPS URL when you get your key and we'll POST events to it. Answer with any 2xx within 10 seconds. Failed deliveries are retried with growing delays for 24 hours.

EventSent when
account.connectedAn account's first sync finished.
account.login_failedThe broker refused the login, or a trading password was sent.
trade.closedA sync found a newly closed trade. One event per trade.
operation.createdA sync found a new deposit, withdrawal or other balance operation.
{
  "id": "evt_5t0x",
  "type": "trade.closed",
  "created_at": "2026-12-03T11:55:02Z",
  "account": { "id": "acc_9f2k", "reference": "user_42" },
  "data": { /* the trade object */ }
}

Verifying a webhook

Each request carries a Connect-Signature header: the hex HMAC-SHA256 of the raw request body, keyed with your webhook secret. Compute it yourself and compare before trusting the payload. Events can arrive more than once, so treat the event id as a de-duplication key.

Errors

Errors use ordinary HTTP status codes and a JSON body.

{ "error": { "code": "account_limit_reached", "message": "Your plan allows 25 accounts." } }
StatusCodeMeaning
400invalid_requestA field is missing or malformed.
401unauthorizedThe API key is missing or wrong.
402account_limit_reachedYour plan's account limit is full.
404not_foundNo such account under this key.
409already_connectedThis login and server are already connected under this key.
429rate_limitedToo many requests. Wait for the seconds in Retry-After.

Limits

  • 10 requests a second per API key.
  • One manual sync per account each minute.
  • Scheduled syncs: every hour on Dev, every 15 minutes on Starter, every 5 minutes on Growth and Scale.

Questions or something missing? Email connect@forexizer.com.