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.
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.
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
}
}
}
}
}
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?
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.