> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobula.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Track Wallet Balance and Wallet Position with PnL Across Ethereum, Solana, BNB, Base & More

> Easily retrieve wallet data, token balances, and profit & loss (PnL) for any blockchain wallet using the Mobula API.

This endpoint allows you to **get wallet balance for a specific token**, analyze trading activity, and track realized and unrealized PnL across supported blockchains.

The [**Get Wallet Position**](https://docs.mobula.io/rest-api-reference/endpoint/wallet-position) endpoint is ideal for developers building wallet analytics, trader dashboards, or on-chain performance tools.

***

<div style={{ position: 'relative', paddingBottom: '56.25%', height: 0, overflow: 'hidden' }}>
  <iframe src="https://www.youtube.com/embed/MIJuCw6G_oQ" title="YouTube video player" style={{ position: 'absolute', top: 0, left: 0, width: '100%', height: '100%', border: 0 }} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowFullScreen />
</div>

***

## What this endpoint does

With this API, you can:

* Get a **crypto wallet balance** for a specific token

* Retrieve detailed **wallet position data**

* Analyze **buy and sell history** for a wallet

* Calculate **realized and unrealized PnL**

* Access enriched **token market data**

Unlike portfolio-level endpoints, this endpoint focuses on **one wallet + one token**, making it perfect for **deep wallet analysis**.

***

## What you’ll need

* Basic knowledge of REST APIs

* A **wallet address** (EVM or Solana)

* A **token (asset) address**

* The **blockchain** where the token exists (Ethereum, Solana, Base, etc.)

Optional:

* DexScreener (to discover tokens and active wallets)

***

## When to use Get Wallet Position

Use this endpoint when you want to:

* Get wallet balance for a **specific token**

* Analyze **wallet trading performance**

* Track **wallet PnL** over time

* Build **wallet analytics** or trader profiling tools

* Display **token-level wallet data** in dashboards

***

## Walkthrough — Get Wallet Balance for a Token

### 1. Prepare your query

The wallet/position endpoint requires three parameters:

| Parameter    | Description               |
| ------------ | ------------------------- |
| `asset`      | Token contract address    |
| `blockchain` | Blockchain name or ID     |
| `wallet`     | Wallet address to analyze |

### 2. Find a token (asset address)

To get a valid token address:

1. Open DexScreener

2. Search for the token you want to analyze

3. Copy the token contract address shown on the token page

This address is used as the `asset` parameter.

### 3. Identify the blockchain

Still on DexScreener:

* Check which blockchain the token is deployed on
  (e.g. [Solana](https://docs.mobula.io/blockchains/solana), [Ethereum](https://docs.mobula.io/blockchains/ethereum), [Base](https://docs.mobula.io/blockchains/base))

This value is used as the `blockchain` parameter.

### 4. Find a wallet address

To retrieve real wallet data:

1. Open the Top Traders section on DexScreener

2. Select an active wallet

3. Open it in the blockchain explorer

4. Copy the wallet address

This address is used as the `wallet` parameter.

***

## Execute the API Call

### Using cURL

```bash theme={null}
curl -X GET \
  "https://demo-api.mobula.io/api/2/wallet/position?wallet=YOUR_WALLET&asset=TOKEN_ADDRESS&blockchain=solana"
```

This request fetches **wallet balance, wallet position, and wallet PnL** for the selected token.

### Using the Mobula SDK

```ts theme={null}
import { Mobula } from '@mobula/sdk';

const mobula = new Mobula({ apiKey: 'your-key' });

const position = await mobula.fetchWalletPosition({
  wallet: 'YOUR_WALLET',
  blockchain: 'Solana',
  asset: 'TOKEN_ADDRESS',
});
```

***

## Review the wallet data response

The response returns **detailed wallet data**, including:

* Token metadata and pricing

* Token balance (raw and formatted)

* Wallet value in USD

* Buy and sell counts

* Trading volumes

* Average buy and sell prices

* Realized PnL

* Unrealized PnL

* Total wallet profit and loss

* First and last interaction timestamps

This allows you to fully analyze **wallet balance, trading behavior, and profitability** for a specific asset.

***

## Try It Live with Mobula Wallet Position Demo (UI)

You can also test the Get Wallet Position endpoint using our open-source Wallet Position UI demo.
This lightweight application uses Mobula cURL requests under the hood to fetch wallet balance, wallet data, and PnL for a specific token and blockchain, allowing you to validate parameters before integrating the API into your own application.

[Try it Here](https://mobula-demo-endpoint-production.up.railway.app/wallet-position)

***

## Summary

The [**Get Wallet Position**](https://docs.mobula.io/rest-api-reference/endpoint/wallet-position) endpoint lets you go beyond basic wallet balances by providing **token-level wallet data, trading history, and PnL**.
If you’re building tools that require:

* Accurate **wallet balance tracking**

* Token-specific **wallet analytics**

* Advanced **on-chain wallet insights**

This endpoint is the right choice.
