Enterprise Order
Routing API
Developer reference for connecting custom matching engines and corporate brokerage infrastructure to our liquidity routing API, custom charting API, and EA hosting webhook system. Delivered exclusively to registered corporate entities.
Authentication
All API requests must include your corporate API key in the request header. Keys are issued to verified corporate entities only and are scoped per environment (sandbox and production). Rotate credentials via the client portal; never embed keys in client-side code.
Rate Limits
Rate limits are applied per corporate entity at the API gateway level. WebSocket streaming connections are not subject to per-request limits but are governed by message throughput quotas defined in your service agreement. Exceeding limits returns 429 Too Many Requests with a Retry-After header.
| Endpoint Group | Method | Limit | Window |
|---|---|---|---|
| /v2/order/route | POST | 1,000 req | per second |
| /v2/chart/ohlcv | GET | 500 req | per minute |
| /v2/stream/tick | WS | Unlimited req | throughput SLA |
| /v2/webhook/register | POST | 100 req | per hour |
| /v2/account/* | GET | 300 req | per minute |
Liquidity Routing API
The liquidity routing API provides enterprise order routing connectivity between your custom matching engine and our b2b liquidity solutions network. All order flow is processed through our FIX 4.4 and FIX 5.0 compatible gateway, with parallel WebSocket streaming available for real-time execution acknowledgements and fill updates.
Overview
Submit orders to /v2/order/route via POST. The routing engine resolves the optimal liquidity tier based on instrument, size, and current provider availability. Response includes execution acknowledgement and partial fill data where applicable.
Routing Tiers
- Tier 1 — Primary institutional LP pool, tightest spreads, highest fill probability
- Tier 2 — Secondary aggregated pool, fallback on Tier 1 reject
- Tier 3 — Last-look providers, used for large block orders only
FIX Protocol
FIX 4.4 and FIX 5.0 sessions are provisioned per corporate client with dedicated session IDs, heartbeat configuration, and sequence number management. Contact enterprise sales to provision a FIX session.
WebSocket Stream
Connect to wss://stream.asmlink.com/v2/executions to receive real-time execution events on your corporate API key. Events are pushed on fill, partial fill, reject, and cancel.
{ "order_id": "ORD-20240815-00421", "symbol": "EURUSD", "side": "BUY", "quantity": 5000000, "order_type": "MARKET", "routing_tier": "TIER_1", "account_id": "CORP-ENT-0042", "timestamp_utc": "2024-08-15T09:31:04.882Z" }
{ "order_id": "ORD-20240815-00421", "status": "FILLED", "fill_price": 1.08423, "fill_quantity": 5000000, "liquidity_provider": "LP-TIER1-03", "routing_tier": "TIER_1", "execution_latency_ms": 0.31, "slippage_pips": 0.0, "timestamp_fill_utc": "2024-08-15T09:31:04.913Z", "account_id": "CORP-ENT-0042" }
Custom Charting API
The custom charting API provides integration endpoints for financial charting software and b2b trading charts embedded within white label platform builds. OHLCV data endpoints deliver historical and streaming candle data across all supported instruments and timeframes, with indicator overlay support for common technical studies.
Data Endpoints
Request historical OHLCV data via /v2/chart/ohlcv. Supports tick, M1 through MN timeframes. Timestamp parameters accept Unix epoch (milliseconds) or ISO 8601.
Tick Streaming
Subscribe to live tick data for b2b trading charts via the WebSocket endpoint wss://stream.asmlink.com/v2/ticks. Send a JSON subscription frame with symbol and depth fields on connect.
Indicator Overlays
Request server-side computed indicators by passing include_indicators in the OHLCV request body. Supported: SMA, EMA, RSI, MACD, Bollinger Bands, ATR, VWAP.
Multi-Timeframe
Batch requests across multiple timeframes in a single call using the timeframes array field. Response returns a keyed object per timeframe.
{ "symbol": "XAUUSD", "timeframe": "H1", "from_timestamp": 1723680000000, "to_timestamp": 1723766400000, "include_indicators": ["EMA_20", "RSI_14", "ATR_14"], "price_type": "BID", "account_id": "CORP-ENT-0042" }
{ "symbol": "XAUUSD", "timeframe": "H1", "candle_count": 24, "candles": [ { "t": 1723680000000, "open": 2490.12, "high": 2497.88, "low": 2487.44, "close": 2494.60, "volume": 18420, "ema_20": 2489.33, "rsi_14": 61.4, "atr_14": 8.21 } ], // ... remaining candles truncated }
Automated Systems and Webhooks
Our webhook system delivers real-time execution event notifications to your EA hosting infrastructure. Register endpoint URLs via /v2/webhook/register and subscribe to event types covering order fills, rejects, margin calls, and system alerts. All webhook payloads are signed with HMAC-SHA256 using your corporate secret key.
Webhooks support configurable retry logic with exponential backoff across up to five delivery attempts. Failed deliveries are logged in the client portal with full payload inspection. Event types can be filtered at registration time to reduce noise in high-throughput deployments.
Event Types
order.filled— Full or partial fill confirmedorder.rejected— Order rejected by LP or risk engineorder.cancelled— Client-initiated or system cancelmargin.call— Account margin threshold breachedmargin.liquidation— Forced liquidation executedsystem.alert— Infrastructure or connectivity event
Retry Logic
Failed deliveries are retried at 5s, 30s, 2m, 10m, and 30m intervals. After five failures the event is marked DELIVERY_FAILED and queued for manual replay.
Signature Verification
Verify the X-CM-Signature header against HMAC-SHA256(secret, raw_body). Reject payloads where signatures do not match.
Idempotency
Each payload includes a unique event_id. Store processed IDs to deduplicate retried deliveries safely.
{ "event_id": "evt_8f3a91c4d02e", "event_type": "order.filled", "timestamp_utc": "2024-08-15T09:31:04.913Z", "account_id": "CORP-ENT-0042", "order_id": "ORD-20240815-00421", "symbol": "EURUSD", "side": "BUY", "execution_status": "FILLED", "fill_price": 1.08423, "fill_quantity": 5000000, "latency_ms": 0.31, "routing_tier": "TIER_1", "delivery_attempt": 1, "signature_header": "X-CM-Signature", "idempotent": true }
{ "url": "https://your-system.example.com/hooks/cm", "events": [ "order.filled", "order.rejected", "margin.call" ], "secret": "whs_your_hmac_secret_here", "account_id": "CORP-ENT-0042" }
Environments
Two isolated environments are available. The sandbox environment provides full API parity with production but operates against simulated liquidity. Sandbox keys are prefixed cm_test_ and do not incur execution charges. Production environments require completed corporate onboarding.
Test the liquidity routing API, custom charting API, and webhook system against our full-parity sandbox environment. Available to registered corporate entities only.