Receive real-time order updates

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "broker-asyncapi MCP server": {
    "url": "https://bump.sh/tie-tech/hub/b2b-api/doc/broker-asyncapi/mcp"
  }
}

Close
/orders

Real-time order updates stream with resume capability.

Query Parameters:

  • since=<uint64> Last applied seq for resume (optional; must be >0; absent or 0 → start from live tail)
  • market=<id> Repeatable; filter by market_id
  • account_id=<id> Repeatable; filter by account_id

Resume Semantics:

  1. Client connects with since=S (last applied seq)
  2. Server replays frames with seq >= S in order
  3. Sends backlog_end (last_seq = current max)
  4. Continues live streaming If S > current max → immediate live (no backlog) If S too old (retention gap) → error frame (code=resume_too_old) then close (4009)

Idempotency / Ordering:

  • seq strictly monotonic per broker; no gaps (gap ⇒ operational incident)
  • Client drops any frame with seq <= last_applied_seq
  • Expected next seq = last_applied_seq + 1 (else trigger reconnect + resume)

Heartbeats:

  • Sent when no order_update within configured interval
  • Heartbeat does NOT advance seq; only order_update frames advance seq
  • Heartbeat and backlog_end both repeat the last data seq

Flow Control:

  • Server may enforce max_pending_frames/bytes and close with code 4008 (flow_control)

Close Codes: 1000 normal 1001 going_away 1011 internal_error 4008 flow_control 4009 resume_too_old / protocol_version 4401 unauthorized

Operation WebSockets-specific information

  • headers object
    Hide headers attributes Show headers attributes object
    • PRE-ACCESS-KEY string Required

      Broker access key identifier

      Format should match the following pattern: ^[A-Za-z0-9._~-]{1,64}$.

    • PRE-ACCESS-TIMESTAMP string(date-time) Required

      RFC3339 timestamp with milliseconds

    • PRE-ACCESS-SIGNATURE string Required

      Keyed BLAKE2b-256 signature hex lowercase

      Format should match the following pattern: ^[0-9a-f]{64}$.

  • query object
    Hide query attributes Show query attributes object
    • since integer(int64)

      Resume from last applied seq (inclusive). Must be >0. If omitted or 0, start from live tail.

      Minimum value is 1.

    • market array[string]

      Repeatable filter by market_id. Absent → all markets accessible to broker.

    • event_id array[string]

      Repeatable filter by event_id. Absent → all events accessible to broker.

    • account_id array[string]

      Repeatable filter by account_id. Absent → all accounts of broker.

SUBSCRIBE /orders

Order Update Frame

Order state change notification

Payload

  • type string Required

    Value is order_update.

  • seq integer(int64) Required

    Minimum value is 0.

  • ts_ns integer(int64) Required
  • payload object Required

    Current state of an order.

    Hide payload attributes Show payload attributes object
    • order_id string(uuid) Required
    • client_order_id string Required
    • market_id string Required
    • broker_id string Required
    • account_id string Required
    • side string Required

      Values are BUY or SELL.

    • type string Required

      Values are LIMIT or MARKET.

    • tif string Required

      Values are GTC, IOC, FOK, or DAY.

    • token string Required

      Values are YES or NO.

    • price object Required
      Hide price attributes Show price attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • qty object Required
      Hide qty attributes Show qty attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • volume object Required
      Hide volume attributes Show volume attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • filled_qty object Required
      Hide filled_qty attributes Show filled_qty attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • filled_volume object Required
      Hide filled_volume attributes Show filled_volume attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • filled_fee object

      Total filled fees accumulated on this order (in quote currency units).

      Hide filled_fee attributes Show filled_fee attributes object
      • units integer(int64) Required
      • nanos integer(int32) Required

        Minimum value is -999999999, maximum value is 999999999.

    • status string Required

      Values are NEW, ACTIVE, PARTIALLY_FILLED, FILLED, CANCELLED, EXPIRED, or REJECTED.

    • status_reason string

      Machine-readable reason code for the current status

      Values are USER_REQUEST, MARKET_CLOSED, MARKET_SETTLED, MARKET_VOIDED, TIF_EXPIRATION, FOK_FAILED, IOC_PARTIAL, SELF_TRADE_PREVENTION, INSUFFICIENT_FUNDS, SYSTEM_ERROR, ORDER_ALREADY_FILLED, ORDER_ALREADY_CANCELLED, ORDER_NOT_FOUND, QTY_INVALID, QTY_BELOW_EXECUTED, NO_MATCHING_LIQUIDITY, DUPLICATE_CLIENT_ORDER_ID, EXCEEDS_MAX_ORDER_QTY, EXCEEDS_MAX_ORDER_NOTIONAL, or EXCEEDS_MAX_POSITION.

    • last_update_wall_time_ns integer(int64) Required
    • last_update_engine_seq integer(int64) Required

      Monotonic engine sequence number of the last applied change

    • last_cmd_id_hex string

      32 lowercase hex

Payload examples
{
  "type": "order_update",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "order_id": "string",
    "client_order_id": "string",
    "market_id": "string",
    "broker_id": "string",
    "account_id": "string",
    "side": "BUY",
    "type": "LIMIT",
    "tif": "GTC",
    "token": "YES",
    "price": {
      "units": 42,
      "nanos": 42
    },
    "qty": {
      "units": 42,
      "nanos": 42
    },
    "volume": {
      "units": 42,
      "nanos": 42
    },
    "filled_qty": {
      "units": 42,
      "nanos": 42
    },
    "filled_volume": {
      "units": 42,
      "nanos": 42
    },
    "filled_fee": {
      "units": 42,
      "nanos": 42
    },
    "status": "NEW",
    "status_reason": "USER_REQUEST",
    "last_update_wall_time_ns": 42,
    "last_update_engine_seq": 42,
    "last_cmd_id_hex": "string"
  }
}

Order Reject Frame

Notification of a rejected order command (Amend/Cancel)

Payload

  • type string Required

    Value is order_reject.

  • seq integer(int64) Required

    Minimum value is 0.

  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attributes Show payload attributes object
    • command_type string Required

      Values are AMEND or CANCEL.

    • order_id string(uuid)
    • client_order_id string
    • reason string Required
    • correlation_id string(uuid) Required

      Correlation ID from the rejected command

Payload examples
{
  "type": "order_reject",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "command_type": "AMEND",
    "order_id": "string",
    "client_order_id": "string",
    "reason": "string",
    "correlation_id": "string"
  }
}

Heartbeat Frame

Keep-alive heartbeat (does not advance seq)

Payload

  • type string Required

    Value is heartbeat.

  • seq integer(int64)

    Repeats last delivered data seq; heartbeat does not advance global seq

    Minimum value is 0.

  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attribute Show payload attribute object
    • interval_sec integer Required

      Minimum value is 1.

Payload examples
{
  "type": "heartbeat",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "interval_sec": 42
  }
}

Backlog End Marker

Signals end of historical replay; live streaming begins

Payload

  • type string Required

    Value is backlog_end.

  • seq integer(int64) Required

    Minimum value is 0.

  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attribute Show payload attribute object
    • last_seq integer(int64) Required

      Minimum value is 0.

Payload examples
{
  "type": "backlog_end",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "last_seq": 42
  }
}

Error Frame

Error notification before close

Payload

  • type string Required

    Value is error.

  • seq integer(int64) Required

    Minimum value is 0.

  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attributes Show payload attributes object
    • code string Required
    • message string Required
    • details object

      Additional properties are allowed.

Payload examples
{
  "type": "error",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}