/build/rpc / pricing / market
pricing.market.push_correlation
pricing.market.push_correlation ["asset_id",...] [[corr,...],...] Add or update the correlation matrix in the pricing cache Arguments: 1. asset_ids (json array, required) Asset IDs in matrix order [ "asset_id", (string, required) Asset ID ... ] 2. correlation_matrix (json array, required) Correlation matrix (must be symmetric, PSD) [ [ (json array, required) Correlation row corr, (numeric, required) Correlation coefficient ... ], ... ] Result: { (json object) "success" : true|false, (boolean) True if correlation matrix was added successfully "error" : "str" (string, optional) Error message if validation failed } Examples: > bitcoin-cli pricing.market.push_correlation "[\"BTC_ID\",\"USDT_ID\"]" "[[1.0,0.3],[0.3,1.0]]"
Signature
pricing.market.push_correlation(asset_ids: array, correlation_matrix: array) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"pricing.market.push_correlation","params":[[],[]]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| asset_ids | any[] | yes | Asset IDs in matrix order [ "asset_id", (string, required) Asset ID ... ] |
| correlation_matrix | any[] | yes | Correlation matrix (must be symmetric, PSD) [ [ (json array, required) Correlation row corr, (numeric, required) Correlation coefficient ... ], ... ] |
Result
Type: any
{ (json object) "success" : true|false, (boolean) True if correlation matrix was added successfully "error" : "str" (string, optional) Error message if validation failed }
Source: services/core-node/bcore/src/wallet/pricing/rpc/pricing_market.cpp:280
C++ symbol: pricing_market_push_correlation