Introduction to XYLOS API
Welcome to the XYLOS API documentation. Our API provides programmatic access to the world's most advanced quantum trading platform, enabling you to integrate our cutting-edge technology into your applications.
🚀 RESTful API
Access all trading features through our comprehensive REST API with sub-millisecond latency.
Learn more →⚡ WebSocket Streams
Real-time market data and order updates through our quantum-enhanced WebSocket connections.
Learn more →🔮 Quantum Oracle API
Access AI-powered predictions and quantum computing insights for advanced trading strategies.
Learn more →Quick Start
Get started with the XYLOS API in just a few minutes:
1. Create an API Key
Log in to your XYLOS account and navigate to API Management to create your API credentials.
2. Install SDK (Optional)
pip install xylos-sdk
npm install @xylos/sdk
go get github.com/xylos-protocol/xylos-go
3. Make Your First Request
from xylos import Client
client = Client(api_key='your_api_key', api_secret='your_api_secret')
# Get account balance
balance = client.get_balance()
print(balance)
# Place a market order
order = client.create_order(
symbol='BTC/USDT',
type='market',
side='buy',
amount=0.01
)
print(order)
const { XylosClient } = require('@xylos/sdk');
const client = new XylosClient({
apiKey: 'your_api_key',
apiSecret: 'your_api_secret'
});
// Get account balance
const balance = await client.getBalance();
console.log(balance);
// Place a market order
const order = await client.createOrder({
symbol: 'BTC/USDT',
type: 'market',
side: 'buy',
amount: 0.01
});
console.log(order);
curl -X GET "https://api.xylos.io/v1/account/balance" \
-H "X-API-KEY: your_api_key" \
-H "X-API-SIGNATURE: signature" \
-H "X-API-TIMESTAMP: timestamp"
Authentication
All API requests must be authenticated using your API key and secret. XYLOS uses HMAC-SHA256 signatures to ensure request integrity.
Required Headers
Header | Description | Example |
---|---|---|
X-API-KEY |
Your API key | pk_live_a1b2c3d4e5f6 |
X-API-TIMESTAMP |
Unix timestamp in milliseconds | 1640995200000 |
X-API-SIGNATURE |
HMAC-SHA256 signature | 7f8a9b2c3d4e5f... |
Signature Generation
signature = HMAC-SHA256(
secret_key,
timestamp + method + path + body
)
Market Data Endpoints
/v1/market/ticker/{symbol}
Get current ticker data
/v1/market/orderbook/{symbol}
Get order book depth
/v1/market/trades/{symbol}
Get recent trades
/v1/market/candles/{symbol}
Get OHLCV candle data
Example Response
{
"symbol": "BTC/USDT",
"last": 45123.50,
"bid": 45120.00,
"ask": 45125.00,
"volume_24h": 1234.56,
"change_24h": 2.35,
"timestamp": 1640995200000
}