Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[get_aggregate_price] with decimal trim value returns error on Clio #1370

Closed
mounikakun opened this issue Apr 23, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@mounikakun
Copy link
Collaborator

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

@mounikakun mounikakun added the bug Something isn't working label Apr 23, 2024
@cindyyan317
Copy link
Collaborator

Same case:#1371 (comment)

@mounikakun mounikakun added this to Current Queue in Bug Bash Road to 100% (v2.2.0) May 2, 2024
@mounikakun
Copy link
Collaborator Author

Fixed on rippled end

Bug Bash Road to 100% (v2.2.0) automation moved this from Current Queue to Closed May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Merged
Development

No branches or pull requests

2 participants