Skip to content
Draft
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
26 changes: 26 additions & 0 deletions evm/activity.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,32 @@ Each activity includes detailed information such as:
Activities are mostly indexed events. There are, of course, no events for native token transfers (wen [7708](https://ethereum-magicians.org/t/eip-7708-eth-transfers-emit-a-log/20034)?). We do have a heuristic to catch very simple native token transfers, where the native token transfer is the entirety of the transaction, but unfortunately we don't currently catch native token transfers that happen within internal txns.
</Callout>

## 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. The `warnings` field will contain information about which chain IDs were not supported, and activity will be returned only for the supported chains.

For example, if you request `chain_ids=1,9999,10,77777777777`:

```json
{
"activity": [
// Activity for chains 1 and 10 only
],
"warnings": [
{
"code": "UNSUPPORTED_CHAIN_IDS",
"message": "Some requested chain_ids are not supported. Activity is returned only for supported chains.",
"chain_ids": [9999, 77777777777],
"docs_url": "https://docs.sim.dune.com/evm/supported-chains"
}
]
}
```

<Note>
Invalid chain ID tags (like typos in tag names) will still return errors as designed. Only invalid numeric chain IDs generate warnings.
</Note>

## Data Finality & Re-orgs

Sim APIs are designed to automatically detect and handle blockchain re-organizations.
Expand Down
27 changes: 27 additions & 0 deletions evm/balances.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,33 @@ When set, each balance includes a `historical_prices` array with one entry per o
The maximum number of historical price offsets is 3. If more than 3 are provided, the API returns an error.
</Warning>

## 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. The `warnings` 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`:

```json
{
"wallet_address": "0x37305b1cd40574e4c5ce33f8e8306be057fd7341",
"balances": [
// Balances for chains 1 and 10 only
],
"warnings": [
{
"code": "UNSUPPORTED_CHAIN_IDS",
"message": "Some requested chain_ids are not supported. Balances are returned only for supported chains.",
"chain_ids": [9999, 77777777777],
"docs_url": "https://docs.sim.dune.com/evm/supported-chains"
}
]
}
```

<Note>
Invalid chain ID tags (like typos in tag names) will still return errors as designed. Only invalid numeric chain IDs generate warnings.
</Note>

## Pagination

This endpoint is using cursor based pagination. You can use the `limit` query parameter to define the maximum page size.
Expand Down
39 changes: 39 additions & 0 deletions evm/openapi/activity.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,38 @@
}
}
},
"Warning": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Warning code identifier",
"example": "UNSUPPORTED_CHAIN_IDS"
},
"message": {
"type": "string",
"description": "Human-readable warning message",
"example": "Some requested chain_ids are not supported. Activity is returned only for supported chains."
},
"chain_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": "List of chain IDs that triggered this warning"
},
"docs_url": {
"type": "string",
"description": "URL to relevant documentation",
"example": "https://docs.sim.dune.com/evm/supported-chains"
}
}
},
"ActivityResponse": {
"type": "object",
"required": [
Expand All @@ -337,6 +369,13 @@
},
"description": "Array of activity items"
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Warning"
},
"description": "Array of warnings about the request. For example, warnings about unsupported chain IDs."
},
"next_offset": {
"type": "string",
"description": "Pagination cursor for the next page of results"
Expand Down
46 changes: 46 additions & 0 deletions evm/openapi/balances.json
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,38 @@
}
}
},
"Warning": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Warning code identifier",
"example": "UNSUPPORTED_CHAIN_IDS"
},
"message": {
"type": "string",
"description": "Human-readable warning message",
"example": "Some requested chain_ids are not supported. Balances are returned only for supported chains."
},
"chain_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": "List of chain IDs that triggered this warning"
},
"docs_url": {
"type": "string",
"description": "URL to relevant documentation",
"example": "https://docs.sim.dune.com/evm/supported-chains"
}
}
},
"BalancesResponse": {
"type": "object",
"required": [
Expand All @@ -451,6 +483,13 @@
}
]
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Warning"
},
"description": "Array of warnings about the request. For example, warnings about unsupported chain IDs."
},
"next_offset": {
"type": "string",
"description": "Use this value as the `offset` in your next request to continue pagination. Not included when there are no more balances."
Expand Down Expand Up @@ -482,6 +521,13 @@
"type": "array",
"items": { "$ref": "#/components/schemas/BalanceData" }
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Warning"
},
"description": "Array of warnings about the request. For example, warnings about unsupported chain IDs."
},
"request_time": { "type": "string", "format": "date-time" },
"response_time": { "type": "string", "format": "date-time" },
"wallet_address": { "type": "string", "example": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045" }
Expand Down
39 changes: 39 additions & 0 deletions evm/openapi/transactions.json
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,38 @@
}
}
},
"Warning": {
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"type": "string",
"description": "Warning code identifier",
"example": "UNSUPPORTED_CHAIN_IDS"
},
"message": {
"type": "string",
"description": "Human-readable warning message",
"example": "Some requested chain_ids are not supported. Transactions are returned only for supported chains."
},
"chain_ids": {
"type": "array",
"items": {
"type": "integer",
"format": "int64"
},
"description": "List of chain IDs that triggered this warning"
},
"docs_url": {
"type": "string",
"description": "URL to relevant documentation",
"example": "https://docs.sim.dune.com/evm/supported-chains"
}
}
},
"TransactionsResponse": {
"type": "object",
"required": [
Expand All @@ -473,6 +505,13 @@
}
]
},
"warnings": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Warning"
},
"description": "Array of warnings about the request. For example, warnings about unsupported chain IDs."
},
"next_offset": {
"type": "string"
},
Expand Down
27 changes: 27 additions & 0 deletions evm/transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@ Transactions are ordered by descending block time, so the most recent transactio

<SupportedChains endpoint="transactions" />

## 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. The `warnings` field will contain information about which chain IDs were not supported, and transactions will be returned only for the supported chains.

For example, if you request `chain_ids=1,9999,10,77777777777`:

```json
{
"wallet_address": "0x37305b1cd40574e4c5ce33f8e8306be057fd7341",
"transactions": [
// Transactions for chains 1 and 10 only
],
"warnings": [
{
"code": "UNSUPPORTED_CHAIN_IDS",
"message": "Some requested chain_ids are not supported. Transactions are returned only for supported chains.",
"chain_ids": [9999, 77777777777],
"docs_url": "https://docs.sim.dune.com/evm/supported-chains"
}
]
}
```

<Note>
Invalid chain ID tags (like typos in tag names) will still return errors as designed. Only invalid numeric chain IDs generate warnings.
</Note>

## Decoded transactions

Enable decoded transaction data and logs by adding the `?decode=true` query parameter to your request.
Expand Down