Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .well-known/ai-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@
"type": "boolean",
"description": "When true, excludes tokens with less than 100 USD liquidity."
},
"exclude_unpriced": {
"type": "boolean",
"description": "When true, excludes token balances without available USD pricing. Default is false."
},
"limit": {
"type": "integer",
"minimum": 1,
Expand Down Expand Up @@ -423,6 +427,10 @@
"enum": ["erc20", "native"],
"description": "Specify erc20 or native to get only ERC20 stablecoins or native stablecoins (e.g. xDAI on Gnosis)."
},
"exclude_unpriced": {
"type": "boolean",
"description": "When true, excludes token balances without available USD pricing. Default is false."
},
"limit": {
"type": "integer",
"minimum": 1,
Expand Down
4 changes: 4 additions & 0 deletions evm/balances.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ You can include `metadata=pools` in your request to see which liquidity pool was

We also include the `pool_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](/token-filtering) guide.

### Exclude unpriced balances

By default, balances for tokens without available pricing data are included in responses. To filter them out, pass `exclude_unpriced=true`.

### Exclude tokens with less than 100 USD liquidity

Use the optional `exclude_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](/token-filtering) guide.
Expand Down
20 changes: 20 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,16 @@
"default": false
}
},
{
"name": "exclude_unpriced",
"in": "query",
"description": "When true, excludes balances for tokens without available pricing data. By default, unpriced token balances are included.",
"required": false,
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "historical_prices",
"in": "query",
Expand Down Expand Up @@ -1579,6 +1589,16 @@
"default": false
}
},
{
"name": "exclude_unpriced",
"in": "query",
"description": "When true, excludes balances for tokens without available pricing data. By default, unpriced token balances are included.",
"required": false,
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "historical_prices",
"in": "query",
Expand Down
4 changes: 3 additions & 1 deletion token-filtering.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ The following examples demonstrate how to use this data to create robust filteri

Use the optional `exclude_spam_tokens` query parameter on the EVM Balances API to automatically filter out tokens with less than 100 USD of liquidity. Include `exclude_spam_tokens=true` to have those tokens excluded from the response entirely.

By default, balances for tokens without available pricing data are included. Set `exclude_unpriced=true` if you want those unpriced token balances filtered out.

```bash
curl -s -X GET 'https://api.sim.dune.com/v1/evm/balances/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?exclude_spam_tokens=true' \
curl -s -X GET 'https://api.sim.dune.com/v1/evm/balances/0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?exclude_spam_tokens=true&exclude_unpriced=true' \
-H 'X-Sim-Api-Key: YOUR_API_KEY'
```

Expand Down