Skip to main content
TL;DR: New POST /wallet/position batch endpoint - fetch up to 100 positions in one request with optimized Solana getMultipleAccounts.

Batch Wallet Positions Endpoint

New batch mode for the wallet/position endpoint, allowing you to fetch multiple positions across different wallets and assets in a single API call.

Why Batch?

New POST Endpoint

Response Format

Each item in the response now includes a wallet field for easy identification:

SDK Support

Both TypeScript SDK methods are now available:

Performance Optimizations

  • Single SQL query using UNION ALL instead of N individual queries
  • Batched token data fetched in one database call
  • Solana: Uses getMultipleAccounts for all SPL tokens (100 accounts per RPC call)
  • Parallel execution of native SOL and SPL token balance fetches
The batch endpoint is optimized for Solana tokens. EVM chain balance fetching will be added in a future update.

SDK Updates

@mobula_labs/types v0.1.2

New schemas for batch wallet positions:
  • SinglePositionBatchParamsSchema - Batch request validation
  • SinglePositionBatchResponseSchema - Batch response validation
  • batchPositionItemSchema - Position item with wallet field
  • Type aliases: WalletPositionParams, WalletPositionResponse, WalletPositionBatchParams, WalletPositionBatchResponse

@mobula/sdk v0.1.2

New methods:
  • fetchWalletPosition(params) - GET single position
  • fetchWalletPositionBatch(params) - POST batch positions