Integrate orbits8's trading platform with your applications
Welcome to the orbits8 API documentation. Our REST API allows you to programmatically access trading features, account data, and market information. All API endpoints are secured with API key authentication.
Base URL: https://api.orbits8.com/v1
To use the API, you need to generate API keys from your account settings. You'll receive:
// Example API request with authentication
const apiKey = 'YOUR_API_KEY';
const apiSecret = 'YOUR_API_SECRET';
const timestamp = Date.now();
const signature = crypto.createHmac('sha256', apiSecret)
.update(timestamp + 'GET/api/v1/account')
.digest('hex');
fetch('https://api.orbits8.com/v1/account', {
headers: {
'X-API-Key': apiKey,
'X-Timestamp': timestamp,
'X-Signature': signature
}
});
Get latest ticker prices for all symbols
{
"BTCUSDT": {
"symbol": "BTCUSDT",
"price": "42345.67",
"volume": "1250.45",
"change": "+2.34",
"changePercent": "+5.23"
}
}
Get candlestick data for a symbol
Parameters:
symbol - Trading pair (e.g., BTCUSDT)interval - Timeframe (1m, 5m, 15m, 1h, 4h, 1d)limit - Number of candles (default 100, max 1000)
GET /klines?symbol=BTCUSDT&interval=1h&limit=50
Get current order book for a symbol
{
"bids": [
["42345.00", "1.5"],
["42340.00", "2.0"]
],
"asks": [
["42350.00", "1.2"],
["42355.00", "0.8"]
]
}
Place a new order
Parameters:
symbol - Trading pairside - BUY or SELLtype - MARKET, LIMIT, STOP_LOSSquantity - Amount to tradeprice - For limit orders
POST /order
{
"symbol": "BTCUSDT",
"side": "BUY",
"type": "LIMIT",
"quantity": 0.01,
"price": 42000
}
Cancel an open order
Get all open orders
Get account information
{
"accountId": "123456",
"email": "user@example.com",
"balance": 10000.00,
"equity": 12500.00,
"margin": 2500.00,
"freeMargin": 10000.00
}
Get account balance
Get all open positions
For real-time data, we provide WebSocket streams:
WebSocket URL: wss://stream.orbits8.com
/ws/ticker/{symbol} - Real-time ticker updates/ws/trades/{symbol} - Live trade execution stream/ws/orderbook/{symbol} - Order book depth updates/ws/kline/{symbol}/{interval} - Candle updates
// WebSocket connection example
const ws = new WebSocket('wss://stream.orbits8.com/ws/ticker/BTCUSDT');
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log('BTC Price:', data.price);
};
from orbits8 import Client
client = Client(api_key='YOUR_API_KEY', api_secret='YOUR_API_SECRET')
# Get ticker
ticker = client.get_ticker('BTCUSDT')
print(ticker)
# Place order
order = client.create_order(
symbol='BTCUSDT',
side='BUY',
type='LIMIT',
quantity=0.01,
price=42000
)
const orbits8 = require('orbits8-api');
const client = new orbits8.Client({
apiKey: 'YOUR_API_KEY',
apiSecret: 'YOUR_API_SECRET'
});
// Get account balance
const balance = await client.getBalance();
// Place market order
const order = await client.createOrder({
symbol: 'ETHUSDT',
side: 'SELL',
type: 'MARKET',
quantity: 0.5
});