Venue-local margin evidence and supported candidate-plan comparison.
Deribit and OKX expose joint-plan simulations and can be ranked within one venue/account/collateral domain. Bybit exposes a single-order quote and Derive exposes a position-scenario result; those observations stay individually labelled and never enter a portfolio-offset calculation.
Summary
Functions
Returns the provider-authoritative margin capability classifications.
Returns one venue's margin capability or an explicit not-supported error.
Evaluates caller-supplied plans and ranks only eligible joint-plan results.
Types
@type capability() :: %{ label: capability_label(), endpoint: atom(), account_modes: [atom()], official_reference: String.t() }
@type capability_label() ::
:joint_plan_simulation
| :single_order_margin_quote
| :position_scenario_margin
@type problem() :: %{ candidate_plans: [candidate_plan()], objective: :minimize | :maximize, weights: %{required(atom()) => number()}, tie_break_policy: [atom()] }
Functions
@spec capabilities() :: %{required(String.t()) => capability()}
Returns the provider-authoritative margin capability classifications.
@spec capability(String.t() | atom()) :: {:ok, capability()} | {:error, Bourse.Error.t()}
Returns one venue's margin capability or an explicit not-supported error.
@spec compare(problem()) :: {:ok, result()} | {:error, Bourse.Error.t()}
Evaluates caller-supplied plans and ranks only eligible joint-plan results.
Ranking is local to one venue, account, account mode, and provider collateral scope. The result deliberately has no global cross-venue winner.