/build/rpc / pricing / market
pricing.market.push_fx
pricing.market.push_fx "base_asset" "quote_asset" spot_rate ( bid_ask_bps "source" base_is_native quote_is_native ) Add or update an FX quote in the pricing cache Arguments: 1. base_asset (string, required) Base asset ID (ignored if base_is_native=true) 2. quote_asset (string, required) Quote asset ID (ignored if quote_is_native=true) 3. spot_rate (numeric, required) Spot rate (base/quote) 4. bid_ask_bps (numeric, optional, default=0) Bid-ask spread in basis points 5. source (string, optional, default="market") Price source: 'mark' (manual) or 'market' (calibrated) 6. base_is_native (boolean, optional, default=false) True if base is native BTC/TSC 7. quote_is_native (boolean, optional, default=false) True if quote is native BTC/TSC Result: { (json object) "success" : true|false, (boolean) True if FX quote was added successfully "error" : "str" (string, optional) Error message if validation failed } Examples: > bitcoin-cli pricing.market.push_fx "USDT_ID" "TSC_ID" 0.95 5.0 > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "pricing.market.push_fx", "params": ["USDT_ID", "TSC_ID", 0.95, 5.0]}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
pricing.market.push_fx(base_asset: string, quote_asset: string, spot_rate: number, bid_ask_bps?: number, source?: string, base_is_native?: boolean, quote_is_native?: boolean) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"pricing.market.push_fx","params":["\"<base_asset>\"","\"<quote_asset>\"",0,0,"market",false,false]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| base_asset | string | yes | Base asset ID (ignored if base_is_native=true) |
| quote_asset | string | yes | Quote asset ID (ignored if quote_is_native=true) |
| spot_rate | number | yes | Spot rate (base/quote) |
| bid_ask_bps | number | — | Bid-ask spread in basis points |
| source | string | — | Price source: 'mark' (manual) or 'market' (calibrated) |
| base_is_native | boolean | — | True if base is native BTC/TSC |
| quote_is_native | boolean | — | True if quote is native BTC/TSC |
Result
Type: any
{ (json object) "success" : true|false, (boolean) True if FX quote was added successfully "error" : "str" (string, optional) Error message if validation failed }
Source: services/core-node/bcore/src/wallet/pricing/rpc/pricing_market.cpp:117
C++ symbol: pricing_market_push_fx