Overview
This guide explains how to paginate through approval records for a single address, identifying which projects have been authorized and detailing the specific assets/amounts permitted under each authorization.
API Endpoint
Request Method: POST https://web3.okx.com/api/v5/wallet/security/approvals
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
addressList | Array | Yes | List of addresses (max 20) |
> chainIndex | String | Yes | Unique chain identifier (e.g., ETH for Ethereum) |
> address | String | Yes | Wallet address (e.g., 0x742d35Cc6634C0532925a3b844Bc454e4438f44e) |
limit | String | No | Number of records per page (default: 50, max: 100) |
cursor | String | No | Pagination cursor (leave empty for first page) |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
chainIndex | String | Chain identifier matching the request |
cursor | String | Next page cursor (empty if no more pages) |
approvalProjects | Array | List of authorized projects |
> projectName | String | Project name (e.g., Uniswap) |
> projectIcon | String | URL to project logo |
> approveAddress | String | Contract address of the authorized project |
> tokens | Array | Approved tokens/amounts |
>> imageUrl | String | Token logo URL |
>> symbol | String | Token symbol (e.g., USDT) |
>> status | String | Approval status: 1 (success), 2 (canceling), 3 (pending) |
>> tokenAddress | String | Token contract address |
>> approvalNum | String | Approved amount (divide by 10^[token decimals] for actual value) |
Example Workflow
Step 1: Prepare the Request
{
"addressList": [
{
"chainIndex": "ETH",
"address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e"
}
],
"limit": "50"
}Step 2: Interpret the Response
{
"chainIndex": "ETH",
"cursor": "next_page_cursor_123",
"approvalProjects": [
{
"projectName": "Uniswap",
"projectIcon": "https://example.com/uniswap.png",
"approveAddress": "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
"tokens": [
{
"imageUrl": "https://example.com/usdt.png",
"symbol": "USDT",
"status": "1",
"tokenAddress": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"approvalNum": "1000000000000000000"
}
]
}
]
}๐ Learn how to revoke approvals securely
FAQs
1. What happens if I exceed the 20-address limit?
The API will reject the request. Split larger address lists into multiple requests.
2. How do I calculate the actual approved amount?
Divide approvalNum by 10^[token decimals]. For USDT (6 decimals), 1000000000000000000 = 1,000,000 USDT.
3. Can I filter approvals by status?
Not directly via API. Filter client-side using the status field.
4. Why is my cursor empty in the response?
It indicates the last page of results.
Best Practices
- Regularly audit approvals using this API to minimize security risks.
- ๐ Explore advanced wallet security features
- Revoke unused approvals to reduce attack surfaces.