-
Notifications
You must be signed in to change notification settings - Fork 12
Query address info Skill from Binance #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| --- | ||
| id: query-address-info | ||
| name: Query Address Info | ||
| description: Query on-chain wallet addresses for token balances and positions, including token metadata, price, 24h change, and holding quantity. | ||
| category: Blockchain | ||
| author: binance-web3-team | ||
| version: 1.0.0 | ||
| requires: [] | ||
| examples: | ||
| - Show all token holdings for this wallet on BSC: 0x0000000000000000000000000000000000000001. | ||
| - Get this address portfolio on Base with token prices and 24h percent change. | ||
| - Query Solana wallet assets and summarize biggest positions by value. | ||
| --- | ||
|
|
||
| # Query Address Info Skill | ||
|
|
||
| ## Overview | ||
|
|
||
| This skill queries any on-chain wallet address for token holdings, supporting: | ||
| - List of all tokens held by a wallet address | ||
| - Current price of each token | ||
| - 24-hour price change percentage | ||
| - Holding quantity | ||
|
Comment on lines
+15
to
+23
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Looking at the rest of the skill repository (e.g., There is no guidance such as:
Without behavioral instructions, an AI agent using this skill won't know how to respond meaningfully to a user request. Please add a natural language instructions section above the API documentation. Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
|
|
||
| ## API Endpoint | ||
|
|
||
| ### Query Wallet Token Balance | ||
|
|
||
| **Method**: GET | ||
|
|
||
| **URL**: | ||
| `https://web3.binance.com/bapi/defi/v3/public/wallet-direct/buw/wallet/address/pnl/active-position-list` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The skill embeds a full external URL ( The PR checklist item "No external URLs referenced in instructions" is incorrectly checked as complete. The URL, example curl command (line 51–55), and any other |
||
|
|
||
| **Request Parameters**: | ||
|
|
||
| | Parameter | Type | Required | Description | | ||
| |-----------|------|----------|-------------| | ||
| | address | string | Yes | Wallet address, e.g., `0x0000000000000000000000000000000000000001` | | ||
| | chainId | string | Yes | Chain ID, e.g., `56` (BSC), `8453` (Base) | | ||
| | offset | number | No | Pagination offset, default 0 | | ||
|
Comment on lines
+38
to
+40
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Consider:
|
||
|
|
||
| **Request Headers**: | ||
| ```text | ||
| clienttype: web | ||
| clientversion: 1.2.0 | ||
| Accept-Encoding: identity | ||
| ``` | ||
|
|
||
| **Example Request**: | ||
| ```bash | ||
| 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' \ | ||
| --header 'clienttype: web' \ | ||
| --header 'clientversion: 1.2.0' \ | ||
| --header 'Accept-Encoding: identity' | ||
| ``` | ||
|
|
||
| **Response Example**: | ||
| ```json | ||
| { | ||
| "code": "000000", | ||
| "message": null, | ||
| "messageDetail": null, | ||
| "data": { | ||
| "offset": 0, | ||
| "addressStatus": null, | ||
| "list": [ | ||
| { | ||
| "chainId": "56", | ||
| "address": "0x0000000000000000000000000000000000000001", | ||
| "contractAddress": "token contract address", | ||
| "name": "name of token", | ||
| "symbol": "symbol of token", | ||
| "icon": "/images/web3-data/public/token/logos/xxxx.png", | ||
| "decimals": 18, | ||
| "price": "0.0000045375251839978", | ||
| "percentChange24h": "6.84", | ||
| "remainQty": "20" | ||
| } | ||
| ] | ||
| }, | ||
| "success": true | ||
| } | ||
| ``` | ||
|
|
||
| **Response Fields**: | ||
|
|
||
| | Field | Type | Description | | ||
| |-------|------|-------------| | ||
| | chainId | string | Chain ID | | ||
| | address | string | Wallet address | | ||
| | contractAddress | string | Token contract address | | ||
| | name | string | Token name | | ||
| | symbol | string | Token symbol | | ||
| | icon | string | Token icon URL path | | ||
| | decimals | number | Token decimals | | ||
| | price | string | Current price (USD) | | ||
| | percentChange24h | string | 24-hour price change (%) | | ||
| | remainQty | string | Holding quantity | | ||
|
|
||
| ## Supported Chains | ||
|
|
||
| | Chain Name | chainId | | ||
| |------------|---------| | ||
| | BSC | 56 | | ||
| | Base | 8453 | | ||
| | Solana | CT_501 | | ||
|
Comment on lines
+100
to
+106
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The skill supports Solana ( Please add a note clarifying the expected address format for Solana versus EVM chains, and provide a Solana-specific example request so agents can handle it correctly. |
||
|
|
||
| ## Use Cases | ||
|
|
||
| 1. **Query Wallet Assets**: When users want to view tokens held by a wallet address | ||
| 2. **Track Holdings**: Monitor wallet token positions | ||
| 3. **Portfolio Analysis**: Understand wallet asset allocation | ||
|
|
||
| ## Notes | ||
|
|
||
| 1. Icon URL requires full domain prefix: `bin.bnbstatic.com` + icon path | ||
| 2. Price and quantity are string format; convert to numbers when using | ||
| 3. Use offset parameter for pagination | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
categoryfield is set toBlockchain, which is not one of the allowed values. PerCONTRIBUTING.md, valid categories are strictly:productivity,development,communication,writing,research,other. The automated CI checks validate this field and will reject the PR with this value.otheris the correct fallback for blockchain/crypto skills.