Receive real-time event/market lifecycle 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
/events

Real-time lifecycle events stream for events and markets with resume capability.

Query Parameters:

  • since=<uint64> Last applied seq for resume (optional; must be >0; absent or 0 → start from live tail)
  • event_id=<id> Repeatable; filter by event_id (includes all markets of the event)
  • market_id=<id> Repeatable; filter by market_id
  • lang=<code> Repeatable; filter by language code (en, pt, id). Filters LocalizedText fields in payloads. If omitted, all available locales are included.

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; 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)

Event Types:

  • event.created: New event created with full definition
  • event.status_changed: Event status changed (only status fields)
  • event.settled: Event resolved (includes expiration_value and resolved_market_id; either may be null)
  • event.voided: Event cancelled (includes void_reason)
  • market.created: New market created with full definition
  • market.status_changed: Market status changed (only status fields)
  • market.details_changed: Market details changed (title, subtitles, floor_strike)
  • market.settled: Market resolved (includes result, settlement_price, expiration_value)
  • market.voided: Market cancelled

Market Details At Resolution:

  • market.details_changed can arrive on a closed market at resolution, with a new floor_strike
  • It always comes before market.settled and event.settled of the same event
  • expiration_value in those two events matches the new floor_strike, and can carry more decimals than usual

Heartbeats:

  • Sent when no lifecycle_update within configured interval
  • Heartbeat does NOT advance seq; only lifecycle_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.

    • event_id array[string]

      Repeatable filter by event_id. Includes all markets of the event. Absent → all events accessible to broker.

    • market_id array[string]

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

    • lang array[string]

      Repeatable filter by language code. Filters localized text fields in payloads. If omitted, all available locales are included in each payload.

      Values are en, pt, or id.

SUBSCRIBE /events

Event/Market Lifecycle Update Frame

Event or market lifecycle state change notification

Payload

  • type string Required

    Value is event_update.

  • seq integer(int64) Required

    Monotonic sequence for lifecycle events

    Minimum value is 0.

  • ts_ns integer(int64) Required

    Timestamp in nanoseconds

  • event_id string | null

    Event ID (if applicable)

  • market_id string | null

    Market ID (if applicable)

  • event_type string Required

    Lifecycle event type

    Values are event.created, event.status_changed, event.settled, event.voided, market.created, market.status_changed, market.details_changed, market.settled, or market.voided.

  • payload object Required

    One of:
Payload examples
{
  "type": "event_update",
  "seq": 42,
  "ts_ns": 42,
  "event_id": "string",
  "market_id": "string",
  "event_type": "event.created",
  "payload": {
    "event_id": "string",
    "title": {
      "en": "string",
      "pt": "string",
      "id": "string"
    },
    "series_title": {
      "en": "string",
      "pt": "string",
      "id": "string"
    },
    "rules_primary": {
      "en": "string",
      "pt": "string",
      "id": "string"
    },
    "category": "crypto",
    "image_url": "string",
    "series": "",
    "status": "open",
    "void_reason": "string",
    "created_at": "2026-05-04T09:42:00Z",
    "opens_at": "2026-05-04T09:42:00Z",
    "closes_at": "2026-05-04T09:42:00Z",
    "settlement_sources": [
      {
        "name": "string",
        "url": "string",
        "underlying": {
          "base_currency": "string",
          "quote_currency": "string"
        }
      }
    ],
    "markets": [
      "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": {}
  }
}