Sorry, we don't support your browser.  Install a modern browser

API Bug: Incorrect volume parsing for Whirlpool protocol (Orca) txs#843

Bug Description

I found a data calculation error in the /defi/v3/token/trade-data/single API when it parses transactions interacting with the whirlpool protocol (Orca).

The outer volume field incorrectly duplicates the from.ui_amount (the SOL amount) instead of reflecting the actual trading volume in USD or properly calculating the target token volume.

Example Transaction Data

  • Tx Hash: BQB2mW9UNh1hbBZAmraRq2i6CdvhQ9AV8QS9WkiZ19RswcwV3nxi63ZGmyr24XnKpKViuSDQf4SrMoc2hXYzNJh
  • Block Number: 422178563
  • Interacted Program ID: proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u
  • Source: whirlpool

Incorrect Field:

  • "volume": 0.017072341

Actual token transfer in this tx:

  • From (SOL): "ui_amount": 0.017072341
  • To (WORLDCUP): "ui_amount": 183.874101

Expected Behavior

The volume field should represent the actual trading volume (usually scaled or matched with USD volume), rather than blindly copying the base/from token’s raw UI amount. Please update the data parsing engine for the Orca Whirlpool router.

10 hours ago