# Wallet Portfolio tool

#### Wallet Portfolio Tool (`wallet_portfolio_tool`)

Provides a quick overview of token balances and their USD values for a specified Solana wallet. Ideal for checking a user's current holdings.

{% hint style="info" %}
**Input:** Requires a Solana wallet public key (`agent_public`).
{% endhint %}

```python
class WalletPortfolioInput(BaseModel):
    agent_public: Optional[str] # The public key of the wallet
```

**Key Functionality:**

* Displays detailed info for tokens valued at $0.20 USD or more.
* Summarizes tokens below this value, showing count and total worth.
* Calculates and shows the total portfolio value in USD.
* Data is fetched via the `get_wallet_portfolio_ds()` .

***

**Sample Usage Queries (How an AI might use it):**

* "What's my portfolio"
* "How much LUMO do I hold?"
* "What are my Solana balances?" (Note: While this is SOL's mint, the tool expects a wallet address)
* "What's the value of the assets?"
* "Display the holdings for the connected wallet." (If `agent_public` is pre-filled)
* "Check my token balances." (If wallet is known)
* "What's the current portfolio status?"
* "List all tokens and their values."
* "How much is worth?"
* "Provide a summary of assets for wallet."

***

**Quick Code Glance:**

```python
class WalletPortfolioTool(BaseTool):
    name: ClassVar[str] = "wallet_portfolio_tool"
    description: ClassVar[str] = "Get detailed information about all tokens held in a wallet..."
    args_schema: ClassVar[Type[BaseModel]] = WalletPortfolioInput
```

***

**Important:**

* This tool operates **asynchronously** (`_arun`).
* Output accuracy depends on the external data provider.


---

# Agent Instructions: 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:

```
GET https://www.lumolabs.ai/tools/wallet-portfolio-tool.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
