helius-python 0.0.3__tar.gz → 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. helius_python-0.1.0/.github/workflows/python-package.yml +42 -0
  2. helius_python-0.1.0/PKG-INFO +363 -0
  3. helius_python-0.1.0/README.md +343 -0
  4. helius_python-0.1.0/examples/block_explorer.py +85 -0
  5. helius_python-0.1.0/examples/devnet_airdrop.py +91 -0
  6. helius_python-0.1.0/examples/network_status.py +63 -0
  7. helius_python-0.1.0/examples/priority_fees.py +76 -0
  8. helius_python-0.1.0/examples/stake_overview.py +81 -0
  9. helius_python-0.1.0/examples/token_inspector.py +61 -0
  10. helius_python-0.1.0/examples/transaction_inspector.py +84 -0
  11. helius_python-0.1.0/examples/wallet_tracker.py +92 -0
  12. {helius_python-0.0.3 → helius_python-0.1.0}/pyproject.toml +2 -2
  13. helius_python-0.1.0/requirements.txt +5 -0
  14. {helius_python-0.0.3 → helius_python-0.1.0}/src/helius/client.py +38 -40
  15. helius_python-0.0.3/PKG-INFO +0 -249
  16. helius_python-0.0.3/README.md +0 -229
  17. {helius_python-0.0.3 → helius_python-0.1.0}/.editorconfig +0 -0
  18. {helius_python-0.0.3 → helius_python-0.1.0}/.github/workflows/python-publish.yml +0 -0
  19. {helius_python-0.0.3 → helius_python-0.1.0}/.gitignore +0 -0
  20. {helius_python-0.0.3 → helius_python-0.1.0}/AGENTS.md +0 -0
  21. {helius_python-0.0.3 → helius_python-0.1.0}/CLAUDE.md +0 -0
  22. {helius_python-0.0.3 → helius_python-0.1.0}/CONTRIBUTING.md +0 -0
  23. {helius_python-0.0.3 → helius_python-0.1.0}/LICENSE +0 -0
  24. {helius_python-0.0.3 → helius_python-0.1.0}/src/helius/__init__.py +0 -0
  25. {helius_python-0.0.3 → helius_python-0.1.0}/src/helius/models.py +0 -0
  26. {helius_python-0.0.3 → helius_python-0.1.0}/tests/fixtures/account.json +0 -0
  27. {helius_python-0.0.3 → helius_python-0.1.0}/tests/fixtures/supply.json +0 -0
  28. {helius_python-0.0.3 → helius_python-0.1.0}/tests/unit/test_helius_client.py +0 -0
  29. {helius_python-0.0.3 → helius_python-0.1.0}/tests/unit/test_models.py +0 -0
  30. {helius_python-0.0.3 → helius_python-0.1.0}/tests/unit/test_rpc_request.py +0 -0
