Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 3.54 KB

TransactionApi.md

File metadata and controls

68 lines (46 loc) · 3.54 KB

theblockchainapi.TransactionApi

All URIs are relative to https://api.blockchainapi.com/v1

Method HTTP request Description
getTransaction GET /{blockchain}/transaction/{network}/{transaction_blockchain_identifier} Get the details of a transaction made on a blockchain

getTransaction

GeneralTransaction getTransaction(blockchain, network, transactionBlockchainIdentifier)

Get the details of a transaction made on a blockchain

<a href=&quot;https://github.com/BL0CK-X/blockchain-api/tree/main/examples/transaction/get-transaction\" target=&quot;_blank&quot;>See examples (Python, JavaScript)</a>. Get the details of a transaction made on the specified blockchain. `Cost: 0.25 Credit` (<a href=&quot;#section/Pricing&quot;>See Pricing</a>)

Example

import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';

let apiInstance = new theblockchainapi.TransactionApi();
let blockchain = "blockchain_example"; // String | The blockchain you want to use 
let network = ropsten; // String | The network of the blockchain you selected  - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet`  Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
let transactionBlockchainIdentifier = 0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4; // String | The transaction signature of the transaction.  Examples: - Solana: `5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W` - Ethereum: `0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4`
apiInstance.getTransaction(blockchain, network, transactionBlockchainIdentifier).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
blockchain String The blockchain you want to use
network String The network of the blockchain you selected - Solana: `devnet`, `mainnet-beta` - Ethereum: `ropsten`, `mainnet` Defaults when not provided (not applicable to path parameters): - Solana: `devnet` - Ethereum: `ropsten`
transactionBlockchainIdentifier String The transaction signature of the transaction. Examples: - Solana: `5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W` - Ethereum: `0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4`

Return type

GeneralTransaction

Authorization

APIKeyID, APISecretKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json