Token Prices
Sim looks up prices onchain. We use the most liquid onchain pair to determine a USD price. We return the available liquidity inpool_size as part of the response, and show a warning low_liquidity: true if this value is less than $10k.
You can include metadata=pools in your request to see which liquidity pool was used for pricing each token.
Token Filtering
We also include thepool_size field in all responses, allowing you to implement custom filtering logic based on your specific requirements. For a detailed explanation of our approach, see our Token Filtering guide.
Exclude tokens with less than 100 USD liquidity
Use the optionalexclude_spam_tokens query parameter to automatically filter out tokens with less than 100 USD of liquidity. Include the query parameter exclude_spam_tokens=true so that those tokens are excluded from the response entirely. This is distinct from the low_liquidity field in the response, which is true when liquidity is below 10,000. To learn more about how Sim calculates liquidity data, visit the Token Filtering guide.
Compute Unit Cost
The Balances endpoint’s CU cost equals the number of chains you include via thechain_ids query parameter.
For example, ?chain_ids=1,8453,137 processes three chains and consumes three CUs.
If you omit
chain_ids, the endpoint uses its default chain set (low-latency networks), which equals chains at request time (subject to change). See the tags section of the Supported Chains page and the Compute Units page for details.Historical prices
You can request historical point-in-time prices by adding thehistorical_prices query parameter. Use whole numbers to specify the number of hours in the past. You can request up to three offsets. For example, &historical_prices=168 returns the price 168 hours (1 week) ago. &historical_prices=720,168,24 returns prices 720 hours (1 month) ago, 168 hours (1 week) ago, and 24 hours ago.
The
historical_prices parameter is currently supported only on the EVM Balances and EVM Token Info endpoints.historical_prices array with one entry per offset:
price_usd on the balance and the values in historical_prices[].price_usd.
Unsupported Chain IDs
When you request chain IDs that are not supported, the API will return a warning in the response instead of throwing an error. Thewarnings field will contain information about which chain IDs were not supported, and balances will be returned only for the supported chains.
For example, if you request chain_ids=1,9999,10,77777777777:
Invalid chain ID tags (like typos in tag names) will still return errors as designed. Only invalid numeric chain IDs generate warnings.
Pagination
This endpoint is using cursor based pagination. You can use thelimit query parameter to define the maximum page size.
Results might at times be less than the maximum page size.
The next_offset value is passed back by the initial response and can be used to fetch the next page of results, by passing it as the offset query parameter in the next request.
Single token balance
Use the token sub-path of the Balances endpoint to fetch a wallet’s balance for one token on one chain. This sub-path accepts exactly one chain via thechain_ids query parameter.
- ERC-20 token
- Native asset
Use the ERC-20 contract address in
{token_address}.