@@ -0,0 +1,42 @@
1
+ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3
+
4
+ name: Python package
5
+
6
+ on:
7
+ push:
8
+ branches: [ "main" ]
9
+ pull_request:
10
+ branches: [ "main" ]
11
+
12
+ jobs:
13
+ build:
14
+
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - name: Set up Python ${{ matrix.python-version }}
24
+ uses: actions/setup-python@v3
25
+ with:
26
+ python-version: ${{ matrix.python-version }}
27
+ - name: Install dependencies
28
+ run: |
29
+ python -m pip install --upgrade pip
30
+ python -m pip install flake8 pytest
31
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32
+ - name: Lint with flake8
33
+ run: |
34
+ # stop the build if there are Python syntax errors or undefined names
35
+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
36
+ # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37
+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38
+ - name: Test with pytest
39
+ env:
40
+ PYTHONPATH: src
41
+ run: |
42
+ pytest
@@ -0,0 +1,363 @@
1
+ Metadata-Version: 2.4
2
+ Name: helius-python
3
+ Version: 0.1.0
4
+ Summary: Typed Python client for the Helius API
5
+ Project-URL: Homepage, https://github.com/markosnarinian/helius-python
6
+ Project-URL: Issues, https://github.com/markosnarinian/helius-python/issues
7
+ Author-email: Markos Narinian <manarinian@gmail.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: >=3.10
13
+ Requires-Dist: httpx
14
+ Requires-Dist: pydantic
15
+ Requires-Dist: python-dotenv
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest; extra == 'dev'
18
+ Requires-Dist: respx; extra == 'dev'
19
+ Description-Content-Type: text/markdown
20
+
21
+ # helius-python
22
+
23
+ <p align="center">
24
+ <img width="562" height="118" alt="Helius-Horizontal-Logo" src="https://github.com/user-attachments/assets/d87ffd10-b168-4830-bbad-d2fef67368a5" /><svg width="562" height="118" viewBox="0 0 562 118" fill="none" xmlns="http://www.w3.org/2000/svg">
25
+ <g clip-path="url(#clip0_7532_34078)">
26
+ <path d="M74.6261 24.7253C69.9876 22.7665 64.8892 21.6871 59.531 21.6871C54.1727 21.6871 49.0743 22.7665 44.4358 24.7253L58.3013 0.709587C58.8412 -0.229856 60.2007 -0.229856 60.7406 0.709587L74.6161 24.7253H74.6261Z" fill="url(#paint0_linear_7532_34078)"/>
27
+ <path d="M40.7468 26.5242C31.6098 31.5812 24.742 40.2161 22.0128 50.54L11.7061 24.2856C11.3063 23.2762 12.156 22.2168 13.2257 22.3767L40.7468 26.5242Z" fill="url(#paint1_linear_7532_34078)"/>
28
+ <path d="M28.9906 84.4099L0.999611 75.7751C-0.0400563 75.4552 -0.33996 74.126 0.449787 73.3965L21.2431 54.1079C20.9032 56.1767 20.7233 58.3054 20.7233 60.4741C20.7233 69.5088 23.8123 77.8238 28.9906 84.4099Z" fill="url(#paint2_linear_7532_34078)"/>
29
+ <path d="M58.951 99.2611L34.4089 115.981C33.5091 116.591 32.2895 116.011 32.2096 114.922L30.0203 85.6492C37.018 93.8443 47.3747 99.0812 58.951 99.2511V99.2611Z" fill="url(#paint3_linear_7532_34078)"/>
30
+ <path d="M88.9513 85.7692L86.772 114.892C86.692 115.971 85.4724 116.561 84.5727 115.951L60.0806 99.2612C71.6269 99.1013 81.9536 93.9043 88.9513 85.7692Z" fill="url(#paint4_linear_7532_34078)"/>
31
+ <path d="M118.042 75.6851L90.1711 84.28C95.2895 77.7139 98.3385 69.4488 98.3385 60.4741C98.3385 58.2754 98.1486 56.1167 97.7987 54.0179L118.582 73.2965C119.382 74.0361 119.072 75.3653 118.042 75.6751V75.6851Z" fill="url(#paint5_linear_7532_34078)"/>
32
+ <path d="M107.355 24.3356L97.0588 50.5801C94.3396 40.2662 87.4918 31.6413 78.3848 26.5643L105.836 22.4268C106.906 22.2668 107.755 23.3262 107.355 24.3356Z" fill="url(#paint6_linear_7532_34078)"/>
33
+ <path d="M59.5307 107.636C53.8026 107.636 49.1641 112.273 49.1641 118H69.9074C69.9074 112.273 65.2689 107.636 59.5407 107.636H59.5307Z" fill="url(#paint7_linear_7532_34078)"/>
34
+ <path d="M97.4388 90.6563C93.8699 95.1336 94.5997 101.66 99.0782 105.228L112.004 89.0172C107.526 85.4494 100.998 86.1789 97.4288 90.6563H97.4388Z" fill="url(#paint8_linear_7532_34078)"/>
35
+ <path d="M105.936 50.57C107.206 56.1567 112.774 59.6446 118.352 58.3653L113.733 38.1473C108.145 39.4166 104.656 44.9833 105.936 50.56V50.57Z" fill="url(#paint9_linear_7532_34078)"/>
36
+ <path d="M80.4942 18.8588C85.6525 21.3473 91.8505 19.1786 94.3397 14.0116L75.6557 5.01697C73.1665 10.1739 75.3358 16.3702 80.5042 18.8588H80.4942Z" fill="url(#paint10_linear_7532_34078)"/>
37
+ <path d="M38.0978 18.8588C43.2561 16.3702 45.4254 10.1739 42.9362 5.01697L24.2522 14.0116C26.7414 19.1686 32.9394 21.3373 38.0978 18.8488V18.8588Z" fill="url(#paint11_linear_7532_34078)"/>
38
+ <path d="M13.3958 50.57C14.6654 44.9833 11.1765 39.4266 5.58826 38.1573L0.979736 58.3754C6.56795 59.6446 12.1262 56.1567 13.3958 50.57Z" fill="url(#paint12_linear_7532_34078)"/>
39
+ <path d="M8.49731 89.0172L21.4332 105.228C25.9117 101.66 26.6415 95.1336 23.0726 90.6563C19.5038 86.1789 12.9759 85.4494 8.49731 89.0172Z" fill="url(#paint13_linear_7532_34078)"/>
40
+ <path d="M177.773 30.1321V59.8145H212.612V31.8511H228.487V98.4116H212.612V73.9661H177.773V98.4116H161.898V34.4195L177.773 30.1321Z" fill="#E84125"/>
41
+ <path d="M257.227 84.25H305.792L301.503 98.4016H241.363V31.8411H305.802L301.513 45.9927H257.237V58.0855H298.504V72.2371H257.237V84.25H257.227Z" fill="#E84125"/>
42
+ <path d="M331.274 31.8411V84.25H378.119L373.83 98.4016H315.399V31.8411H331.274Z" fill="#E84125"/>
43
+ <path d="M400.861 31.8411V98.4016H384.987V31.8411H400.861Z" fill="#E84125"/>
44
+ <path d="M467.44 31.8411H483.315V71.9872C483.315 91.3757 467.44 99.8607 446.937 99.8607C426.433 99.8607 411.668 90.7661 411.668 71.9872V34.4195L427.543 30.1321V71.9872C427.543 81.7614 434.061 85.4593 447.706 85.4593C461.352 85.4593 467.44 81.5116 467.44 71.9872V31.8411Z" fill="#E84125"/>
45
+ <path d="M491.382 52.0891C491.382 41.8851 499.45 31.8411 515.235 31.8411H560.54L556.252 45.9927H515.405C510.516 45.9927 508.107 49.0808 508.107 52.0791C508.107 55.0773 510.596 58.0855 515.405 58.0855H538.397C553.922 58.0855 561.99 68.1195 561.99 78.3335C561.99 88.5474 554.352 98.4016 538.397 98.4016H491.382L495.671 84.25H538.227C543.036 84.25 545.525 81.4217 545.525 78.3335C545.525 75.2453 543.126 72.1571 538.227 72.1571H515.235C499.19 72.1571 491.382 62.1231 491.382 52.0891Z" fill="#E84125"/>
46
+ </g>
47
+ <defs>
48
+ <linearGradient id="paint0_linear_7532_34078" x1="41.8666" y1="12.3627" x2="74.6261" y2="12.3627" gradientUnits="userSpaceOnUse">
49
+ <stop stop-color="#E35930"/>
50
+ <stop offset="1" stop-color="#E84125"/>
51
+ </linearGradient>
52
+ <linearGradient id="paint1_linear_7532_34078" x1="9.61681" y1="36.4484" x2="40.7468" y2="36.4484" gradientUnits="userSpaceOnUse">
53
+ <stop stop-color="#E35930"/>
54
+ <stop offset="1" stop-color="#E84125"/>
55
+ </linearGradient>
56
+ <linearGradient id="paint2_linear_7532_34078" x1="-0.919775" y1="69.2589" x2="28.9906" y2="69.2589" gradientUnits="userSpaceOnUse">
57
+ <stop stop-color="#E35930"/>
58
+ <stop offset="1" stop-color="#E84125"/>
59
+ </linearGradient>
60
+ <linearGradient id="paint3_linear_7532_34078" x1="29.4704" y1="100.94" x2="58.951" y2="100.94" gradientUnits="userSpaceOnUse">
61
+ <stop stop-color="#E35930"/>
62
+ <stop offset="1" stop-color="#E84125"/>
63
+ </linearGradient>
64
+ <linearGradient id="paint4_linear_7532_34078" x1="59.0809" y1="100.98" x2="88.9513" y2="100.98" gradientUnits="userSpaceOnUse">
65
+ <stop stop-color="#E35930"/>
66
+ <stop offset="1" stop-color="#E84125"/>
67
+ </linearGradient>
68
+ <linearGradient id="paint5_linear_7532_34078" x1="88.3417" y1="69.149" x2="119.032" y2="69.149" gradientUnits="userSpaceOnUse">
69
+ <stop stop-color="#E35930"/>
70
+ <stop offset="1" stop-color="#E84125"/>
71
+ </linearGradient>
72
+ <linearGradient id="paint6_linear_7532_34078" x1="75.9256" y1="36.4884" x2="107.455" y2="36.4884" gradientUnits="userSpaceOnUse">
73
+ <stop stop-color="#E35930"/>
74
+ <stop offset="1" stop-color="#E84125"/>
75
+ </linearGradient>
76
+ <linearGradient id="paint7_linear_7532_34078" x1="64.1037" y1="108.682" x2="56.3294" y2="122.151" gradientUnits="userSpaceOnUse">
77
+ <stop stop-color="#E35930"/>
78
+ <stop offset="1" stop-color="#E84125"/>
79
+ </linearGradient>
80
+ <linearGradient id="paint8_linear_7532_34078" x1="101.127" y1="87.5512" x2="106.808" y2="102.028" gradientUnits="userSpaceOnUse">
81
+ <stop stop-color="#E35930"/>
82
+ <stop offset="1" stop-color="#E84125"/>
83
+ </linearGradient>
84
+ <linearGradient id="paint9_linear_7532_34078" x1="105.915" y1="45.8351" x2="120.779" y2="50.4203" gradientUnits="userSpaceOnUse">
85
+ <stop stop-color="#E35930"/>
86
+ <stop offset="1" stop-color="#E84125"/>
87
+ </linearGradient>
88
+ <linearGradient id="paint10_linear_7532_34078" x1="76.8142" y1="15.9367" x2="89.6635" y2="7.17242" gradientUnits="userSpaceOnUse">
89
+ <stop stop-color="#E35930"/>
90
+ <stop offset="1" stop-color="#E84125"/>
91
+ </linearGradient>
92
+ <linearGradient id="paint11_linear_7532_34078" x1="33.7238" y1="19.9762" x2="34.884" y2="4.46876" gradientUnits="userSpaceOnUse">
93
+ <stop stop-color="#E35930"/>
94
+ <stop offset="1" stop-color="#E84125"/>
95
+ </linearGradient>
96
+ <linearGradient id="paint12_linear_7532_34078" x1="11.6598" y1="54.776" x2="0.258708" y2="44.1971" gradientUnits="userSpaceOnUse">
97
+ <stop stop-color="#E35930"/>
98
+ <stop offset="1" stop-color="#E84125"/>
99
+ </linearGradient>
100
+ <linearGradient id="paint13_linear_7532_34078" x1="25.3906" y1="94.7132" x2="10.0098" y2="97.0344" gradientUnits="userSpaceOnUse">
101
+ <stop stop-color="#E35930"/>
102
+ <stop offset="1" stop-color="#E84125"/>
103
+ </linearGradient>
104
+ <clipPath id="clip0_7532_34078">
105
+ <rect width="562" height="118" fill="white"/>
106
+ </clipPath>
107
+ </defs>
108
+ </svg>
109
+ </p>
110
+
111
+ <p align="center">
112
+ <a href="https://pypi.org/project/helius-python/"><img src="https://img.shields.io/pypi/v/helius-python.svg" alt="PyPI version"></a>
113
+ <a href="https://pypi.org/project/helius-python/"><img src="https://img.shields.io/pypi/pyversions/helius-python.svg" alt="Python versions"></a>
114
+ <a href="https://github.com/markosnarinian/helius-python/blob/main/LICENSE"><img src="https://img.shields.io/github/license/markosnarinian/helius-python.svg" alt="License"></a>
115
+ <a href="https://github.com/markosnarinian/helius-python/actions/workflows/python-package.yml"><img src="https://github.com/markosnarinian/helius-python/actions/workflows/python-package.yml/badge.svg" alt="CI"></a>
116
+ <a href="https://pypistats.org/packages/helius-python"><img src="https://img.shields.io/pypi/dm/helius-python.svg" alt="Downloads"></a>
117
+ <a href="https://github.com/markosnarinian/helius-python/commits/main"><img src="https://img.shields.io/github/last-commit/markosnarinian/helius-python.svg" alt="Last commit"></a>
118
+ </p>
119
+
120
+ **A complete, typed Python client for [Helius](https://helius.dev) — the Solana developer platform.**
121
+ <br />
122
+
123
+ ## TL;DR
124
+ ```bash
125
+ pip install helius-python
126
+ ```
127
+
128
+ ```python
129
+ # export HELIUS_API_KEY=your_key (or put it in .env)
130
+
131
+ from helius.client import HeliusClient
132
+
133
+ with HeliusClient() as helius:
134
+ _ctx, lamports = helius.get_balance("7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU")
135
+ print(f"{lamports / 1_000_000_000:.4f} SOL")
136
+
137
+ for sig in helius.get_signatures_for_address(
138
+ "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU", limit=5
139
+ ):
140
+ print(sig.slot, "ERR" if sig.err else "OK ", sig.signature)
141
+ ```
142
+
143
+ `HELIUS_API_KEY` is read from the environment (or `.env`), the
144
+ client is a context manager, and every return value is fully typed.
145
+
146
+ ## Why this over `solana-py` / `solders`?
147
+
148
+ `solders` is for building and signing transactions. `solana-py` is a generic Solana RPC client. Use them for that.
149
+
150
+ This library is for talking to **Helius** specifically — typed `pydantic` responses, snake_case, and (eventually) the Helius-only endpoints (DAS, Enhanced Transactions, Webhooks, priority fees) the others don't cover. Plays nicely alongside `solders`: sign with `solders`, read with `helius-python`.
151
+
152
+ ## Example: wallet tracker
153
+
154
+ See [`examples/wallet_tracker.py`](examples/wallet_tracker.py) for a
155
+ runnable script that takes a wallet address and prints:
156
+
157
+ - SOL balance
158
+ - All non-empty SPL token accounts (mint, balance, account)
159
+ - The last N transactions (timestamp, slot, success/error, signature)
160
+
161
+ ```bash
162
+ export HELIUS_API_KEY=your_helius_api_key
163
+ python examples/wallet_tracker.py 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU --limit 20
164
+ ```
165
+
166
+ It uses `get_balance`, `get_token_accounts_by_owner` (with
167
+ `encoding="jsonParsed"`), and `get_signatures_for_address` — pure
168
+ stdlib plus this library, no `solana-py` or `solders` needed.
169
+
170
+ ## Coverage
171
+
172
+ The goal of this library is **support every function, method, endpoint,
173
+ and feature that Helius exposes.** If Helius ships it, this client
174
+ wraps it.
175
+
176
+ - ✅ **The full Solana JSON-RPC surface** proxied by Helius —
177
+ `getAccountInfo`, `getBalance`, `getBlock`, `getTransaction`,
178
+ `getProgramAccounts`, `getTokenAccountsByOwner`,
179
+ `getSignaturesForAddress`, and every other standard RPC method.
180
+ **(supported today)**
181
+ - 🚧 **All Helius-specific RPC extensions** — enhanced transactions, DAS
182
+ (Digital Asset Standard) methods, priority fee estimation, and the
183
+ rest of the Helius-only RPC namespace. **(in progress)**
184
+ - 🚧 **Every Helius REST endpoint** — Enhanced Transactions API,
185
+ Webhooks API, Mint API, token metadata, address lookups, and beyond.
186
+ **(in progress)**
187
+ - 🚧 **Platform features** — streaming, websockets, and any new
188
+ capability Helius adds to its API. **(in progress)**
189
+
190
+ > **Current status:** only the standard Solana JSON-RPC surface is
191
+ > implemented today. Support for Helius RPC extensions, REST endpoints,
192
+ > and platform features is actively being worked on.
193
+
194
+ ## Goals
195
+
196
+ 1. **Completeness** — 1:1 coverage of the entire Helius API surface.
197
+ 2. **Type safety** — fully typed responses.
198
+ 3. **Pythonic ergonomics** — `get_account_info(...)` instead of
199
+ `getAccountInfo(...)`, context managers.
200
+ 4. **Zero magic** — thin, predictable wrappers that map directly to the
201
+ documented Helius API.
202
+
203
+ ## Authentication
204
+
205
+ Pass your Helius API key explicitly:
206
+
207
+ ```python
208
+ from helius.client import HeliusClient
209
+
210
+ client = HeliusClient(api_key="YOUR_HELIUS_API_KEY")
211
+ ```
212
+
213
+ or set `HELIUS_API_KEY` as an environment variable:
214
+
215
+ ```bash
216
+ export HELIUS_API_KEY=your_helius_api_key
217
+ ```
218
+
219
+ You can also set it in a `.env` file at the project root and let the
220
+ client pick it up automatically:
221
+
222
+ ```env
223
+ HELIUS_API_KEY=your_helius_api_key
224
+ ```
225
+
226
+ ```python
227
+ from helius.client import HeliusClient
228
+
229
+ client = HeliusClient() # reads HELIUS_API_KEY from the environment or .env
230
+ ```
231
+
232
+ ## Usage
233
+
234
+ ### As a context manager (recommended)
235
+
236
+ ```python
237
+ from helius.client import HeliusClient
238
+
239
+ with HeliusClient(api_key="YOUR_HELIUS_API_KEY") as client:
240
+ _ctx, balance = client.get_balance("So11111111111111111111111111111111111111112")
241
+ _ctx, supply = client.get_supply()
242
+ nodes = client.get_cluster_nodes()
243
+ block = client.get_block(slot=250_000_000)
244
+ tx = client.get_transaction("5j7s...signature...")
245
+ ```
246
+
247
+ `HeliusClient` implements the context-manager protocol via `__enter__` /
248
+ `__exit__`, so the underlying `httpx.Client` is closed cleanly when the
249
+ `with` block exits.
250
+
251
+ ### With an explicit `close()` call
252
+
253
+ If a `with` block doesn't fit your code structure (e.g. the client lives
254
+ on a long-lived object), call `close()` yourself when you're done:
255
+
256
+ ```python
257
+ from helius.client import HeliusClient
258
+
259
+ client = HeliusClient(api_key="YOUR_HELIUS_API_KEY")
260
+ try:
261
+ _ctx, balance = client.get_balance("So11111111111111111111111111111111111111112")
262
+ _ctx, supply = client.get_supply()
263
+ finally:
264
+ client.close()
265
+ ```
266
+
267
+ Client classes also implement `__del__` as a safety net — if you forget
268
+ to `close()` or use `with`, the underlying HTTP client is still closed
269
+ when the instance is garbage-collected. Prefer `with` or `close()`
270
+ regardless.
271
+
272
+ > 🚧 **Exception & error handling is a work in progress.** Today,
273
+ > transport errors surface as raw `httpx` exceptions and Helius/Solana
274
+ > RPC errors are not yet wrapped in typed exception classes. A
275
+ > consistent error hierarchy is being worked on.
276
+
277
+ ### Defaults
278
+
279
+ | Argument | Default | Notes |
280
+ | ---------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------ |
281
+ | `base_url` | `"https://mainnet.helius-rpc.com"` | Override to point at devnet, staging, or a custom Helius endpoint. |
282
+ | `api_key` | `None` → falls back to `HELIUS_API_KEY` from the environment, then `.env` | If none is provided, the constructor raises `ValueError`. |
283
+
284
+ Per-method RPC parameters (`commitment`, `encoding`, `min_context_slot`,
285
+ etc.) are left unset by default — the Helius/Solana server defaults
286
+ apply unless you pass them explicitly.
287
+
288
+ ### Reference
289
+
290
+ For parameters, semantics, and return shapes, see the official Helius docs:
291
+ [RPC guide](https://www.helius.dev/docs/rpc) and
292
+ [API reference](https://www.helius.dev/docs/api-reference).
293
+
294
+ If you hit a bug, a missing parameter, or surprising behavior, please
295
+ [open an issue](https://github.com/markosnarinian/helius-python/issues).
296
+
297
+ ### Supported methods
298
+
299
+ The method names map 1:1 to the Solana JSON-RPC spec, just converted to
300
+ `snake_case`. If you know the RPC method name, you know the Python function.
301
+
302
+ ## Status
303
+
304
+ Actively expanding toward full coverage of the Helius API. See
305
+ [`src/helius/client.py`](src/helius/client.py) for the current list of
306
+ implemented methods; missing endpoints are tracked as issues and added
307
+ continuously.
308
+
309
+ | Solana JSON-RPC method | Python method | Helius docs |
310
+ | ----------------------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
311
+ | `getAccountInfo` | `client.get_account_info(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getaccountinfo) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getaccountinfo) |
312
+ | `getBalance` | `client.get_balance(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getbalance) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getbalance) |
313
+ | `getBlock` | `client.get_block(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblock) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblock) |
314
+ | `getBlockCommitment` | `client.get_block_commitment(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblockcommitment) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblockcommitment) |
315
+ | `getBlockHeight` | `client.get_block_height(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblockheight) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblockheight) |
316
+ | `getBlockProduction` | `client.get_block_production(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblockproduction) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblockproduction) |
317
+ | `getBlocks` | `client.get_blocks(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblocks) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblocks) |
318
+ | `getBlocksWithLimit` | `client.get_blocks_with_limit(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblockswithlimit) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblockswithlimit) |
319
+ | `getBlockTime` | `client.get_block_time(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getblocktime) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getblocktime) |
320
+ | `getClusterNodes` | `client.get_cluster_nodes()` | [guide](https://www.helius.dev/docs/rpc/guides/getclusternodes) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getclusternodes) |
321
+ | `getEpochInfo` | `client.get_epoch_info(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getepochinfo) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getepochinfo) |
322
+ | `getEpochSchedule` | `client.get_epoch_schedule()` | [guide](https://www.helius.dev/docs/rpc/guides/getepochschedule) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getepochschedule) |
323
+ | `getFeeForMessage` | `client.get_fee_for_message(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getfeeformessage) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getfeeformessage) |
324
+ | `getFirstAvailableBlock` | `client.get_first_available_block()` | [guide](https://www.helius.dev/docs/rpc/guides/getfirstavailableblock) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getfirstavailableblock) |
325
+ | `getGenesisHash` | `client.get_genesis_hash()` | [guide](https://www.helius.dev/docs/rpc/guides/getgenesishash) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getgenesishash) |
326
+ | `getHealth` | `client.get_health()` | [guide](https://www.helius.dev/docs/rpc/guides/gethealth) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gethealth) |
327
+ | `getHighestSnapshotSlot` | `client.get_highest_snapshot_slot()` | [guide](https://www.helius.dev/docs/rpc/guides/gethighestsnapshotslot) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gethighestsnapshotslot) |
328
+ | `getIdentity` | `client.get_identity()` | [guide](https://www.helius.dev/docs/rpc/guides/getidentity) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getidentity) |
329
+ | `getInflationGovernor` | `client.get_inflation_governor(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getinflationgovernor) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getinflationgovernor) |
330
+ | `getInflationRate` | `client.get_inflation_rate()` | [guide](https://www.helius.dev/docs/rpc/guides/getinflationrate) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getinflationrate) |
331
+ | `getLargestAccounts` | `client.get_largest_accounts(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getlargestaccounts) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getlargestaccounts) |
332
+ | `getLatestBlockhash` | `client.get_latest_blockhash(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getlatestblockhash) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getlatestblockhash) |
333
+ | `getLeaderSchedule` | `client.get_leader_schedule(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getleaderschedule) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getleaderschedule) |
334
+ | `getMaxRetransmitSlot` | `client.get_max_retransmit_slot()` | [guide](https://www.helius.dev/docs/rpc/guides/getmaxretransmitslot) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getmaxretransmitslot) |
335
+ | `getMaxShredInsertSlot` | `client.get_max_shred_insert_slot()` | [guide](https://www.helius.dev/docs/rpc/guides/getmaxshredinsertslot) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getmaxshredinsertslot) |
336
+ | `getMinimumBalanceForRentExemption` | `client.get_minimum_balance_for_rent_exemption(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getminimumbalanceforrentexemption) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getminimumbalanceforrentexemption) |
337
+ | `getMultipleAccounts` | `client.get_multiple_accounts(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getmultipleaccounts) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getmultipleaccounts) |
338
+ | `getProgramAccounts` | `client.get_program_accounts(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getprogramaccounts) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getprogramaccounts) |
339
+ | `getRecentPerformanceSamples` | `client.get_recent_performance_samples(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getrecentperformancesamples) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getrecentperformancesamples) |
340
+ | `getRecentPrioritizationFees` | `client.get_recent_prioritization_fees(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getrecentprioritizationfees) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getrecentprioritizationfees) |
341
+ | `getSignaturesForAddress` | `client.get_signatures_for_address(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getsignaturesforaddress) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getsignaturesforaddress) |
342
+ | `getSignatureStatuses` | `client.get_signature_statuses(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getsignaturestatuses) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getsignaturestatuses) |
343
+ | `getSlot` | `client.get_slot(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getslot) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getslot) |
344
+ | `getSlotLeader` | `client.get_slot_leader(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getslotleader) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getslotleader) |
345
+ | `getSlotLeaders` | `client.get_slot_leaders(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getslotleaders) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getslotleaders) |
346
+ | `getStakeMinimumDelegation` | `client.get_stake_minimum_delegation(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getstakeminimumdelegation) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getstakeminimumdelegation) |
347
+ | `getSupply` | `client.get_supply(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getsupply) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getsupply) |
348
+ | `getTokenAccountBalance` | `client.get_token_account_balance(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettokenaccountbalance) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettokenaccountbalance) |
349
+ | `getTokenAccountsByDelegate` | `client.get_token_accounts_by_delegate(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettokenaccountsbydelegate) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettokenaccountsbydelegate) |
350
+ | `getTokenAccountsByOwner` | `client.get_token_accounts_by_owner(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettokenaccountsbyowner) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettokenaccountsbyowner) |
351
+ | `getTokenLargestAccounts` | `client.get_token_largest_accounts(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettokenlargestaccounts) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettokenlargestaccounts) |
352
+ | `getTokenSupply` | `client.get_token_supply(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettokensupply) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettokensupply) |
353
+ | `getTransaction` | `client.get_transaction(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettransaction) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettransaction) |
354
+ | `getTransactionCount` | `client.get_transaction_count(...)` | [guide](https://www.helius.dev/docs/rpc/guides/gettransactioncount) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/gettransactioncount) |
355
+ | `getVersion` | `client.get_version()` | [guide](https://www.helius.dev/docs/rpc/guides/getversion) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getversion) |
356
+ | `getVoteAccounts` | `client.get_vote_accounts(...)` | [guide](https://www.helius.dev/docs/rpc/guides/getvoteaccounts) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/getvoteaccounts) |
357
+ | `isBlockhashValid` | `client.is_blockhash_valid(...)` | [guide](https://www.helius.dev/docs/rpc/guides/isblockhashvalid) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/isblockhashvalid) |
358
+ | `minimumLedgerSlot` | `client.minimum_ledger_slot()` | [guide](https://www.helius.dev/docs/rpc/guides/minimumledgerslot) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/minimumledgerslot) |
359
+ | `requestAirdrop` | `client.request_airdrop(...)` | [guide](https://www.helius.dev/docs/rpc/guides/requestairdrop) · [ref](https://www.helius.dev/docs/api-reference/rpc/http/requestairdrop) |
360
+
361
+ ## License
362
+
363
+ [MIT](LICENSE)