# Get Tokens or Transactions

{% content-ref url="../../../block-explorers/block-explorer-and-api-keys" %}
[block-explorer-and-api-keys](https://docs.cronos.org/~/changes/416/block-explorers/block-explorer-and-api-keys)
{% endcontent-ref %}

## GetTokensBlocking

given the BlockScout REST API base url and the account address (hexadecimal), it will return the list of all owned tokens (ref: <https://cronos.org/explorer/testnet3/api-docs>)

<figure><img src="https://1786307500-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqXsIo4b4WtOTfICyOIxa%2Fuploads%2Fgit-blob-124013b3f60f42e3fc1c6d436fe026606328949f%2Fimage%20(19)%20(2).png?alt=media" alt=""><figcaption></figcaption></figure>

* `Blockscout Base Url`: the base url of the BlockScout API (e.g. <https://cronos.org/explorer/api>)
* `Account Address`: the account address to query
* `Output`: the output of the query
* `Success`: success of the query
* `Output Message`: error message of the query

## GetTokenTransfersBlocking

given the BlockScout REST API base url and the account address (hexadecimal; required) and optional contract address (hexadecimal; optional -- it can be empty if the option is ByAddress), it will return all the token transfers (ERC20, ERC721... in the newer BlockScout releases, also ERC1155) (ref: <https://cronos.org/explorer/testnet3/api-docs>)

NOTE: QueryOption::ByContract is not supported by BlockScout

<figure><img src="https://1786307500-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqXsIo4b4WtOTfICyOIxa%2Fuploads%2Fgit-blob-a2bf7a42c9caacf0ad61e582b843d0bbfabff365%2Fimage%20(26).png?alt=media" alt=""><figcaption></figcaption></figure>

* `Blockscout Base Url`: the base url of the BlockScout API (e.g. <https://cronos.org/explorer/api>)
* `Address`: the account address to query
* `Contract Address`: the contract address to query
* `Option`: the query option
* `Output`: the output of the query
* `Success`: success of the query
* `Output Message`: error message of the query \*/

## GetTransactionHistoryBlocking

crono-scan api, get transaction history

<figure><img src="https://1786307500-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqXsIo4b4WtOTfICyOIxa%2Fuploads%2Fgit-blob-b5e2d47802919db2edc41fbcfd9d65b7ceb0fd56%2Fimage%20(15)%20(2).png?alt=media" alt=""><figcaption></figcaption></figure>

* `Address`: the address to query
* `Apikey`: the api key
* `Output`: the output of the query
* `Success`: success of the query
* `Output Message`: error message of the query

## GetErc20TransferHistoryBlocking

crono-scan api, get erc20 transaction history

<figure><img src="https://1786307500-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqXsIo4b4WtOTfICyOIxa%2Fuploads%2Fgit-blob-49aba90f55192fed25e3015601e43abe971571a5%2Fimage%20(25).png?alt=media" alt=""><figcaption></figcaption></figure>

* `Address`: the address to query
* `Contract Address`: the contract address to query
* `Option`: the query option
* `Api Key`: the api key
* `Output`: the output of the query
* `Success`: success of the query
* `Output Message`: error message of the query

## GetErc721TransferHistoryBlocking

crono-scan api, get erc721 transaction history

returns the ERC721 transfers of a given address of a given contract.

(address can be empty if option is ByContract)

default option is by address

<figure><img src="https://1786307500-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqXsIo4b4WtOTfICyOIxa%2Fuploads%2Fgit-blob-59fe16a9befdd4823da96f6a74e25311ad25ca8e%2Fimage%20(14)%20(2).png?alt=media" alt=""><figcaption></figcaption></figure>

* `Address`: the address to query
* `Contract Address`: the contract address to query
* `Option`: the query option
* `Api Key`: the api key
* `Output`: the output of the query
* `Success`: success of the query
* `Output Message`: error message of the query
