Pagination

Pagination is a technique used to split large data sets into smaller, more manageable parts. This allows better efficient retrieval and processing of data. In your platform schema, pagination is implemented with the following attributes:

  • count: The total number of objects in the query set.
  • next: A URL to the next results page. If there are no more pages, the value is null.
  • previous: A URL to the previous results page. If this is the first page, the value is null.
  • data: An array of objects that represent the data for the current page.

To use pagination in your API, include the page number as a query parameter in the request URL. For example, to retrieve the second page of results in your example, you use the following URL:

To use pagination in your API, you can include the page number as a query parameter in the request URL. For example, to retrieve the second page of results in your example, you would use the following URL:

<https://api.aqua.test.krayondigital.com/main/api/v1/wallets/15a8430a50d84c7fba6a37d4ccb93155/Transfers?page=2>

To retrieve the third page, use:

<https://api.aqua.test.krayondigital.com/main/api/v1/wallets/15a8430a50d84c7fba6a37d4ccb93155/Transfers?page=3>

And so on.

When implementing pagination in your API, it's important to consider the size of the pages and the estimated total number of the returned pages. It's also recommended to provide additional filtering options to allow users to reduce the results and the number of pages returned pages. see
/main/api/v1/transfers.

{
  "count": 109,
  "next": "https://api.aqua.test.krayondigital.com/main/api/v1/wallets/15a8430a50d84c7fba6a37d4ccb93155/Transfers?page=2",
  "previous": None,
    "data": [
      {
        "id": "e75f44e99be3d1a74c00236b77f55540",
        "chain_id": 5,
        "from_address": "0xea0707279876c01412aa15a73f7bb22acf196fd1",
        "to_address": "0xea03f07279876722acf19c01412aa15a7b7b6fd1",
        "amount": "0.000120000000000000",
        "amount_wei": 120000000000000,
        "native_price": "0.000000000000000000",
        "token_price": "0.000000000000000000",
        "status": "TRANSACTION_PENDING",
        "direction": 1,
        "transaction": "1f1b16bc0f5e45808f7232013dd6c53b",
        "tags": ["first"],
        "note": "ASdsad",
        "wallet": "b2195629c0c57f5dc439d884447648df",
        "transaction_fee": 3.9497822529e-08, 
        "transaction_fee_usd": 4.738654951933e-05, 
        "block_time_stamp": "2022-12-29T12:54:29.274264Z",
        "symbol": "WETH",
        "decimals": 18,
        "name": "WETH",
        "logo_uri": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",  
      },
   ],
}

If you have any additional questions or concerns about implementing pagination in your API, feel free to reach out to our support team for further guidance.