clio
clio copied to clipboard
[get_aggregate_price] with decimal trim value returns error on Clio
Issue Description
Steps to Reproduce
- Create two oracles.
- Send a get_aggregate_price request with decimal trim value.
{
"method": "get_aggregate_price",
"params": [
{
"base_asset": "BTC",
"quote_asset": "ETH",
"trim": 1.2,
"oracles": [
{
"account": "rwz8i5bUKa12tYxQjsSuzDQaBwKkuGUqa5",
"oracle_document_id": 1
},
{
"account": "rDtBhKmzKveCSd5jmrcQD6CU8kidCLCy7h",
"oracle_document_id": 1
}
]
}
]
}
Expected Result
Rippled response:
{
"result": {
"entire_set": {
"mean": "74",
"size": 2,
"standard_deviation": "0"
},
"ledger_current_index": 81783,
"median": "74",
"status": "success",
"time": 1713826145,
"trimmed_set": {
"mean": "74",
"size": 2,
"standard_deviation": "0"
},
"validated": false
}
}
Actual Result
{
"result": {
"error": "invalidParams",
"error_code": 31,
"error_message": "Invalid parameters.",
"status": "error",
"type": "response",
"request": {
"method": "get_aggregate_price",
"params": [
{
"base_asset": "BTC",
"quote_asset": "ETH",
"trim": 1.2E0,
"oracles": [
{
"account": "rwz8i5bUKa12tYxQjsSuzDQaBwKkuGUqa5",
"oracle_document_id": 1
},
{
"account": "rDtBhKmzKveCSd5jmrcQD6CU8kidCLCy7h",
"oracle_document_id": 1
}
]
}
]
}
},
"warnings": [
{
"id": 2001,
"message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
}
]
}
Environment
Supporting Files
Same case:https://github.com/XRPLF/clio/issues/1371#issuecomment-2071704621
Fixed on rippled end