1. Authentication
All endpoints require authentication via HMAC-SHA256 signatures. You must generate an API key and a Secret Key from your institutional dashboard. Do not expose your Secret Key.
import hmac
import hashlib
import time
def generate_signature(secret, method, path, timestamp, body=""):
message = f"{timestamp}{method}{path}{body}"
signature = hmac.new(
bytes(secret, 'latin-1'),
msg=bytes(message, 'latin-1'),
digestmod=hashlib.sha256
).hexdigest()
return signature
2. Rate Limiting
To protect matching engine integrity, strict rate limits are enforced at the network layer. Standard tiers allow 50 requests per second per IP. Exceeding this limit will trigger an HTTP 429 response. Repeated violations will result in temporary IP bans.
3. WebSocket Streams (Real-Time Data)
For ultra-low latency execution, polling REST endpoints is insufficient. You must maintain a persistent WebSocket connection. We utilize binary serialization (FlatBuffers) for maximum throughput.
const WebSocket = require('ws');
const ws = new WebSocket('wss://stream.harvestgroup360.com/v1/marketdata');
ws.on('open', function open() {
ws.send(JSON.stringify({
"action": "subscribe",
"channels": ["L2_orderbook", "trades"],
"symbols": ["EUR/USD", "BTC/USD"]
}));
});
ws.on('message', function incoming(data) {
// Data arrives in binary format (FlatBuffers) to minimize serialization overhead
const orderbook_update = decode_flatbuffer(data);
process_alpha_signal(orderbook_update);
});
4. Historical Tick Data (REST)
Our historical endpoints are backed by a ClickHouse cluster capable of querying petabytes of raw tick data in milliseconds. Use the /v1/historical/ticks endpoint to retrieve unaggregated L2 depth.
| Parameter | Type | Description |
symbol | string | Instrument ticker (e.g., AAPL, EUR/USD) |
start_time | int | UNIX epoch timestamp in milliseconds |
end_time | int | UNIX epoch timestamp in milliseconds |
resolution | string | 'tick', '1ms', '10ms', '100ms' |