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.
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.
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.
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.
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.
next_offset to set the offset query parameter of the next page of results.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
{token_address}.Compute Unit Cost
This sub-path has a fixed CU cost of 1 per request.Headers
Used for authenticating requests. Provide an API key with a purpose of Sim API. See Authentication.
Path Parameters
Wallet address to get balances for
Query Parameters
Filter by chain(s). Accepts numeric chain IDs and/or tags. Provide a single value (e.g. ?chain_ids=1 or ?chain_ids=mainnet) or a comma-separated list (e.g. ?chain_ids=1,8543,testnet). Chain names are not accepted. If this query parameter is omitted, results include balances from chains with the default tag. See the Supported Chains Tags section.
Specify erc20 or native to get only ERC20 tokens or native assets, respectively
erc20, native A comma separated list of additional metadata fields to include for each token. Supported values: logo, url
When true, excludes tokens with less than 100 USD liquidity from the response. This differs from the low_liquidity field in the response.
Historical price selection. Accepts integer | integer[]. Provide whole numbers representing hours in the past, up to 3 time offsets (e.g. 8760 for 1 year ago or 720,168,24 for 1 month, 1 week, and 1 day ago). When set, each balance includes a historical_prices array with one entry per offset.
x >= 1The offset to paginate through result sets. This is a cursor being passed from the previous response, only use what the backend returns here.
Maximum number of balances to return. Default is 1000 when not provided. Values above 1000 are reduced to 1000.
1 <= x <= 1000Response
Successful Response
"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
Use this value as the offset in your next request to continue pagination. Not included when there are no more balances.
Timestamp of when the request was received.
Timestamp of when the response was generated.