wss://honeycluster.ioget_aggregate_priceReturns an aggregated price from multiple oracle instances, with optional outlier trimming.
{
"result": {
"entire_set": {
"mean": "0.53",
"size": 5,
"standard_deviation": "0.02"
},
"median": "0.53",
"time": 750171900,
"trimmed_set": {
"mean": "0.53",
"size": 4,
"standard_deviation": "0.01"
},
"ledger_index": 89012345
},
"status": "success",
"type": "response",
"id": 1
}| Field | Type | Description |
|---|---|---|
commandrequired | string | WebSocket command name |
id | object | Client-supplied identifier to correlate requests with responses. |
base_asset | string | The base asset for the price quote (e.g. "USD"). |
quote_asset | string | The quote asset for the price quote (e.g. "XRP"). |
oracles | object[] | Array of oracle instances to aggregate prices from. |
oracles[].required | string | The oracle provider account address. |
oracles[].required | integer | The oracle document ID on the account. |
trim | integer | Percentage of outlier prices to trim before aggregating (1-25). |
time_threshold | integer | Maximum age in seconds for oracle data to be considered fresh. |
api_version | object | API version for the response format. Version 2 is the default for rippled 2.0+. |
{
"command": "get_aggregate_price",
"id": 1,
"base_asset": "XRP",
"quote_asset": "USD",
"oracles": [
{
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
"oracle_document_id": 1
}
],
"trim": 20
}| Field | Type | Description |
|---|---|---|
result | object | |
status | enum<string> | Available successerror |
type | string | |
id | stringnumber | Echo of the client-provided correlation ID |
{
"result": {
"entire_set": {
"mean": "0.53",
"size": 5,
"standard_deviation": "0.02"
},
"median": "0.53",
"time": 750171900,
"trimmed_set": {
"mean": "0.53",
"size": 4,
"standard_deviation": "0.01"
},
"ledger_index": 89012345
},
"status": "success",
"type": "response",
"id": 1
}