> For the complete documentation index, see [llms.txt](https://docs.agentipy.fun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agentipy.fun/tools/use-helius.md).

# Use Helius

The `Use Helius` tool, part of AgentiPy, provides functionalities for interacting with the Helius APIs on Solana. Helius offers a suite of developer tools for reading parsed transaction data, NFT events, balances, mintlists, and managing webhooks for real-time notifications. This tool requires a Helius API key.

## Functionality

This tool is implemented in the `HeliusManager` class. All methods are static and make direct requests to Helius API endpoints. The Helius API key and RPC URL are sourced from the `SolanaAgentKit` instance (`agent.helius_api_key`, `agent.helius_rpc_url`).

### Key Methods:

* `get_balances(agent: SolanaAgentKit, address: str)`: Fetches native SOL and SPL token balances for a given `address`.
* `get_address_name(agent: SolanaAgentKit, address: str)`: Retrieves known names associated with an `address` (e.g., from domain services or exchanges).
* `get_nft_events(agent: SolanaAgentKit, accounts: List[str], types: List[str] = None, ...)`: Queries NFT event history for specified `accounts`, filterable by event `types`, `sources`, slot/time ranges, and collection details. Supports pagination.
* `get_mintlists(agent: SolanaAgentKit, first_verified_creators: List[str], ...)`: Retrieves mintlists based on first verified creators or verified collection addresses. Supports pagination.
* `get_nft_fingerprint(agent: SolanaAgentKit, mints: List[str])`: Gets the Helius fingerprint for a list of NFT `mints`.
* `get_active_listings(agent: SolanaAgentKit, first_verified_creators: List[str], ...)`: Fetches active NFT listings from various marketplaces, filterable by creators or collections.
* `get_nft_metadata(agent: SolanaAgentKit, mint_accounts: List[str])`: Retrieves metadata for a list of SPL token/NFT `mint_accounts`.
* `get_raw_transactions(agent: SolanaAgentKit, accounts: List[str], ...)`: Fetches raw (unparsed) transaction history for specified `accounts`.
* `get_parsed_transactions(agent: SolanaAgentKit, transactions: List[str], commitment: str = None)`: Fetches and parses specific transactions by their signatures.
* `get_parsed_transaction_history(agent: SolanaAgentKit, address: str, ...)`: Retrieves parsed transaction history for a given `address`, filterable by various criteria.
* `create_webhook(agent: SolanaAgentKit, webhook_url: str, transaction_types: list, account_addresses: list, webhook_type: str, ...)`: Creates a new Helius webhook to receive real-time notifications.
* `get_all_webhooks(agent: SolanaAgentKit)`: Lists all existing webhooks for the API key.
* `get_webhook(agent: SolanaAgentKit, webhook_id: str)`: Retrieves details for a specific `webhook_id`.
* `edit_webhook(agent: SolanaAgentKit, webhook_id: str, ...)`: Modifies an existing webhook.
* `delete_webhook(agent: SolanaAgentKit, webhook_id: str)`: Deletes a webhook.

(Helper functions `_make_get_request`, `_make_post_request`, etc. are used internally to interact with the Helius API.)

##

**Important Considerations:**

* **API Key:** A Helius API key is required and must be configured in `SolanaAgentKit` as `agent.helius_api_key`. The Helius RPC URL must also be set as `agent.helius_rpc_url`.
* **Direct API Interaction:** This tool interacts directly with Helius APIs. It does not use the Agentipy proxy service.
* **Rate Limits:** Be mindful of Helius API rate limits associated with your API key tier.
* **Data Richness:** Helius provides parsed and enriched Solana data, which can be very detailed and useful for analytics, event tracking, and more.

## Source Code

You can find the source code for this tool on GitHub: <https://github.com/niceberginc/agentipy/blob/main/agentipy/tools/use_helius.py>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.agentipy.fun/tools/use-helius.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
