New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image

Last updated on January 1, 1970

1 min read

Method /api/v1/block/height/txhash/{hash} Ontology (ONT)
connect with REST protocol

/api/v1/block/height/txhash/{hash}

info-circle-fill

Method not allowed

info-circle-fill

Fetch block height using transaction hash

Parameters

hash - path

Tranaction hash

Request

curl --location --request GET 'https://ont.getblock.io/mainnet/rest/api/v1/block/height/txhash/db81c4e00f050c4f8e2f9c7e8201fddebd18458b3c48c73c18aa0532c7b5c43c' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 

Response

{
    "Action": "getblockheightbytxhash",
    "Desc": "SUCCESS",
    "Error": 0,
    "Result": 16224161,
    "Version": "1.0.0"
}
banner icon

Start Building with GetBlock RPCs for Free