In some of our API Endpoints you can send requests with multiple values in parameters. In this page with will cover what can you combine to get more functionality from Tsunami API.

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

?contract=0x00,0x01,0x002

Events

For Events you can define several contracts and topics at the same time.

Example One

You are making a request that has two contracts and two topic_0, lets call them Contract A and B, topic_0 1 and 2 .

By doing that you will get every Event that happened to have these combinations of contracts and topics:
A1, A2, B1, B2

Example Two

Imagine that you need to make a request that contains contract A with topic_0 1 and 2, topic_1 X and Y.

With that, the API will retrive every Event with these combinations:
A1X A1Y A2X A2Y


Calls

This endpoint supports multiple contracts.

By defining, for example. three contracts, you will retrieve every call that happened on those three contracts in one response.


Create and Self-Destruct

Same as Calls, this endpoint supports multiple contracts.

By defining, for example. three contracts, you will retrieve when was the contracts were created/self-destructed.


Transfers

This endpoint supports multiple contracts and asset types.

Asset types can be defined as nativefor native transfers, ft for fungible tokens and nft for non-fungible tokens (ft is the default when it is not defined in request)
So, for multiple types write like so in your request: asset_type=ft, nft

When multiple contracts are present in the request, the API will get every transfer that has tokens associated with the defined contracts.