Overview
The HaasOnline platform exposes two programmatic surfaces, both driven by the same backend that runs the app:
REST APIA conventional REST API at rest.haasapi.com/v1. Markets, bots, backtests, labs, scripts, accounts - shipped in stages, starting with market data.
MCP for AI agentsPoint Claude (or any MCP client) at your account: list bots, run backtests, edit HaasScript - in a conversation.
The short version
Section titled “The short version”- Create an API key in Settings → API Keys (cloud) or on your self-hosted TradeServer.
- Send it as a bearer token:
Authorization: Bearer hk_live_… - Call the API:
curl "https://rest.haasapi.com/v1/markets?exchange=BINANCE" \ -H "Authorization: Bearer hk_live_YOUR_KEY"Design at a glance
Section titled “Design at a glance”| Base URL | https://rest.haasapi.com/v1 |
| Auth | API keys, sent as Authorization: Bearer - details |
| Errors | RFC 9457 problem details, application/problem+json |
| Pagination | Cursor-based: limit + next_cursor |
| Field casing | snake_case |
| Decimals | JSON strings ("price_step": "0.01") - parse with your decimal type, never float |
| Timestamps | RFC 3339 UTC ("2026-08-28T19:04:11Z"), fields end in _at |
| Enums | Strings ("spot", "inverse"), never magic numbers |
Self-hosted parity
Section titled “Self-hosted parity”A self-hosted TradeServer exposes the same /v1 API locally - same paths, same shapes,
documented by the same spec. Build against the cloud, run against your own hardware, or both.