All API requests require authentication using an API key and secret. Include your credentials in the request header.
Pass your API key in the Authorization header as a Bearer token.
Authorization: Bearer YOUR_API_KEY GET /api/v1/account HTTP/1.1 Host: api.rescaleequity.com
For sensitive operations, include a request signature.
X-API-Key: YOUR_API_KEY X-API-Sign: HMAC_SHA256(request_body, YOUR_API_SECRET) X-Timestamp: 1633024800000
Get real-time ticker data for all trading pairs.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Optional: Specific trading pair (e.g., BTCUSD) |
| limit | integer | Optional: Max results (default: 100) |
{
"status": "success",
"data": [
{
"symbol": "BTCUSD",
"price": 45250.75,
"change24h": 2.45,
"volume24h": 28500000,
"high24h": 46100,
"low24h": 44800
}
]
}
Get OHLCV candlestick data for technical analysis.
| Parameter | Type | Description |
|---|---|---|
| symbol | string | Trading pair (e.g., BTCUSD) - Required |
| interval | string | 1m, 5m, 15m, 1h, 4h, 1d, 1w |
| limit | integer | Number of candles (max: 1000) |
Create a new trading order.
| Field | Type | Description |
|---|---|---|
| symbol | string | Trading pair (e.g., BTCUSD) |
| side | string | buy or sell |
| type | string | market, limit, stop-loss |
| quantity | number | Order quantity |
| price | number | Price (required for limit orders) |
{
"symbol": "BTCUSD",
"side": "buy",
"type": "limit",
"quantity": 0.5,
"price": 45000
}
Get list of your orders (active and historical).
| Parameter | Type | Description |
|---|---|---|
| status | string | active, filled, cancelled, pending |
| limit | integer | Max results (default: 50) |
Get your account balance and holdings.
{
"status": "success",
"data": {
"totalBalance": 250000,
"availableBalance": 175000,
"reservedBalance": 75000,
"holdings": [
{
"symbol": "BTC",
"quantity": 2.5,
"avgCost": 35000,
"currentPrice": 45250,
"unrealizedGain": 25625
}
]
}
}
Connect to WebSocket for real-time market data and order updates.
wss://stream.rescaleequity.com/ws?token=YOUR_API_KEY
{
"method": "SUBSCRIBE",
"params": ["BTCUSD@ticker", "ETHUSD@ticker"],
"id": 1
}
The API returns standard HTTP status codes and detailed error messages.
| Status Code | Description |
|---|---|
| 200 | Successful request |
| 400 | Bad request - invalid parameters |
| 401 | Unauthorized - invalid API key |
| 403 | Forbidden - insufficient permissions |
| 429 | Too many requests - rate limited |
| 500 | Server error |
import requests
import hmac
import hashlib
import time
api_key = "YOUR_API_KEY"
api_secret = "YOUR_API_SECRET"
# Get ticker data
response = requests.get(
"https://api.rescaleequity.com/api/v1/market/tickers",
headers={"Authorization": f"Bearer {api_key}"}
)
print(response.json())
const axios = require('axios');
const api_key = "YOUR_API_KEY";
// Place an order
axios.post('https://api.rescaleequity.com/api/v1/orders/create', {
symbol: 'BTCUSD',
side: 'buy',
type: 'limit',
quantity: 0.5,
price: 45000
}, {
headers: { 'Authorization': `Bearer ${api_key}` }
})
.then(response => console.log(response.data))
.catch(error => console.error(error));
For API support, contact our development team at [email protected] or visit our contact page.