Back to Home

API Documentation

Welcome to the official documentation for TheBrokerAPI.io. Currently in Private Beta. Our focus is on the Data API, allowing you to seamlessly pull trading history and account metrics from any MetaTrader 5 broker.

Authentication

The API uses Bearer Tokens for authentication. Since we are currently in Private Beta, API Keys are provisioned manually and dispatched via email after your request is approved.

Header Format

Authorization: Bearer tb_beta_xxxxxxxxxxxxxxxxxxxx

Base URL

All API requests must be prefixed with the following production gateway endpoint:

https://thebrokerapi.io/api/v1

Account Quota & Limits

Each API Key includes a default allocation of 5 connected MetaTrader 5 accounts. Accounts are automatically registered on their first API query via their account number (login), or explicitly via the /accounts endpoint.

Flexible Quota Scaling

Need to monitor 20, 100, or 1,000+ accounts for your Prop Firm or Hedge Fund? Contact [email protected] to instantly scale your account limit.


Security Guidelines

  • Always keep your API key secure on server-side environments (Node.js, Python, Go, PHP backends).
  • Never expose your API key in client-side applications (React, Vue, mobile apps, or browser JS).
  • All communication between your server, TheBrokerAPI.io gateway, and MT5 workers is encrypted over TLS/HTTPS.