API Endpoint Structure
Habittrade's API is organized using a modular, versioned, and market-scoped endpoint structure. This ensures a consistent and scalable development experience across environments and use cases.
📍 Environments
| Environment | Description | Base URL |
|---|---|---|
| Production | Live trading environment | https://api.habittrade.com |
| UAT (Sandbox) | User Acceptance Testing (test balances, simulated trading) | https://api-uat.habittrade.com |
⚠️ API keys and credentials are not shared across environments. You must generate separate credentials for UAT and Production.
📁 API Path Structure
All API endpoints follow this structure:
{scheme}://{subdomain}/{service}/{version}/{resource}For example:
https://api-uat.habittrade.com/trade/v1/orders✅ URL Segments Explained
| Segment | Example | Description |
|---|---|---|
{scheme} | https | Always use HTTPS (TLS 1.2+) |
{subdomain} | api.habittrade.com, api-uat.habittrade.com | Environment-specific |
{service} | trade, account, market, auth | Functional module |
{version} | v1 | API versioning (supports parallel evolution) |
{resource} | orders, balances, symbols, etc. | Targeted functionality |
🧪 UAT Environment Details
Base URL:
https://api-uat.habittrade.comPurpose: Non-production, no real money involved
Features: Supports full order placement, mock fills, simulated balance updates
Usage: Ideal for bot testing, CI/CD pipelines, feature integration
In UAT, orders may not execute unless matching liquidity is simulated. Use UAT Testing Guide to query test symbols.

