Querying Authorizations: Address-Based Asset Tracking and On-Chain Data Retrieval

·

Understanding Authorization Queries

Authorization queries allow you to paginate through approvals granted by a single address. This reveals:

  1. Approved projects (DApps, protocols, or services)
  2. Specific assets authorized per project
  3. Approval amounts for each token

👉 Master Web3 wallet security with our advanced API

API Endpoint Structure

POST https://web3.okx.com/api/v5/wallet/security/approvals

Request Parameters

ParameterTypeRequiredDescription
addressListArrayYesList of addresses (max 20)
chainIndexStringYesBlockchain identifier
addressStringYesWallet address
limitStringNoResults per page (default 50, max 100)
cursorStringNoPagination cursor

Response Data

FieldTypeDescription
chainIndexStringBlockchain identifier
cursorStringPagination token
approvalProjectsArrayAuthorized projects list
projectNameStringDApp/protocol name
projectIconStringLogo URL
approveAddressStringContract address
tokensArrayApproved assets
imageUrlStringToken icon
symbolStringToken ticker
statusStringAuthorization state (1=active, 2=canceling, 3=pending)
tokenAddressStringToken contract
approvalNumStringApproved amount (actual amount = value / 10^decimals)

Key Use Cases

  1. Security audits - Monitor all active token approvals
  2. Portfolio management - Track decentralized asset permissions
  3. Risk mitigation - Identify excessive or suspicious approvals

👉 Optimize your Web3 workflow with our developer tools

FAQ

How often should I check authorizations?

We recommend monthly audits for active wallets, especially after interacting with new DApps.

What's the difference between approvalNum and actual amount?

The approvalNum represents the raw blockchain value. Divide by 10^token decimals for human-readable amounts.

Can I revoke authorizations through this API?

While this endpoint only queries data, our full API suite includes authorization management capabilities.

Why limit to 20 addresses per request?

This ensures optimal performance while maintaining comprehensive data coverage for most use cases.

Best Practices

  1. Implement regular authorization checks
  2. Set reasonable approval limits
  3. Revoke unused permissions
  4. Monitor for unexpected changes

This comprehensive approach ensures secure Web3 wallet management while maintaining full control over your digital assets.