Receive real-time accounting and ledger 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
/accounting

Real-time accounting updates including fills, cancellations, merges, and payouts. This stream provides atomic updates for both cash and position balances.

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 are identical to the /orders stream.

Operation WebSockets-specific information

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

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

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

      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]
    • account_id array[string]
SUBSCRIBE /accounting

Accounting Update Frame

Unified atomic update of cash and position balances for an account within one engine tick.

Payload

  • type string Required

    Value is accounting_update.

  • seq integer(int64) Required
  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attributes Show payload attributes object
    • account_id string Required
    • market_id string Required
    • ref_id string Required

      System reference (order_id or cmd_id)

    • client_ref_id string Required

      Client reference (client_order_id or client_merge_id)

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

          Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

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

            Minimum value is -999999999, maximum value is 999999999.

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

            Minimum value is -999999999, maximum value is 999999999.

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

            Minimum value is -999999999, maximum value is 999999999.

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

            Minimum value is -999999999, maximum value is 999999999.

    • merge object
      Hide merge attributes Show merge attributes object
      • merge_id string(uuid) Required
      • merged_qty object Required
        Hide merged_qty attributes Show merged_qty attributes object
        • units integer(int64) Required
        • nanos integer(int32) Required

          Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

Payload examples
{
  "type": "accounting_update",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "account_id": "string",
    "market_id": "string",
    "ref_id": "string",
    "client_ref_id": "string",
    "deltas": {
      "cash": {
        "units": 42,
        "nanos": 42
      },
      "margin_release": {
        "units": 42,
        "nanos": 42
      },
      "position_delta": {
        "yes_qty": {
          "units": 42,
          "nanos": 42
        },
        "no_qty": {
          "units": 42,
          "nanos": 42
        },
        "yes_reserved": {
          "units": 42,
          "nanos": 42
        },
        "no_reserved": {
          "units": 42,
          "nanos": 42
        }
      }
    },
    "merge": {
      "merge_id": "string",
      "merged_qty": {
        "units": 42,
        "nanos": 42
      },
      "pnl_realized": {
        "units": 42,
        "nanos": 42
      }
    }
  }
}

Accounting Payout Frame

Final cash and position adjustment from market settlement or void

Payload

  • type string Required

    Value is accounting_payout.

  • seq integer(int64) Required
  • ts_ns integer(int64) Required
  • payload object Required
    Hide payload attributes Show payload attributes object
    • account_id string Required
    • market_id string Required
    • payout_id string(uuid) Required
    • reason string Required

      Values are SETTLEMENT or VOID.

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

        Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

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

          Minimum value is -999999999, maximum value is 999999999.

Payload examples
{
  "type": "accounting_payout",
  "seq": 42,
  "ts_ns": 42,
  "payload": {
    "account_id": "string",
    "market_id": "string",
    "payout_id": "string",
    "reason": "SETTLEMENT",
    "cash_delta": {
      "units": 42,
      "nanos": 42
    },
    "position_delta": {
      "yes_qty": {
        "units": 42,
        "nanos": 42
      },
      "no_qty": {
        "units": 42,
        "nanos": 42
      },
      "yes_reserved": {
        "units": 42,
        "nanos": 42
      },
      "no_reserved": {
        "units": 42,
        "nanos": 42
      }
    }
  }
}

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": {}
  }
}