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($blockchain, $network, $transaction_blockchain_identifier): \OpenAPI\Client\Model\GeneralTransaction
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)
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: APIKeyID
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('APIKeyID', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APIKeyID', 'Bearer');
// Configure API key authorization: APISecretKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('APISecretKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APISecretKey', 'Bearer');
$apiInstance = new OpenAPI\Client\Api\TransactionApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$blockchain = 'blockchain_example'; // string | The blockchain you want to use
$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`
$transaction_blockchain_identifier = 0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4; // string | The transaction signature of the transaction. Examples: - Solana: `5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W` - Ethereum: `0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4`
try {
$result = $apiInstance->getTransaction($blockchain, $network, $transaction_blockchain_identifier);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TransactionApi->getTransaction: ', $e->getMessage(), PHP_EOL;
}
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` | |
transaction_blockchain_identifier | string | The transaction signature of the transaction. Examples: - Solana: `5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W` - Ethereum: `0x5f36b787daa57bfe8568d69e24eae54ccb00720c6edfc826bd4a7b19c525eef4` |
\OpenAPI\Client\Model\GeneralTransaction
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]