Available Queries
Get PnL for wallet
This GraphQL query provides detailed financial metrics, including unrealized and realized profit and loss (PnL), current balance, and transaction insights for each token held by a specific wallet address.
Credit Cost
TBD
Supported Chains
- Base Mainnet
- BSC Mainnet
- Ethereum Mainnet
- Gnosis Mainnet
- Polygon Mainnet
- Optimism Mainnet
This query is currently in Beta. It is stable for testing and evaluation but may undergo changes in schema or behavior as we continue to improve it. No API credits are currently charged.
We welcome your feedback so please reach out to us directly to report issues or request features.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
chain_name | enum | Yes | Chain name to filter events (e.g., BASE_MAINNET , ETH_MAINNET , BSC_MAINNET ) |
wallet_address | string | Yes | The wallet address to query |
Query
You can query the upnlForWallet
endpoint to retrieve detailed PnL metrics for a wallet.
Basic Query
Complete Query
Response Format
Here’s an example of the response data structure:
Field Descriptions
Field | Type | Description |
---|---|---|
token | string | Token contract address, represented in uppercase with a 0x prefix |
cost_basis | float | Simple Average cost basis per token in USD |
current_price | float | Current market price per token in USD |
pnl_realized_usd | float | Realized profit or loss in USD from completed trades |
pnl_unrealized_usd | float | Current unrealized profit or loss in USD based on the latest price |
net_balance_change | BigInteger | Net token movement (inflow minus outflow) over the past 7 days |
marketcap_usd | string | Token’s estimated market capitalization in USD |
contract_metadata | object | Contains metadata details for the token contract |