Enterprise API
REST + WebSocket + FIX 4.4/5.0

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.

Base URL
https://api.asmlink.com/v2
Protocols
REST · WebSocket · FIX
Auth
API Key (header)
Format
JSON / FIX 4.4
00 / Auth

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.

Required Header
X-CM-API-Key : cm_live_<your_corporate_key_here>
// Sandbox keys are prefixed cm_test_ — production keys cm_live_
01 / Limits

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
02 / Liquidity Routing API

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.

POST /v2/order/route — Request
12345 678910
{
  "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"
}
200 OK — Response
12345 678910 111213
{
  "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"
}
03 / Custom Charting API

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.

GET /v2/chart/ohlcv — Request
12345 6789
{
  "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"
}
200 OK — Response (truncated)
12345 678910 1112131415 1617181920
{
  "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
}
04 / Webhooks & Auto Trading MT4 Infrastructure

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 confirmed
  • order.rejected — Order rejected by LP or risk engine
  • order.cancelled — Client-initiated or system cancel
  • margin.call — Account margin threshold breached
  • margin.liquidation — Forced liquidation executed
  • system.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.

Webhook Payload — order.filled
12345 678910 1112131415 16171819
{
  "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
}
POST /v2/webhook/register
12345 678910
{
  "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"
}
05 / Environments

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.

Sandbox
Base URL : https://api-sandbox.asmlink.com/v2
// Simulated liquidity — full API parity — no execution charges
Production
Base URL : https://api.asmlink.com/v2
// Live liquidity — corporate onboarding required — SLA-backed
Ready to integrate?
Request Sandbox Access

Test the liquidity routing API, custom charting API, and webhook system against our full-parity sandbox environment. Available to registered corporate entities only.

Request Sandbox Access