Skip to content

Latest commit

 

History

History
102 lines (76 loc) · 4.98 KB

TransactionApi.md

File metadata and controls

102 lines (76 loc) · 4.98 KB

Org.OpenAPITools.Api.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 (string blockchain, string network, string transactionBlockchainIdentifier)

Get the details of a transaction made on a blockchain

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

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class GetTransactionExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "https://api.blockchainapi.com/v1";
            // Configure API key authorization: APIKeyID
            Configuration.Default.AddApiKey("APIKeyID", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APIKeyID", "Bearer");
            // Configure API key authorization: APISecretKey
            Configuration.Default.AddApiKey("APISecretKey", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("APISecretKey", "Bearer");

            var apiInstance = new TransactionApi(Configuration.Default);
            var blockchain = "ethereum";  // string | The blockchain you want to use 
            var 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`
            var transactionBlockchainIdentifier = 0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4;  // string | The transaction signature of the transaction.  Examples: - Solana: `5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W` - Ethereum: `0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4`

            try
            {
                // Get the details of a transaction made on a blockchain
                GeneralTransaction result = apiInstance.GetTransaction(blockchain, network, transactionBlockchainIdentifier);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling TransactionApi.GetTransaction: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

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

HTTP response details

Status code Description Response headers
200 Transaction found. Details in response. Click &quot;Expand All&quot; in the documentation sidebar to the right to view an example. -
400 Invalid input or issue retrieving transaction. See response for details -
401 Invalid API key pair in headers -
402 Payment required. Occurs when you run out of API requests. Upgrade <a href=&quot;https://dashboard.theblockchainapi.com/billing\" target=&quot;_blank&quot;>here</a>. -
404 Task not found. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]