Skip to main content

Overview

Every DAS list method (getAssetsByOwner, getAssetsByGroup, getAssetsByCreator, getAssetsByAuthority, searchAssets, getTokenAccounts, getNftEditions and getSignaturesForAsset) returns results in pages. You can page in three ways: Use one method per request. Mixing page with cursor, before or after, or cursor with before or after, returns -32602.

Limits

  • limit sets the page size. The maximum and the default are both 1,000.
  • page starts at 1. page: 0 is rejected.
  • Batch methods (getAssetBatch, getAssetProofBatch) take at most 1,000 IDs.

Page numbers

Pass page and limit. The response echoes page:
Stop when a page returns fewer items than limit.
Page numbers are simple, but the database still has to skip every earlier row, so deep pages get slower. For large collections or wallets, use cursors.

Cursors

When you send no page, before or after, the API pages by cursor and returns a cursor value with each page. Pass it back to get the next page:
Cursors work only when results are sorted by id, which is the default.

Ranges

before and after take asset IDs and return the assets between them. For example, after alone continues from a known asset ID:
Ranges also require sorting by id.

Sorting

Methods that list assets accept sortBy:
string
id (default), created, updated, recent_action or none.
string
asc (default) or desc.
Sorting by anything other than id works only with page numbers. Combining it with cursor, before or after returns -32602.