1mt5_live_012345abcdef_4f6a...
1export FIVESOCKET_KEY="mt5_live_..."
resolved or not_found with measured latency. Results completed within two seconds are JSON. Slower checks emit a newline-delimited pending event and keep the same response open until the terminal result or error arrives. The curl command handles both forms without polling. Verification is recommended but not required before account linking.1234curl -X POST https://api.fivesocket.com/v1/server-verifications \ -H "Authorization: Bearer $FIVESOCKET_KEY" \ -H "Content-Type: application/json" \ -d '{"server":"YourBroker-Demo"}'
not_found result means the exact directory search completed without that name; check the spelling before retrying. A service error means the search did not complete and is safe to retry.123456789curl -X POST https://api.fivesocket.com/v1/accounts \ -H "Authorization: Bearer $FIVESOCKET_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: link-demo-1" \ -d '{ "login": "12345678", "password": "your-investor-password", "server": "YourBroker-Demo" }'
1234567{ "id": "acc_...", "login": "•5678", "server": "YourBroker-Demo", "status": "active", "createdAt": "2026-07-14T10:00:00.000Z" }
server must be the exact MT5 server name as your broker publishes it. A login that succeeds in your desktop terminal uses the same string.12curl https://api.fivesocket.com/v1/accounts/acc_.../balance \ -H "Authorization: Bearer $FIVESOCKET_KEY"
12345678910{ "accountId": "acc_...", "login": "•5678", "server": "YourBroker-Demo", "observedAt": "2026-07-14T10:00:05.412Z", "latencyMs": 5210, "balance": "10000.00", "equity": "10012.50", "currency": "USD" }
snapshot instead of three separate endpoints. It amortizes the login over one exclusive session.