Skip to main content
Monitor Orca Whirlpool swap instructions to build DEX analytics dashboards, analyze liquidity patterns, or create price feeds.

Use Case

DEX swap tracking enables you to:
  • Build DEX trading analytics and volume trackers
  • Monitor liquidity pool activity
  • Analyze trading patterns and arbitrage
  • Create real-time price feeds

Code Example

Try it yourself with the interactive query interface below:

Key Parameters

Different DEX protocols use different instruction discriminators. Check the program IDL to find the correct discriminator for your target DEX.

Expected Output

Track Specific Pool

Monitor swaps for a specific trading pair:

Decode Swap Amounts

Swap amounts are encoded in the data field. Here’s how to decode them for Orca Whirlpool:
Use the Solana typegen tool to generate TypeScript decoders from program IDLs. See the Solana SDK typegen documentation for details.

Performance Tips

  1. Filter by pool address: Query specific pools instead of all swaps
  2. Use slot ranges: Process data in 10k-50k slot batches
  3. Decode off-chain: Decode swap amounts in your application, not in the query
  4. Combine with token balances: Use token balances to track actual amounts transferred

Query Instructions

General instruction querying

Token Transfers

Track token movements

Query Transactions

Monitor wallet activity

API Reference

View complete API docs