$npx -y skills add agiprolabs/claude-trading-skills --skill helius-apiEnhanced Solana RPC with DAS API, parsed transactions, webhooks, and priority fee estimation via Helius
| 1 | # Helius API — Enhanced Solana RPC |
| 2 | |
| 3 | Helius extends standard Solana RPC with parsed transaction history, a unified Digital Asset Standard (DAS) API, webhooks, and priority fee estimation. Essential for wallet analysis, token metadata, and transaction monitoring. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ### 1. Get an API Key |
| 8 | |
| 9 | Sign up at [dashboard.helius.dev](https://dashboard.helius.dev) — free tier available (1M credits/mo, no card required). |
| 10 | |
| 11 | ```bash |
| 12 | export HELIUS_API_KEY="your-api-key" |
| 13 | ``` |
| 14 | |
| 15 | ### 2. Install Dependencies |
| 16 | |
| 17 | ```bash |
| 18 | uv pip install httpx python-dotenv |
| 19 | ``` |
| 20 | |
| 21 | ### 3. Two Base URLs |
| 22 | |
| 23 | Helius uses different base URLs depending on the API: |
| 24 | |
| 25 | | API | Base URL | Protocol | |
| 26 | |-----|----------|----------| |
| 27 | | RPC / DAS / Priority Fees | `https://mainnet.helius-rpc.com/?api-key=KEY` | JSON-RPC 2.0 | |
| 28 | | Enhanced Transactions / Webhooks | `https://api-mainnet.helius-rpc.com/v0/...?api-key=KEY` | REST | |
| 29 | |
| 30 | ## DAS API (Digital Asset Standard) |
| 31 | |
| 32 | Unified interface for querying all Solana digital assets — fungible tokens, NFTs, compressed NFTs, Token-2022. |
| 33 | |
| 34 | ### Get Asset Metadata |
| 35 | |
| 36 | ```python |
| 37 | import httpx, os |
| 38 | |
| 39 | API_KEY = os.environ["HELIUS_API_KEY"] |
| 40 | RPC_URL = f"https://mainnet.helius-rpc.com/?api-key={API_KEY}" |
| 41 | |
| 42 | resp = httpx.post(RPC_URL, json={ |
| 43 | "jsonrpc": "2.0", "id": 1, |
| 44 | "method": "getAsset", |
| 45 | "params": { |
| 46 | "id": "So11111111111111111111111111111111111111112", # wSOL |
| 47 | "options": {"showFungible": True} |
| 48 | } |
| 49 | }) |
| 50 | asset = resp.json()["result"] |
| 51 | # asset.content.metadata.name, asset.token_info.decimals, etc. |
| 52 | ``` |
| 53 | |
| 54 | ### Get All Assets for a Wallet |
| 55 | |
| 56 | ```python |
| 57 | resp = httpx.post(RPC_URL, json={ |
| 58 | "jsonrpc": "2.0", "id": 1, |
| 59 | "method": "getAssetsByOwner", |
| 60 | "params": { |
| 61 | "ownerAddress": "WALLET_ADDRESS", |
| 62 | "page": 1, |
| 63 | "limit": 100, |
| 64 | "displayOptions": { |
| 65 | "showFungible": True, |
| 66 | "showNativeBalance": True, |
| 67 | "showZeroBalance": False, |
| 68 | } |
| 69 | } |
| 70 | }) |
| 71 | assets = resp.json()["result"]["items"] |
| 72 | ``` |
| 73 | |
| 74 | ### Search Assets with Filters |
| 75 | |
| 76 | ```python |
| 77 | resp = httpx.post(RPC_URL, json={ |
| 78 | "jsonrpc": "2.0", "id": 1, |
| 79 | "method": "searchAssets", |
| 80 | "params": { |
| 81 | "ownerAddress": "WALLET_ADDRESS", |
| 82 | "tokenType": "fungible", # fungible | nonFungible | all |
| 83 | "page": 1, |
| 84 | "limit": 50, |
| 85 | } |
| 86 | }) |
| 87 | ``` |
| 88 | |
| 89 | ### All DAS Methods |
| 90 | |
| 91 | | Method | Purpose | Credits | |
| 92 | |--------|---------|---------| |
| 93 | | `getAsset` | Single asset metadata | 10 | |
| 94 | | `getAssetBatch` | Up to 1,000 assets | 10 | |
| 95 | | `getAssetsByOwner` | All assets for a wallet | 10 | |
| 96 | | `getAssetsByGroup` | Assets by collection | 10 | |
| 97 | | `getAssetsByCreator` | Assets by creator | 10 | |
| 98 | | `getAssetsByAuthority` | Assets by update authority | 10 | |
| 99 | | `searchAssets` | Multi-criteria filtered search | 10 | |
| 100 | | `getAssetProof` | Merkle proof (compressed NFTs) | 10 | |
| 101 | | `getAssetProofBatch` | Batch proofs | 10 | |
| 102 | | `getSignaturesForAsset` | Tx history for an asset | 10 | |
| 103 | | `getNftEditions` | All editions of a master | 10 | |
| 104 | | `getTokenAccounts` | Token accounts by mint/owner | 10 | |
| 105 | |
| 106 | See `references/das_api.md` for complete field documentation. |
| 107 | |
| 108 | ## Enhanced Transactions API |
| 109 | |
| 110 | Transforms raw Solana transactions into human-readable structured data with categorized types and sources. |
| 111 | |
| 112 | ### Parse a Transaction |
| 113 | |
| 114 | ```python |
| 115 | API_URL = f"https://api-mainnet.helius-rpc.com/v0/transactions?api-key={API_KEY}" |
| 116 | |
| 117 | resp = httpx.post(API_URL, json={ |
| 118 | "transactions": ["SIGNATURE_HERE"], |
| 119 | }) |
| 120 | parsed = resp.json()[0] |
| 121 | # parsed["type"] → "SWAP" |
| 122 | # parsed["source"] → "JUPITER" |
| 123 | # parsed["description"] → "User swapped 1 SOL for 150 USDC on Jupiter" |
| 124 | # parsed["tokenTransfers"] → [{mint, amount, from, to}, ...] |
| 125 | # parsed["nativeTransfers"] → [{from, to, amount}, ...] |
| 126 | ``` |
| 127 | |
| 128 | ### Get Parsed Transaction History for a Wallet |
| 129 | |
| 130 | ```python |
| 131 | url = f"https://api-mainnet.helius-rpc.com/v0/addresses/{wallet}/transactions" |
| 132 | resp = httpx.get(url, params={ |
| 133 | "api-key": API_KEY, |
| 134 | "limit": 50, |
| 135 | "type": "SWAP", # optional filter |
| 136 | }) |
| 137 | history = resp.json() |
| 138 | ``` |
| 139 | |
| 140 | ### Transaction Types (151+) |
| 141 | |
| 142 | Key types for trading analysis: |
| 143 | |
| 144 | | Type | Meaning | |
| 145 | |------|---------| |
| 146 | | `SWAP` | DEX swap | |
| 147 | | `TRANSFER` | Token/SOL transfer | |
| 148 | | `ADD_LIQUIDITY` / `REMOVE_LIQUIDITY` | LP operations | |
| 149 | | `NFT_SALE` / `NFT_MINT` / `NFT_LISTING` | NFT marketplace | |
| 150 | | `STAKE_SOL` / `UNSTAKE_SOL` | Staking | |
| 151 | | `CREATE_ORDER` / `FILL_ORDER` | Limit orders | |
| 152 | |
| 153 | ### Transaction Sources (50+) |
| 154 | |
| 155 | `JUPITER`, `RAYDIUM`, `ORCA`, `MAGIC_EDEN`, `TENSOR`, `MARINADE`, `METEORA`, `PHANTOM`, etc. |
| 156 | |
| 157 | See `references/enhanced_transactions.md` for full type/source enums. |
| 158 | |
| 159 | ## Webhooks |
| 160 | |
| 161 | Real-time notifications for on-chain events — no polling required. |
| 162 | |
| 163 | ### Create a Webhook |
| 164 | |
| 165 | ```python |
| 166 | url = f"https://api-mainnet.helius-rpc.com/v0/webhooks?api-key={API_KEY}" |
| 167 | resp = httpx.post(url, json={ |
| 168 | "webhookURL": "https://your-server.com/helius-hook", |
| 169 | "transactionTypes": ["SWAP", "TRANSFER"], |
| 170 | "accountAd |