Complete API reference for the ChipaTrader CHTL Compiler
Base URL: https://api.chipatrade.com
Authentication: API Key (Header: X-API-Key)
Rate Limit: 100 requests/hour (Free), Unlimited (Pro)
/api/compilerCompile CHTL code into a Windows executable
{
"chtl_code": "string (required)",
"strategy_name": "string (optional)",
"demoOnly": "boolean (optional)"
}{
"success": true,
"blob_name": "strategy_abc123.exe",
"download_url": "https://...",
"size_bytes": 2457600,
"compiled_at": "2025-12-08T10:30:00Z"
}{
"success": false,
"error": "Compilation error message"
}/api/compilerCheck compiler service health and version
{
"status": "healthy",
"version": "1.0.0",
"uptime": 3600
}curl -X POST https://api.chipatrade.com/api/compiler \
-H "Content-Type: application/json" \
-H "X-API-Key: your_api_key_here" \
-d '{
"chtl_code": "let rsi = Rsi(14); TIMEOUT(3) { SEQUENCE(First) { IF rsi CROSSES_OVER 30 THEN Buy, IF rsi CROSSES_UNDER 70 THEN Sell, Hold } }",
"strategy_name": "rsi_strategy"
}'| Plan | Rate Limit | Max File Size |
|---|---|---|
| Free | 10 compilations/month | 1 MB |
| Basic | 100 compilations/month | 5 MB |
| Pro | Unlimited | 10 MB |
| Enterprise | Unlimited | 50 MB |
400Bad Request - Invalid CHTL code or parameters401Unauthorized - Invalid or missing API key429Too Many Requests - Rate limit exceeded500Internal Server Error - Compilation failed