Skip to content

Commit 3160caf

Browse files
committed
add Query Address Info Skill from binance
Skill is added from https://developers.binance.com/en/skills/detail/binance-web3/query-address-info
1 parent d33b6d4 commit 3160caf

1 file changed

Lines changed: 118 additions & 0 deletions

File tree

skills/query-address-info/SKILL.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
---
2+
id: query-address-info
3+
name: Query Address Info
4+
description: Query on-chain wallet addresses for token balances and positions, including token metadata, price, 24h change, and holding quantity.
5+
category: Blockchain
6+
author: binance-web3-team
7+
version: 1.0.0
8+
requires: []
9+
examples:
10+
- Show all token holdings for this wallet on BSC: 0x0000000000000000000000000000000000000001.
11+
- Get this address portfolio on Base with token prices and 24h percent change.
12+
- Query Solana wallet assets and summarize biggest positions by value.
13+
---
14+
15+
# Query Address Info Skill
16+
17+
## Overview
18+
19+
This skill queries any on-chain wallet address for token holdings, supporting:
20+
- List of all tokens held by a wallet address
21+
- Current price of each token
22+
- 24-hour price change percentage
23+
- Holding quantity
24+
25+
## API Endpoint
26+
27+
### Query Wallet Token Balance
28+
29+
**Method**: GET
30+
31+
**URL**:
32+
`https://web3.binance.com/bapi/defi/v3/public/wallet-direct/buw/wallet/address/pnl/active-position-list`
33+
34+
**Request Parameters**:
35+
36+
| Parameter | Type | Required | Description |
37+
|-----------|------|----------|-------------|
38+
| address | string | Yes | Wallet address, e.g., `0x0000000000000000000000000000000000000001` |
39+
| chainId | string | Yes | Chain ID, e.g., `56` (BSC), `8453` (Base) |
40+
| offset | number | No | Pagination offset, default 0 |
41+
42+
**Request Headers**:
43+
```text
44+
clienttype: web
45+
clientversion: 1.2.0
46+
Accept-Encoding: identity
47+
```
48+
49+
**Example Request**:
50+
```bash
51+
curl --location 'https://web3.binance.com/bapi/defi/v3/public/wallet-direct/buw/wallet/address/pnl/active-position-list?address=0x0000000000000000000000000000000000000001&chainId=56&offset=0' \
52+
--header 'clienttype: web' \
53+
--header 'clientversion: 1.2.0' \
54+
--header 'Accept-Encoding: identity'
55+
```
56+
57+
**Response Example**:
58+
```json
59+
{
60+
"code": "000000",
61+
"message": null,
62+
"messageDetail": null,
63+
"data": {
64+
"offset": 0,
65+
"addressStatus": null,
66+
"list": [
67+
{
68+
"chainId": "56",
69+
"address": "0x0000000000000000000000000000000000000001",
70+
"contractAddress": "token contract address",
71+
"name": "name of token",
72+
"symbol": "symbol of token",
73+
"icon": "/images/web3-data/public/token/logos/xxxx.png",
74+
"decimals": 18,
75+
"price": "0.0000045375251839978",
76+
"percentChange24h": "6.84",
77+
"remainQty": "20"
78+
}
79+
]
80+
},
81+
"success": true
82+
}
83+
```
84+
85+
**Response Fields**:
86+
87+
| Field | Type | Description |
88+
|-------|------|-------------|
89+
| chainId | string | Chain ID |
90+
| address | string | Wallet address |
91+
| contractAddress | string | Token contract address |
92+
| name | string | Token name |
93+
| symbol | string | Token symbol |
94+
| icon | string | Token icon URL path |
95+
| decimals | number | Token decimals |
96+
| price | string | Current price (USD) |
97+
| percentChange24h | string | 24-hour price change (%) |
98+
| remainQty | string | Holding quantity |
99+
100+
## Supported Chains
101+
102+
| Chain Name | chainId |
103+
|------------|---------|
104+
| BSC | 56 |
105+
| Base | 8453 |
106+
| Solana | CT_501 |
107+
108+
## Use Cases
109+
110+
1. **Query Wallet Assets**: When users want to view tokens held by a wallet address
111+
2. **Track Holdings**: Monitor wallet token positions
112+
3. **Portfolio Analysis**: Understand wallet asset allocation
113+
114+
## Notes
115+
116+
1. Icon URL requires full domain prefix: `bin.bnbstatic.com` + icon path
117+
2. Price and quantity are string format; convert to numbers when using
118+
3. Use offset parameter for pagination

0 commit comments

Comments
 (0)