/build/rpc / pricing / market
pricing.market.push_curve
pricing.market.push_curve "asset_id" ( is_native ) [tenor,...] [rate,...] ( "source" ) Add or update a discount curve in the pricing cache Arguments: 1. asset_id (string, required) Asset ID (use '0' or empty for native BTC) 2. is_native (boolean, optional, default=false) True if native BTC 3. tenors_days (json array, required) Tenor grid in days [ tenor, (numeric, required) Tenor in days ... ] 4. zero_rates (json array, required) Zero rates (annualized, continuous) [ rate, (numeric, required) Zero rate ... ] 5. source (string, optional, default="market") Price source: 'mark' (manual) or 'market' (calibrated) Result: { (json object) "success" : true|false, (boolean) True if curve was added successfully "error" : "str" (string, optional) Error message if validation failed } Examples: > bitcoin-cli pricing.market.push_curve "USDT_ID" false "[7,30,90,180,365]" "[0.05,0.055,0.06,0.065,0.07]" > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "pricing.market.push_curve", "params": ["USDT_ID", false, [7,30,90,180,365], [0.05,0.055,0.06,0.065,0.07]]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
pricing.market.push_curve(asset_id: string, is_native?: boolean, tenors_days: array, zero_rates: array, source?: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"pricing.market.push_curve","params":["\"<asset_id>\"",false,[],[],"market"]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset_id | string | yes | Asset ID (use '0' or empty for native BTC) |
| is_native | boolean | — | True if native BTC |
| tenors_days | any[] | yes | Tenor grid in days [ tenor, (numeric, required) Tenor in days ... ] |
| zero_rates | any[] | yes | Zero rates (annualized, continuous) [ rate, (numeric, required) Zero rate ... ] |
| source | string | — | Price source: 'mark' (manual) or 'market' (calibrated) |
Result
Type: any
{ (json object) "success" : true|false, (boolean) True if curve was added successfully "error" : "str" (string, optional) Error message if validation failed }
Source: services/core-node/bcore/src/wallet/pricing/rpc/pricing_market.cpp:32
C++ symbol: pricing_market_push_curve