# Amount of some transactions seems wrong

**URL:** <https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973>\
**Category:** GraphQL API\
**Tags:** support\
**Created:** [June 24, 2024, 8:35am UTC](https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973 "2024-06-24T08:35:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![applepi](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@applepi](https://community.bitquery.io/u/applepi)\
**Post date:** [June 24, 2024, 8:35am UTC](https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973/1 "2024-06-24T08:35:46Z")

</div>

Hi there,

I’m working on how to get realtime price of SOL based on USDC. But I got some weird transactions to be seen:

Use the following GraphQL query:

```auto
{
  Solana {
    DEXTrades(
      orderBy: {ascending: Block_Time}
      where: {Transaction: {Signature: {is: "66WAWZxR8XXgo6DNRK6KrUrSUmwBAbUGfkXLFNkokeX82r5jiqGSoHRympAGDDQ74TygVoCGhjHS24q8ramBXa4g"}}}
    ) {
      Trade {
        Buy {
          Amount
          Account {
            Address
            Token {
              Owner
            }
          }
          Currency {
            MintAddress
          }
          Price
        }
        Sell {
          Amount
          Account {
            Address
            Token {
              Owner
            }
          }
          Currency {
            MintAddress
          }
          Price
        }
      }
      Transaction {
        Signature
      }
      Block {
        Time
      }
    }
  }
}

```

I got the result as below:

```auto
{
  "Solana": {
    "DEXTrades": [
      {
        "Block": {
          "Time": "2024-06-24T08:10:54Z"
        },
        "Trade": {
          "Buy": {
            "Account": {
              "Address": "BkJFS1HF6JgrsB1VXdTVMsZ7R6WCKqokCqhUZqarPPVZ",
              "Token": {
                "Owner": "9vu7XMz8Brmfm4mT1T2E1YzemsUCwQEzeM3DrocPBxWc"
              }
            },
            "Amount": "25.658926",
            "Currency": {
              "MintAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
            },
            "Price": 15.597227577490967
          },
          "Sell": {
            "Account": {
              "Address": "7exzsvjn46jweUp1uerS3SYMmHUdQcBgrQi2MHMv5fJV",
              "Token": {
                "Owner": "9vu7XMz8Brmfm4mT1T2E1YzemsUCwQEzeM3DrocPBxWc"
              }
            },
            "Amount": "400.208108216",
            "Currency": {
              "MintAddress": "So11111111111111111111111111111111111111112"
            },
            "Price": 0.06411395839624365
          }
        },
        "Transaction": {
          "Signature": "66WAWZxR8XXgo6DNRK6KrUrSUmwBAbUGfkXLFNkokeX82r5jiqGSoHRympAGDDQ74TygVoCGhjHS24q8ramBXa4g"
        }
      }
    ]
  }
}

```

It can be seen that in this transaction someone swaped 400.2081 SOL for  
25.658926 USDC, which is nearly impossible.

Use solscan ([here](https://solscan.io/tx/66WAWZxR8XXgo6DNRK6KrUrSUmwBAbUGfkXLFNkokeX82r5jiqGSoHRympAGDDQ74TygVoCGhjHS24q8ramBXa4g)) to inspect this transaction, it’s clear that the fact is he swaped 0.2055157 SOL for  
25.658926 USDC and it is reasonable. It seems that the amount of buy side is somehow got wrong.

Please check this issue and it’s easy to find tons of such records. The same problem can be found on USDT (Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB). For typical tokens (i.e. not stablecoin), for now I did not found such transactions.

Thank you!

---

<div class="post-metadata">

**Author:** ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)\
**Post date:** [June 24, 2024, 12:19pm UTC](https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973/2 "2024-06-24T12:19:14Z")

</div>

Please create a ticket at [support.bitquery.io](http://support.bitquery.io)  
We will check and fix it.  
Solana currently is a part of our [EAP](https://docs.bitquery.io/docs/graphql/dataset/EAP/) which allows you to test the data and integrate with your applications for testing purposes, we encourage you to submit any issues you find

---

<div class="post-metadata">

**Author:** ![tuantpa](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@tuantpa](https://community.bitquery.io/u/tuantpa)\
**Post date:** [June 24, 2024, 1:36pm UTC](https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973/3 "2024-06-24T13:36:42Z")

</div>

Yes, that is right. I was testing this case and found the price and amount were inconsistent. Hope that they fill fix it soon.

---

<div class="post-metadata">

**Author:** ![applepi](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@applepi](https://community.bitquery.io/u/applepi)\
**Post date:** [June 25, 2024, 7:37am UTC](https://community.bitquery.io/t/amount-of-some-transactions-seems-wrong/1973/4 "2024-06-25T07:37:14Z")

</div>

Thanks for everyone’s attention.

Seems like this issue has been somehow mitigated. Set a limit to only query transactions on ORCA with amounts greater than 20 USDC, I did not found any records has a price less than 110 USDC for SOL since 2024-06-24T16:00:00Z.

By using a simple query like (be aware to set Buy.Price.lt to a suitable value based on market condition):

```auto
{
  Solana {
    DEXTrades(
      orderBy: {descending: Block_Time}
      where: {Trade: {Buy: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Amount: {gt: "0.1"}, Price: {gt: 0.1, lt: 110}}, Sell: {Currency: {MintAddress: {is: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"}}}, Dex: {ProgramAddress: {}}}, Transaction: {Result: {Success: true}}}
      limit: {count: 10}
    ) {
      Trade {
        Buy {
          Amount
          Account {
            Address
            Token {
              Owner
            }
          }
          Currency {
            MintAddress
          }
          Price
        }
        Sell {
          Amount
          Account {
            Address
            Token {
              Owner
            }
          }
          Currency {
            MintAddress
          }
          Price
        }
        Dex {
          ProgramAddress
        }
      }
      Transaction {
        Signature
      }
      Block {
        Time
      }
    }
  }
}

```

It seems that weird records still exists on Raydium and Phoenix, but they have been greatly reduced.
