Logo
RescaleEquity - Loading. Please Wait

Authentication

All API requests require authentication using an API key and secret. Include your credentials in the request header.

API Key Authentication

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

HMAC-SHA256 Signature

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

Market Data API

GET

/api/v1/market/tickers

Get real-time ticker data for all trading pairs.

Query Parameters
Parameter Type Description
symbol string Optional: Specific trading pair (e.g., BTCUSD)
limit integer Optional: Max results (default: 100)
Response Example
{
  "status": "success",
  "data": [
    {
      "symbol": "BTCUSD",
      "price": 45250.75,
      "change24h": 2.45,
      "volume24h": 28500000,
      "high24h": 46100,
      "low24h": 44800
    }
  ]
}
GET

/api/v1/market/candles

Get OHLCV candlestick data for technical analysis.

Query Parameters
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)

Trading Endpoints

POST

/api/v1/orders/create

Create a new trading order.

Request Body
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)
Request Example
{
  "symbol": "BTCUSD",
  "side": "buy",
  "type": "limit",
  "quantity": 0.5,
  "price": 45000
}
GET

/api/v1/orders

Get list of your orders (active and historical).

Query Parameters
Parameter Type Description
status string active, filled, cancelled, pending
limit integer Max results (default: 50)

Portfolio Management

GET

/api/v1/account/balance

Get your account balance and holdings.

Response Example
{
  "status": "success",
  "data": {
    "totalBalance": 250000,
    "availableBalance": 175000,
    "reservedBalance": 75000,
    "holdings": [
      {
        "symbol": "BTC",
        "quantity": 2.5,
        "avgCost": 35000,
        "currentPrice": 45250,
        "unrealizedGain": 25625
      }
    ]
  }
}

WebSocket Streaming

Connect to WebSocket for real-time market data and order updates.

Connection

wss://stream.rescaleequity.com/ws?token=YOUR_API_KEY

Subscribe to Market Data

{
  "method": "SUBSCRIBE",
  "params": ["BTCUSD@ticker", "ETHUSD@ticker"],
  "id": 1
}

Error Handling

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

Rate Limits

  • Free Tier: 100 requests/minute
  • Professional: 1,000 requests/minute
  • Enterprise: Custom limits

Code Examples

Python Example
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())
JavaScript Example
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));

Need Help?

For API support, contact our development team at [email protected] or visit our contact page.