Real-Time Data API

Live Trading Data
with 197 Features

WebSocket & REST API delivering enriched BTCUSDT candles. Same structure as historical data for seamless backtesting-to-production workflow.

1s
Response Time
197
Columns Per Candle
6
Timeframes
2
Formats (JSON/Parquet)

Quick Start

Get your first API call running in 60 seconds

# Install SDK (one command!)
pip install tradexil

# Use it immediately
from tradexil import TradeXilAPI

api = TradeXilAPI(api_key="your-key-here")

# Get latest 1h candle
candle = api.get_latest_candle('1h', format='json')
print(f"Close: {candle['close']}, RSI: {candle['RSI_14']}")
# Get latest 1h candle
$response = Invoke-WebRequest `
    -Uri "https://tradexil.com/api/v1/latest-candle/1h/json" `
    -Headers @{"Authorization"="Bearer YOUR_API_KEY"}

$candle = ($response.Content | ConvertFrom-Json).data
Write-Host "Close: $($candle.close)"
# Get latest 1h candle (JSON)
curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://tradexil.com/api/v1/latest-candle/1h/json

# Download Parquet
curl -H "Authorization: Bearer YOUR_API_KEY" \
     -o latest.parquet \
     https://tradexil.com/api/v1/latest-candle/1h

API Features

Everything you need for production trading systems

Ultra-Fast

< 100ms response time. Data stored in RAM for instant access.

197 Columns

OHLCV + 192 technical indicators pre-calculated per candle.

Real-Time

Live updates via WebSocket. Updates as candles close.

2 Formats

JSON for convenience, Parquet for performance (50x faster).

API Endpoints

Three simple endpoints for all your needs

GET /api/v1/status

Check API health and available timeframes

Response:
{
  "status": "operational",
  "available_timeframes": ["5m", "15m", "30m", "1h", "4h", "1d"],
  "total_columns": 197
}
GET /api/v1/latest-candle/<timeframe>

Get latest candle in Parquet format (binary, 50x faster)

Parameters:
timeframe: 5m, 15m, 30m, 1h, 4h, 1d
Example:
# Python
df = api.get_latest_candle('1h', format='parquet')
print(df[['close', 'volume', 'RSI_14']])
GET /api/v1/latest-candle/<timeframe>/json

Get latest candle in JSON format (easier to parse)

Parameters:
timeframe: 5m, 15m, 30m, 1h, 4h, 1d
Response:
{
  "success": true,
  "timeframe": "1h",
  "data": {
    "timestamp": 1760529600000,
    "close": 111905.73,
    "RSI_14": 62.4,
    // ... 194 more columns
  }
}

Python SDK

Official library for easy integration

TradeXil Python Library

Full-featured SDK with error handling, streaming, and both JSON/Parquet support

  • ✅ Simple initialization
  • ✅ Automatic retries
  • ✅ Type hints & docstrings
  • ✅ Streaming support
# Install via pip (recommended)
pip install tradexil
Or download tradexil.py

SDK Examples

Basic Usage
from tradexil import TradeXilAPI

# Initialize
api = TradeXilAPI(api_key="your-key-here")

# Get latest candle (JSON)
candle = api.get_latest_candle('1h', format='json')
print(f"Close: {candle['close']}")
print(f"RSI: {candle['RSI_14']}")

# Get as DataFrame (Parquet)
df = api.get_latest_candle('5m', format='parquet')
print(df[['timestamp', 'close', 'RSI_14']])
Streaming (Live Updates)
# Stream 5m candles (poll every 60 seconds)
for candle in api.stream_candles('5m', interval=60):
    print(f"New candle: {candle['close']}")
    print(f"RSI: {candle['RSI_14']}")
    
    # Your trading logic here
    if candle['RSI_14'] < 30:
        print("Buy signal!")
Error Handling
from tradexil import TradeXilAPI, TradeXilAuthError

try:
    api = TradeXilAPI(api_key="your-key")
    candle = api.get_latest_candle('1h')
except TradeXilAuthError:
    print("Invalid API key")
except Exception as e:
    print(f"Error: {e}")

Authentication

Secure your API requests with Bearer tokens

How It Works

All API requests require an Authorization header with your Bearer token:

Authorization: Bearer YOUR_API_KEY

Your API key is checked against our key database with < 1ms lookup time.

Example with curl:

curl -H "Authorization: Bearer YOUR_API_KEY" \
     https://tradexil.com/api/v1/status
Development Mode: This feature is currently in testing and not publicly available.

Rate Limits & Best Practices

Polling Intervals

  • 5m: Poll every 60s
  • 15m: Poll every 180s
  • 30m: Poll every 360s
  • 1h: Poll every 720s
  • 4h: Poll every 2880s
  • 1d: Poll every 14400s

Format Selection

Use JSON when:

  • Quick testing/debugging
  • Small data volumes
  • Web applications

Use Parquet when:

  • Production systems
  • High frequency
  • 50x faster parsing

Error Handling

  • 401 - Invalid API key
  • 400 - Invalid timeframe
  • 503 - Data not ready yet
  • 429 - Rate limit exceeded

Always implement retry logic with exponential backoff.

Ready to Start?

Join our beta program and get free API access