Transaction info

Page about how to get transaction(s)

API documentation can be found for Bitcoin-like and Ethereum cryptocurrency on blockhairs website.

Bitcoin-like cryptocurrency

GetTransaction

GetTransaction fetches a Bitcoin-like transaction. The cryptocurrency supported, per 2021 September, are bitcoin, bitcoin-cash, litecoin, bitcoin-sv, dogecoin, dash, groestlcoin, zcash, ecash, bitcoin/testnet. Followed by the transaction hash (regex: /^[0-9a-f]{64}$/i), also known as txid.

Example usage of GetTransaction

package main

import (
	"fmt"
	"log"
	"os"

	"github.com/DiFronzo/blockchair"
)

var clientID string

func init() {
	clientID = os.Getenv("API_KEY")
}

func main() {
	c := blockchair.New()
	c.APIKey = clientID // If you don't have an API key remove the lines about "clientID".
	resp, err := c.GetTransaction("bitcoin", "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16")
	if err != nil {
		log.Fatalln(err)
	}
	
	fmt.Println(resp)

}

GetTransactionAdv

GetTransactionAdv fetches a Bitcoin-like transaction and allowing options. The cryptocurrency supported, per 2021 September, are bitcoin, bitcoin-cash, litecoin, bitcoin-sv, dogecoin, dash, groestlcoin, zcash, ecash, bitcoin/testnet. Followed by the transaction hash (regex: /^[0-9a-f]{64}$/i), also known as txid. Lastly the wanted options in a map (for valid options see API doc. linked on top of the page).

Example usage of GetTransactionAdv

GetTransactions

GetTransactions fetches mutliple Bitcoin-like transactions. The cryptocurrency supported, per 2021 September, are bitcoin, bitcoin-cash, litecoin, bitcoin-sv, dogecoin, dash, groestlcoin, zcash, ecash, bitcoin/testnet. Followed by the transaction hashes (regex: /^[0-9a-f]{64}$/i), also known as txid's.

GetTransactionsAdv

GetTransactionsAdv fetches mutliple Bitcoin-like transactions and allowing options. The cryptocurrency supported, per 2021 September, are bitcoin, bitcoin-cash, litecoin, bitcoin-sv, dogecoin, dash, groestlcoin, zcash, ecash, bitcoin/testnet. Followed by the transaction hashes (regex: /^[0-9a-f]{64}$/i), also known as txid's.

Ethereum cryptocurrency

GetTransactionEth

GetTransactionEth fetches an Ethereum transaction. The cryptocurrency supported, per 2021 September, are ethereum, ethereum/testnet. Followed by the transaction hash (regex: /^0x[0-9a-f]{64}$/i), also known as txid. Request cost is 1.

Example usage of GetTransactionEth

GetTransactionEthAdv

GetTransactionEthAdv fetches an Ethereum transaction and allowing options. The cryptocurrency supported, per 2021 September, are ethereum, ethereum/testnet. Followed by the transaction hash (regex: /^0x[0-9a-f]{64}$/i), also known as txid. Lastly the wanted options in a map (for valid options see API doc. linked on top of the page). Request cost is 1.

Last updated

Was this helpful?