Get Balance Info

/get_balance_info

/get_balance_info/{address}/{multi_account_address}

Example Query:

https://base-hedger82.rasa.capital/get_balance_info/0xEb42F3b1aC3b1552138C7D30E9f4e0eF43229542/0x8Ab178C07184ffD44F0ADfF4eA2ce6cFc33F3b86

Example Response:

[
  {
    "party_a": {
      "allocated_balance": "19.947489329947233989",
      "cva": "0E-18",
      "party_a_mm": "0E-18",
      "party_b_mm": "0E-18",
      "lf": "0E-18",
      "pending_cva": "0E-18",
      "pending_party_a_mm": "0E-18",
      "pending_party_b_mm": "0E-18",
      "pending_lf": "0E-18",
      "address": "0xEb42F3b1aC3b1552138C7D30E9f4e0eF43229542",
      "upnl": "0E-18",
      "notional": "0",
      "timestamp": 1744045698,
      "available_balance": "19.947489329947233989"
    },
    "party_b": {
      "allocated_balance": "0",
      "cva": "0",
      "party_a_mm": "0",
      "party_b_mm": "0",
      "lf": "0",
      "pending_cva": "0",
      "pending_party_a_mm": "0",
      "pending_party_b_mm": "0",
      "pending_lf": "0",
      "address": "0x9206D9d8F7F1B212A4183827D20De32AF3A23c59",
      "upnl": "0",
      "notional": "0",
      "timestamp": 1744045699,
      "available_balance": "0"
    }
  }
]

Data Sources

  • On-Chain Contract Data: Values for Party A and Party B are fetched directly from the blockchain using the balanceInfoOfPartyA(address) and balanceInfoOfPartyB(address) contract method.

  • Hedger-Defined: Party B data and fields like upnl, notional, and timestamp are derived from the hedger's internal systems.

Derived Values

  • available_balance: Calculated as allocated_balance - (cva + lf + party_a_mm + party_b_mm).

  • upnl: Unrealized profit and loss (off-chain, sourced from hedger’s risk engine).

  • notional: Total open position value (off-chain, derived from hedger’s ledger).

  • timestamp: Last update time (Unix epoch, hedger-provided).

circle-info

This is not an essential endpoint for frontends

Last updated