Insight Token Sorting

Toomas Oosalu

The v1/tokens endpoint in Insight API now supports sorting by various attributes.

New sort_by and sort_order query parameters have been added. The following attributes are supported:

  • token_address - sort tokens alphabetically
  • token_price - sort based on the USD price of the token
  • usd_value - sort based on the USD value of the token per wallet, meaning balance multiplied by the token price
  • balance - sort based on the balance of the token for a wallet

sort_order can be either asc or desc

Try it out on our playground!


Additionally, another parameter was added, called include_without_price . This is true by default to have all tokens included, but setting it to false will remove tokens that do not have price data in the response.

...

These additions make the API better suited to be used in wallet applications to show user balances and present the data in the most useful way to the user.


๐Ÿ“– Learn more about Insight - itโ€™s open source and ready to power your applications!