Skip to content

Latest commit

 

History

History
100 lines (74 loc) · 3.93 KB

SolanaTransactionApi.md

File metadata and controls

100 lines (74 loc) · 3.93 KB

Org.OpenAPITools.Api.SolanaTransactionApi

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

Method HTTP request Description
SolanaGetTransaction GET /solana/transaction/{network}/{tx_signature} Get the details of a transaction made on Solana

SolanaGetTransaction

Transaction SolanaGetTransaction (string network, string txSignature)

Get the details of a transaction made on Solana

<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-transaction/get-transaction\" target="_blank">See examples (Python, JavaScript). Get the details of a transaction made on Solana. 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 SolanaGetTransactionExample
    {
        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 SolanaTransactionApi(Configuration.Default);
            var network = mainnet-beta;  // string | The network ID (devnet, mainnet-beta)
            var txSignature = 5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W;  // string | The transaction signature of the transaction

            try
            {
                // Get the details of a transaction made on Solana
                Transaction result = apiInstance.SolanaGetTransaction(network, txSignature);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling SolanaTransactionApi.SolanaGetTransaction: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
network string The network ID (devnet, mainnet-beta)
txSignature string The transaction signature of the transaction

Return type

Transaction

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]