# Is it possible to get the historical dex trades for a Solana wallet?

**URL:** <https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938>\
**Category:** GraphQL API\
**Created:** [May 28, 2024, 4:25pm UTC](https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938 "2024-05-28T16:25:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lattice-02display](https://avatars.discourse-cdn.com/v4/letter/l/9dc877/32.png) [@lattice-02display](https://community.bitquery.io/u/lattice-02display)\
**Post date:** [May 28, 2024, 4:25pm UTC](https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938/1 "2024-05-28T16:25:48Z")

</div>

I can see an example streaming implementation that emits dex trades for Solana. I want to get the dex trades for a particular wallet going back in time.

---

<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:** [May 30, 2024, 5:34am UTC](https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938/2 "2024-05-30T05:34:24Z")

</div>

> [@lattice-02display](#):
>
> des for Solana. I want to get the dex trades for a particular wallet going back in time.

You can get real-time trades for a particular wallet. Below is the query. But you can’t access historical information at the moment. We are working on backfilling it, but it will take some time.

```auto
subscription {
  Solana {
    DEXTrades(
      where: {Trade: {Buy: {Account: {Address: {is: "61XPxXvMZvSkVxGqKAaD7djk793t5NfkrMpcvNxw3EAP"}}}}}
    ) {
      Trade {
        Dex {
          ProgramAddress
          ProtocolFamily
          ProtocolName
        }
        Buy {
          Amount
          Account {
            Address
          }
          Currency {
            MetadataAddress
            Key
            IsMutable
            EditionNonce
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
          Order {
            LimitPrice
            LimitAmount
            OrderId
          }
          AmountInUSD
          PriceInUSD
          Price
        }
        Market {
          MarketAddress
        }
        Sell {
          Account {
            Address
          }
          Currency {
            MetadataAddress
            Key
            IsMutable
            EditionNonce
            Decimals
            CollectionAddress
            Fungible
            Symbol
            Native
            Name
          }
        }
      }
      Instruction {
        Program {
          Address
          AccountNames
          Method
          Parsed
          Name
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![berlinguyinca](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/berlinguyinca/32/912_2.png) [@berlinguyinca](https://community.bitquery.io/u/berlinguyinca)\
**Post date:** [June 20, 2024, 5:13pm UTC](https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938/3 "2024-06-20T17:13:57Z")

</div>

I was trying the same and also discovered that you are sadly only able to get a couple thousand transaction. Is there a time estimate when this will be done?

---

<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 21, 2024, 10:07am UTC](https://community.bitquery.io/t/is-it-possible-to-get-the-historical-dex-trades-for-a-solana-wallet/1938/4 "2024-06-21T10:07:50Z")

</div>

We have been backfilling solana data for a while now. Sadly it’s a huge database. It might take a few more months. Keep track of updates via newsletter/telegram notifications.
