# Install SDK (one command!)
pip install tradexil
# Use it immediately
from tradexil import TradeXilAPI
api = TradeXilAPI(api_key="your-key-here")
# Get latest BTC 1h candle
btc_candle = api.get_latest_candle('1h', format='json')
print(f"BTC Close: {btc_candle['close']}, RSI: {btc_candle['RSI_14']}")
# Get latest ETH 1h candle
api_eth = TradeXilAPI(api_key="your-key-here", symbol="ETHEUR")
eth_candle = api_eth.get_latest_candle('1h', format='json')
print(f"ETH Close: {eth_candle['close']}, RSI: {eth_candle['RSI_14']}")
# Get latest 1h candle for BTCEUR
$response = Invoke-WebRequest `
-Uri "https://www.tradexil.com/api/v1/latest-candle/BTCEUR/1h/json" `
-Headers @{"Authorization"="Bearer YOUR_API_KEY"}
$candle = ($response.Content | ConvertFrom-Json).data
Write-Host "Close: $($candle.close)"
# Get latest 1h candle for ETHEUR
$response = Invoke-WebRequest `
-Uri "https://www.tradexil.com/api/v1/latest-candle/ETHEUR/1h/json" `
-Headers @{"Authorization"="Bearer YOUR_API_KEY"}
$candle = ($response.Content | ConvertFrom-Json).data
Write-Host "ETH Close: $($candle.close)"
# Get latest BTC 1h candle (JSON)
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://www.tradexil.com/api/v1/latest-candle/BTCEUR/1h/json
# Get latest ETH 1h candle (JSON)
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://www.tradexil.com/api/v1/latest-candle/ETHEUR/1h/json
# Download BTC Parquet
curl -H "Authorization: Bearer YOUR_API_KEY" \
-o btc_latest.parquet \
https://www.tradexil.com/api/v1/latest-candle/BTCEUR/1h