EXAMPLE 15 OF 16 · Advanced
Email a multi-wallet Raydium position inventory
Load wallet addresses, separate CPMM holdings from CLMM positions, and export an inventory that preserves scan warnings.
Before you begin#
- Choose Solana mainnet and a working RPC route in runtime settings. These examples read live data; illustrative results below will differ.
- Select the Desktop runtime. Set absolute input and output paths for that machine; create the output directory before running.
- Follow email setup, select the saved connection on Email, and set emailTo to your own address.
- Set walletFile, reportPath, and emailTo. The sample CSV’s min_sol field is retained for reuse with the balance lesson but is not a position filter.
Sample input files
Replace both address placeholders with public wallet addresses. Each address must be unique. min_sol is the native SOL alert threshold.
Walk through the workflow#
- Load the wallet list and Iterate over its addresses.
- List Raydium positions reads each wallet. Code writes a summary row, then one row per LP or CLMM position.
- The summary preserves scan warnings and the truncated flag, including for wallets with no positions.
- After every append finishes, turn the rows into a CSV, save it, and email the attachment once.
Read the inventory#
Every wallet has a scan row even if no positions are found. LP and CLMM rows remain distinct. details holds the structured position data as JSON inside one correctly quoted CSV cell, preserving pool identifiers, raw quantities, and position fields without pretending the two position types have the same shape.
Check completeness#
The account scan has a configurable cap. truncated: true means the scan did not cover every visible account. Optional external sections can produce warnings. An empty result with warnings is not proof that the wallet has no positions.
Make one change#
Add a filter in Code to include positions from one pool. Keep the scan row so the resulting report still explains the scan. Once you know a position’s shape, replace details with the individual columns you need.
If it does not match#
Use wallet owner addresses, not pool addresses or position NFT mints, in the input CSV. This example reports LP and CLMM holdings; it does not claim to produce a complete valuation of farming and locked positions.