# OnlyTrade API > White-label trading platform for brokers and prop firms. A REST + WebSocket Trade API for traders (orders, positions, prices) and a back-office Brand API for operators (provision accounts, configure groups and prop risk, fund balances, log clients in from a CRM). Base URL: https://api.onlytradeplatform.com — `/auth/v1/oauth2` (auth), `/api/v1` (REST, Bearer token), `/api/v1/public` (unauthenticated), `/ws/v1` (WebSocket). Every REST response uses one envelope: `{ success, code, data, error, message }`. Test against demo accounts (`trade_type: 1`, no real money) before going live. ## Getting started - [Getting Started](https://docs.onlytradeplatform.com/): base URLs, response envelope, first request - [Authentication](https://docs.onlytradeplatform.com/authentication): OAuth2 trader login, tokens, refresh - [Accounts & IDs](https://docs.onlytradeplatform.com/accounts-and-ids): scopes and identifiers - [Errors](https://docs.onlytradeplatform.com/errors): status codes and common trading errors - [Environments & sandbox](https://docs.onlytradeplatform.com/environments): demo accounts as the safe test path - [Rate limits](https://docs.onlytradeplatform.com/rate-limits): fair-use guidance - [Changelog](https://docs.onlytradeplatform.com/changelog): changes and deprecation policy ## Brand API (back-office / CRM integration) - [Brand API overview](https://docs.onlytradeplatform.com/brand/overview): what the back-office API does and who it's for - [Authentication (client_credentials)](https://docs.onlytradeplatform.com/brand/authentication): machine-to-machine API keys - [Provisioning clients](https://docs.onlytradeplatform.com/brand/provisioning-clients): create live/demo/prop accounts, KYC, move groups - [Groups & risk](https://docs.onlytradeplatform.com/brand/groups-and-risk): leverage, spread, commission, prop risk limits - [Funding & ledger](https://docs.onlytradeplatform.com/brand/funding): deposit, withdraw, adjust, credit, transactions - [CRM login](https://docs.onlytradeplatform.com/brand/crm-login): log a managed client into the terminal - [Self-service signup](https://docs.onlytradeplatform.com/brand/public-signup): free-trial / website onboarding - [Onboarding](https://docs.onlytradeplatform.com/brand/onboarding): go live in under 15 days - [Launch kit & white-label](https://docs.onlytradeplatform.com/brand/launch-kit): branding, emails, support ## Realtime - [WebSocket overview](https://docs.onlytradeplatform.com/websocket/overview): handshake and session binding - [Subscribing](https://docs.onlytradeplatform.com/websocket/subscribing): channels - [Events](https://docs.onlytradeplatform.com/websocket/events): frame types ## Recipes - [Open & close a position](https://docs.onlytradeplatform.com/recipes/open-and-close-a-position) - [Place & cancel a pending order](https://docs.onlytradeplatform.com/recipes/place-and-cancel-a-pending-order) - [Subscribe to the account feed](https://docs.onlytradeplatform.com/recipes/subscribe-to-account-feed) - [Generate a report](https://docs.onlytradeplatform.com/recipes/generate-a-report) ## Reference - [API Reference](https://docs.onlytradeplatform.com/reference/api/onlytrade-api): every endpoint with a live "Try It" panel - [OpenAPI spec](https://docs.onlytradeplatform.com/openapi/onlytrade.json): full machine-readable OpenAPI 3.0 spec