/build/rpc / pricing / portfolio
pricing.portfolio.summary
pricing.portfolio.summary ( "report_asset" compute_greeks ) Compute aggregated portfolio statistics across all repo and forward contracts Arguments: 1. report_asset (string, optional, default="") Reporting currency (empty for TSC) 2. compute_greeks (boolean, optional, default=false) Aggregate portfolio Greeks (approximate) Result: { (json object) "total_repo_count" : n, (numeric) Number of repo contracts "total_forward_count" : n, (numeric) Number of forward contracts "total_repo_mtm" : n, (numeric) Aggregate repo MTM (lender perspective) "total_forward_mtm" : n, (numeric) Aggregate forward MTM (Alice/long perspective) "net_portfolio_mtm" : n, (numeric) Total portfolio MTM "critical_warnings_count" : n, (numeric) Number of CRITICAL warnings "warning_count" : n, (numeric) Number of WARNING-level warnings "portfolio_greeks" : { (json object, optional) Aggregated Greeks (approximate) "total_delta" : n, (numeric) Sum of deltas "total_vega" : n, (numeric) Sum of vegas "gamma_note" : "str" (string) Gamma sums are approximate (non-additive) } } Examples: > bitcoin-cli pricing.portfolio.summary "" true > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "pricing.portfolio.summary", "params": ["", false]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
pricing.portfolio.summary(report_asset?: string, compute_greeks?: boolean) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"pricing.portfolio.summary","params":["",false]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| report_asset | string | — | Reporting currency (empty for TSC) |
| compute_greeks | boolean | — | Aggregate portfolio Greeks (approximate) |
Result
Type: any
{ (json object) "total_repo_count" : n, (numeric) Number of repo contracts "total_forward_count" : n, (numeric) Number of forward contracts "total_repo_mtm" : n, (numeric) Aggregate repo MTM (lender perspective) "total_forward_mtm" : n, (numeric) Aggregate forward MTM (Alice/long perspective) "net_portfolio_mtm" : n, (numeric) Total portfolio MTM "critical_warnings_count" : n, (numeric) Number of CRITICAL warnings "warning_count" : n, (numeric) Number of WARNING-level warnings "portfolio_greeks" : { (json object, optional) Aggregated Greeks (approximate) "total_delta" : n, (numeric) Sum of deltas "total_vega" : n, (numeric) Sum of vegas "gamma_note" : "str" (string) Gamma sums are approximate (non-additive) } }
Source: services/core-node/bcore/src/wallet/pricing/rpc/pricing_diagnostics.cpp:232
C++ symbol: pricing_portfolio_summary