| Date | Asset | Type | Amount | Price | Total |
|---|---|---|---|---|---|
| 2024-01-20 | BTC | Buy | 0.5 | $95,247.50 | $47,623.75 |
| 2024-01-19 | ETH | Buy | 10 | $3,247.50 | $32,475.00 |
| 2024-01-18 | SOL | Buy | 100 | 87.34 | 8,734.00 |
Complete REST API reference for the cryptocurrency exchange platform
https://api.cryptox.com/v1
All requests require an API key in the header:
Authorization: Bearer YOUR_API_KEY
Get market ticker data for all trading pairs
curl -X GET https://api.cryptox.com/v1/market/ticker \
-H "Authorization: Bearer YOUR_API_KEY"
{
"data": [
{
"symbol": "BTCUSDT",
"price": "95247.50",
"change_24h": "2.34",
"volume_24h": "1234567.89"
},
{
"symbol": "ETHUSDT",
"price": "3247.50",
"change_24h": "1.87",
"volume_24h": "987654.32"
}
]
}
Place a new trading order
curl -X POST https://api.cryptox.com/v1/trade/order \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"symbol": "BTCUSDT",
"side": "buy",
"type": "limit",
"quantity": "0.5",
"price": "95000.00"
}'
{
"data": {
"order_id": "123456789",
"status": "pending",
"symbol": "BTCUSDT",
"side": "buy",
"type": "limit",
"quantity": "0.5",
"price": "95000.00",
"timestamp": "2024-01-20T14:30:00Z"
}
}
Authorization: Bearer {access_token}
Content-Type: application/json
401 Unauthorized
Invalid or missing API key
429 Too Many Requests
Rate limit exceeded
400 Bad Request
Invalid parameters or missing required fields
import requests
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.get(
'https://api.cryptox.com/v1/market/ticker',
headers=headers
)
print(response.json())
const ws = new WebSocket('wss://api.cryptox.com/v1/websocket');
ws.onopen = () => {
ws.send(JSON.stringify({
action: 'subscribe',
channels: ['ticker', 'trades']
}));
};