Learn about parameters in our endpoints, how they work, and how to pass multiple values

Parameters supporting Multiple values

The Tsunami API supports sending requests with multiple values in parameters, allowing for more functionality. This page will cover what can you combine to get more functionality from Tsunami API.

To use it, write a parameter that supports multiple strings as an array in your request, like this:

?contract=0x00,0x01,0x002

The following parameters support multiple values:

Example One

You are making a request that has two contracts and one topic_0, lets call them Contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 and 0x362bc847A3a9637d3af6624EeC853618a43ed7D2, topic_0 0xddf5...b3ef

By doing that you will get every Event that happened to have these combinations of contracts and topics:

0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 + '0xddf5...b3ef'
0x362bc847A3a9637d3af6624EeC853618a43ed7D2 + '0xddf5...b3ef'

Example Two

Imagine that you need to make a request that contains the contract 0x362bc847A3a9637d3af6624EeC853618a43ed7D2 with topic_0 0xddf5...b3ef and 0xd78a...d822, topic_1 0x7C66...B445 and 0x9EA3...b1a4.

With that, the API will retrieve every Event with these combinations:

0x362bc847A3a9637d3af6624EeC853618a43ed7D2 + '0xddf5...b3ef' + '0x7C66...B445'
0x362bc847A3a9637d3af6624EeC853618a43ed7D2 + '0xddf5...b3ef' + '0x9EA3...b1a4'
0x362bc847A3a9637d3af6624EeC853618a43ed7D2 + '0xd78a...d822' + '0x7C66...B445'
0x362bc847A3a9637d3af6624EeC853618a43ed7D2 + '0xd78a...d822' + '0x9EA3...b1a4'

Query parameters

Read about every parameter used for querying in the table below:

ParameterDescription
chainIDThe id of our blockchain.
See the full list of Available blockchains.
versionCurrently, set to 1.
addressThe Externally Owned Account (EOA) address, is a 42-character hexadecimal address. Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045.
directionTransaction direction to filter out origin or destination addresses. either incoming or outgoing.
counterpartyThe Externally Owned Account (EOA) address, is a 42-character hexadecimal address. It is an address on the opposite side of the direction (incoming, outgoing). Example: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
contractThe contract is a 42-character hexadecimal address. For example, pick this contract 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 to get events. You can query up to 5 contracts within one request.
asset_typeThe asset type is the type of token you want to monitor. It takes ft (ERC-20 tokens), nft (ERC-720 tokens), multi (ERC-1155 tokens), and `native (Native tokens of the blockchains, like ETH, MATIC, BNB and others).
blockhashThe block hash is a 66-character hexadecimal value for example like 0x5d423d4895769b218d450fadcb325655a79e4c9c8d912cdc397735cd1faa82e2.
block_number_startThe first block to scan. Accepts block number like "15537351", "latest", "-1, -2, etc.".
block_number_endThe last block to scan. Accepts block number like "15537353", "latest", "-1, -2, etc.".
timestamp_startThe UNIX timestamp. The block must be within the timestamp range. Accepts Unix timestamp like "1663223655".
timestamp_endThe UNIX timestamp. The block must be within the timestamp range. Accepts Unix timestamp like "1663223656".
include_eventsTakes true or false values. If set to true, it will return transaction events.
include_logsTakes true or false values. If set to true, it will return transaction events, calls and contract creates/destructs
offsetA parameter used to paginate through the results. set the offset parameter in our request to the same value as range.next_offset in a previous response, to view the next results.
originTransaction origin, a 42-character hexadecimal address who signed the transaction & paid fees.
senderA 42-character hexadecimal address of the sender of the message.
callerA 42-character hexadecimal address from which the SELFDESTRUCT or CREATE was called.
op_codeThe opcode of the event
sig-hashA 10-character hexadecimal signature hash of the function you looking for.
topic0Topic 0 is a 66-character hexadecimal value of an event signature. For example, Transfer(from_address,to_address,uint256) event would have a topic 0 signature of 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. You can query up to 5 contracts within one request.
topic1Topic1 is a 66-character hexadecimal value of the first indexed parameter of the event. In the example above it can be from_address
topic2Topic2 is a 66-character hexadecimal value of the first indexed parameter of the event. In the example above it can be to_address
topic3Topic1 is a 66-character hexadecimal value of the first indexed parameter of the event.
limitMaximum rows to return. Free accounts can return a max of 100 rows per request. Pro accounts can return a max of 100 rows per request. Use the offset parameter to view all results.