Blockchain utils

The utility APIs help you use some native blockchain features such as getting the address of a smart contract or estimating the block number.

Each utility API supports its own set of the blockchains. The list of the supported blockchains is provided in the API description further in this section.

Get the blockchain address of a smart contract by the deployment transaction ID

1 credit per API call

Get the blockchain address of a smart contract by the ID of its deployment transaction.

This API is supported for the following blockchains:

  • Algorand
  • BNB Smart Chain
  • Celo
  • Elrond
  • Ethereum
  • Flow
  • Harmony
  • Klaytn
  • Polygon
  • TRON
  • XinFin
SecurityX-API-Key
Request
path Parameters
chain
required
string

The blockchain to work with

Enum: "ALGO" "BSC" "CELO" "EGLD" "ETH" "FLOW" "KLAY" "KCS" "MATIC" "ONE" "TRON" "XDC"
hash
required
string

The ID (hash) of the deployment transaction

Example: 0xe6e7340394958674cdf8606936d292f565e4ecc476aaa8b258ec8a141f7c75d7
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/blockchain/sc/address/{chain}/{hash}
Request samples
Response samples
application/json
{
  • "contractAddress": "0xc21C81ef03f98898Fb155E00C364e8a7b9D158b8"
}

Estimate the block height for a future point in time

1 credit per API call

Get an estimated block height (number) for some future point in time.

Note that this API returnes an estimation of what the block height might be and not the exact block height.

This API is supported for the following blockchains:

  • BNB Smart Chain
  • Celo
  • Ethereum
  • Harmony
  • Klaytn
  • Polygon
SecurityX-API-Key
Request
path Parameters
chain
required
string

The blockchain to work with

Enum: "BSC" "CELO" "ETH" "KLAY" "MATIC" "ONE"
date
required
string

The date and time in the ISO 8601 standard format

Example: 2021-09-17T07:55:54Z
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to perform the required operation due to a logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/blockchain/auction/time/{chain}/{date}
Request samples
Response samples
application/json
15795762