/build/rpc / pricing / market
pricing.market.push_vol_surface
pricing.market.push_vol_surface "asset_id" [strike,...] [maturity,...] [[vol,...],...] ( "source" ) Add or update a volatility surface in the pricing cache Arguments: 1. asset_id (string, required) Asset ID 2. strikes_pct (json array, required) Strike grid in moneyness % [ strike, (numeric, required) Strike moneyness (e.g., 1.0 = ATM) ... ] 3. maturities_days (json array, required) Maturity grid in days [ maturity, (numeric, required) Maturity in days ... ] 4. implied_vols (json array, required) Implied vol matrix [strike][maturity] [ [ (json array, required) Vol row for one strike vol, (numeric, required) Implied vol (annualized) ... ], ... ] 5. source (string, optional, default="market") Price source: 'mark' (manual) or 'market' (calibrated) Result: { (json object) "success" : true|false, (boolean) True if vol surface was added successfully "error" : "str" (string, optional) Error message if validation failed } Examples: > bitcoin-cli pricing.market.push_vol_surface "BTC_ID" "[0.9,1.0,1.1]" "[30,90,180]" "[[0.5,0.6,0.7],[0.4,0.5,0.6],[0.3,0.4,0.5]]"
Signature
pricing.market.push_vol_surface(asset_id: string, strikes_pct: array, maturities_days: array, implied_vols: array, source?: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"pricing.market.push_vol_surface","params":["\"<asset_id>\"",[],[],[],"market"]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset_id | string | yes | Asset ID |
| strikes_pct | any[] | yes | Strike grid in moneyness % [ strike, (numeric, required) Strike moneyness (e.g., 1.0 = ATM) ... ] |
| maturities_days | any[] | yes | Maturity grid in days [ maturity, (numeric, required) Maturity in days ... ] |
| implied_vols | any[] | yes | Implied vol matrix [strike][maturity] [ [ (json array, required) Vol row for one strike vol, (numeric, required) Implied vol (annualized) ... ], ... ] |
| source | string | — | Price source: 'mark' (manual) or 'market' (calibrated) |
Result
Type: any
{ (json object) "success" : true|false, (boolean) True if vol surface was added successfully "error" : "str" (string, optional) Error message if validation failed }
Source: services/core-node/bcore/src/wallet/pricing/rpc/pricing_market.cpp:186
C++ symbol: pricing_market_push_vol_surface