Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockc

1.7.0 2022-09-12 15:52 UTC

This package is auto-updated.

Last update: 2022-11-12 16:08:36 UTC


README

Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.

For more information, please visit https://cryptoapis.io.

Installation & Usage

Requirements

PHP 7.3 and later.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "require": {
    "cryptoapis/sdk": "^1.7.0"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/cryptoapis/sdk/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: ApiKey
$config = CryptoAPIs\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = CryptoAPIs\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new CryptoAPIs\Api\AssetsApi(
    // 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
);
$asset_id = 5b1ea92e584bf50020130612; // string | Defines the unique ID of the specific asset.
$context = yourExampleString; // string | In batch situations the user can use the context to correlate responses with requests. This property is present regardless of whether the response was successful or returned as an error. `context` is specified by the user.

try {
    $result = $apiInstance->getAssetDetailsByAssetID($asset_id, $context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetsApi->getAssetDetailsByAssetID: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

All URIs are relative to https://rest.cryptoapis.io

Class Method HTTP request Description
AssetsApi getAssetDetailsByAssetID GET /market-data/assets/assetId/{assetId} Get Asset Details By Asset ID
AssetsApi getAssetDetailsByAssetSymbol GET /market-data/assets/{assetSymbol} Get Asset Details By Asset Symbol
AutomaticCoinsForwardingApi createAutomaticCoinsForwarding POST /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations Create Automatic Coins Forwarding
AutomaticCoinsForwardingApi deleteAutomaticCoinsForwarding DELETE /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations/{referenceId} Delete Automatic Coins Forwarding
AutomaticCoinsForwardingApi listCoinsForwardingAutomations GET /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations List Coins Forwarding Automations
AutomaticTokensForwardingApi addTokensToExistingFromAddress POST /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations/add-token Add Tokens To Existing fromAddress
AutomaticTokensForwardingApi createAutomaticTokensForwarding POST /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations Create Automatic Tokens Forwarding
AutomaticTokensForwardingApi deleteAutomaticTokensForwarding DELETE /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations/{referenceId} Delete Automatic Tokens Forwarding
AutomaticTokensForwardingApi getFeeAddressDetails GET /blockchain-automations/{blockchain}/{network}/tokens-forwarding/fee-addresses Get Fee Address Details
AutomaticTokensForwardingApi listTokensForwardingAutomations GET /blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations List Tokens Forwarding Automations
CallbackDataApi getAddressDetailsFromCallback GET /blockchain-events/{blockchain}/{network}/addresses/{address} Get Address Details From Callback
CallbackDataApi getBlockDetailsByBlockHashFromCallback GET /blockchain-events/{blockchain}/{network}/blocks/hash/{blockHash} Get Block Details By Block Hash From Callback
CallbackDataApi getBlockDetailsByBlockHeightFromCallback GET /blockchain-events/{blockchain}/{network}/blocks/height/{blockHeight} Get Block Details By Block Height From Callback
CallbackDataApi getTransactionDetailsByTransactionIDFromCallback GET /blockchain-events/{blockchain}/{network}/transactions/{transactionId} Get Transaction Details By Transaction ID From Callback
CreateSubscriptionsForApi blockHeightReached POST /blockchain-events/{blockchain}/{network}/subscriptions/block-height-reached Block Height Reached
CreateSubscriptionsForApi minedTransaction POST /blockchain-events/{blockchain}/{network}/subscriptions/transaction-mined Mined transaction
CreateSubscriptionsForApi newBlock POST /blockchain-events/{blockchain}/{network}/subscriptions/block-mined New Block
CreateSubscriptionsForApi newConfirmedCoinsTransactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed New confirmed coins transactions
CreateSubscriptionsForApi newConfirmedCoinsTransactionsAndEachConfirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-confirmed-each-confirmation New confirmed coins transactions and each confirmation
CreateSubscriptionsForApi newConfirmedCoinsTransactionsForSpecificAmount POST /blockchain-events/{blockchain}/{network}/subscriptions/coins-transactions-for-specific-amount New Confirmed Coins Transactions For Specific Amount
CreateSubscriptionsForApi newConfirmedInternalTransactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed New confirmed internal transactions
CreateSubscriptionsForApi newConfirmedInternalTransactionsAndEachConfirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-internal-transactions-confirmed-each-confirmation New confirmed internal transactions and each confirmation
CreateSubscriptionsForApi newConfirmedInternalTransactionsForSpecificAmount POST /blockchain-events/{blockchain}/{network}/subscriptions/internal-transactions-for-specific-amount New Confirmed Internal Transactions For Specific Amount
CreateSubscriptionsForApi newConfirmedTokenTransactionsForSpecificAmount POST /blockchain-events/{blockchain}/{network}/subscriptions/tokens-transfers-for-specific-amount New Confirmed Token Transactions For Specific Amount
CreateSubscriptionsForApi newConfirmedTokensTransactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed New confirmed tokens transactions
CreateSubscriptionsForApi newConfirmedTokensTransactionsAndEachConfirmation POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-confirmed-each-confirmation New confirmed tokens transactions and each confirmation
CreateSubscriptionsForApi newUnconfirmedCoinsTransactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-coins-transactions-unconfirmed New unconfirmed coins transactions
CreateSubscriptionsForApi newUnconfirmedTokensTransactions POST /blockchain-events/{blockchain}/{network}/subscriptions/address-tokens-transactions-unconfirmed New unconfirmed tokens transactions
ExchangeRatesApi getExchangeRateByAssetSymbols GET /market-data/exchange-rates/by-symbols/{fromAssetSymbol}/{toAssetSymbol} Get Exchange Rate By Asset Symbols
ExchangeRatesApi getExchangeRateByAssetsIDs GET /market-data/exchange-rates/by-asset-ids/{fromAssetId}/{toAssetId} Get Exchange Rate By Assets IDs
FeaturesApi broadcastLocallySignedTransaction POST /blockchain-tools/{blockchain}/{network}/transactions/broadcast Broadcast Locally Signed Transaction
FeaturesApi convertBitcoinCashAddress POST /blockchain-tools/{blockchain}/{network}/address/convert Convert Bitcoin Cash Address
FeaturesApi decodeRawTransactionHex POST /blockchain-tools/{blockchain}/{network}/decode-raw-transaction Decode Raw Transaction Hex
FeaturesApi decodeXAddress GET /blockchain-tools/{blockchain}/{network}/decode-x-address/{xAddress} Decode X-Address
FeaturesApi deriveHDWalletXPubYPubZPubChangeOrReceivingAddresses GET /blockchain-tools/{blockchain}/{network}/hd/{extendedPublicKey}/addresses/derive-address Derive HD Wallet (xPub, yPub, zPub) Change Or Receiving Addresses
FeaturesApi encodeXAddress GET /blockchain-tools/{blockchain}/{network}/encode-x-address/{classicAddress}/{addressTag} Encode X-Address
FeaturesApi estimateGasLimit POST /blockchain-tools/{blockchain}/{network}/gas-limit Estimate Gas Limit
FeaturesApi estimateTokenGasLimit POST /blockchain-tools/{blockchain}/{network}/gas-limit/contract Estimate Token Gas Limit
FeaturesApi getEIP1559FeeRecommendations GET /blockchain-tools/{blockchain}/{network}/fees/eip1559 Get EIP 1559 Fee Recommendations
FeaturesApi validateAddress POST /blockchain-tools/{blockchain}/{network}/addresses/validate Validate Address
GeneratingApi generateDepositAddress POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses Generate Deposit Address
HDWalletsApi deriveAndSyncNewChangeAddresses POST /blockchain-data/{blockchain}/{network}/hd/derive-sync-change Derive And Sync New Change Addresses
HDWalletsApi deriveAndSyncNewReceivingAddresses POST /blockchain-data/{blockchain}/{network}/hd/derive-and-sync Derive And Sync New Receiving Addresses
HDWalletsApi getHDWalletXPubYPubZPubAssets GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/assets Get HD Wallet (xPub, yPub, zPub) Assets
HDWalletsApi getHDWalletXPubYPubZPubDetails GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/details Get HD Wallet (xPub, yPub, zPub) Details
HDWalletsApi listHDWalletXPubYPubZPubTransactions GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/transactions List HD Wallet (xPub, yPub, zPub) Transactions
HDWalletsApi listHDWalletXPubYPubZPubUTXOs GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/utxos List HD Wallet (xPub, yPub, zPub) UTXOs
HDWalletsApi listSyncedAddresses GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/synced-addresses List Synced Addresses
HDWalletsApi prepareAUTXOBasedTransactionFromHDWalletXPubYPubZPub POST /blockchain-data/{blockchain}/{network}/transactions/prepare-utxo-transaction Prepare A UTXO-Based Transaction From HD Wallet (xPub, yPub, zPub)
HDWalletsApi prepareAnAccountBasedTransactionFromHDWalletXPubYPubZPub POST /blockchain-data/{blockchain}/{network}/transactions/prepare-account-based-transaction Prepare An Account-Based Transaction From HD Wallet (xPub, yPub, zPub)
HDWalletsApi syncHDWalletXPubYPubZPub POST /blockchain-data/{blockchain}/{network}/hd/sync Sync HD Wallet (xPub, yPub, zPub)
HDWalletsApi syncNewHDWalletXPubYPubZPub POST /blockchain-data/{blockchain}/{network}/hd/sync-new Sync New HD Wallet (xPub, yPub, zPub)
InformativeApi getTransactionRequestDetails GET /wallet-as-a-service/transactionRequests/{transactionRequestId} Get Transaction Request Details
InformativeApi getWalletAssetDetails GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network} Get Wallet Asset Details
InformativeApi getWalletTransactionDetailsByTransactionID GET /wallet-as-a-service/wallets/{blockchain}/{network}/transactions/{transactionId} Get Wallet Transaction Details By Transaction ID
InformativeApi listAllAssetsByWalletID GET /wallet-as-a-service/wallets/{walletId}/assets List All Assets By Wallet ID
InformativeApi listAllAssetsFromAllWallets GET /wallet-as-a-service/wallets/all-assets List All Assets From All Wallets
InformativeApi listDepositAddresses GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses List Deposit Addresses
InformativeApi listSupportedTokens GET /wallet-as-a-service/info/{blockchain}/{network}/supported-tokens List Supported Tokens
InformativeApi listWalletTransactions GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transactions List Wallet Transactions
InternalApi getInternalTransactionByTransactionHashAndOperationId GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/internal/{operationId} Get Internal Transaction by Transaction Hash and Operation Id
InternalApi listInternalTransactionDetailsByTransactionHash GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/internal List Internal Transaction Details by Transaction Hash
InternalApi listInternalTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/internal List Internal Transactions By Address
ManageSubscriptionsApi activateBlockchainEventSubscription POST /blockchain-events/subscriptions/{referenceId}/activate Activate Blockchain Event Subscription
ManageSubscriptionsApi deleteBlockchainEventSubscription DELETE /blockchain-events/{blockchain}/{network}/subscriptions/{referenceId} Delete Blockchain Event Subscription
ManageSubscriptionsApi getBlockchainEventSubscriptionDetailsByReferenceID GET /blockchain-events/subscriptions/{referenceId} Get Blockchain Event Subscription Details By Reference ID
ManageSubscriptionsApi listBlockchainEventsSubscriptions GET /blockchain-events/{blockchain}/{network}/subscriptions List Blockchain Events Subscriptions
MetadataApi listSupportedAssets GET /market-data/assets/supported List Supported Assets
TokensApi getTokenDetailsByContractAddress GET /blockchain-data/{blockchain}/{network}/addresses/{contractAddress}/contract Get Token Details by Contract Address
TokensApi listConfirmedTokensTransfersByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers List Confirmed Tokens Transfers By Address
TokensApi listTokensByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens List Tokens By Address
TokensApi listTokensTransfersByTransactionHash GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/tokens-transfers List Tokens Transfers By Transaction Hash
TokensApi listUnconfirmedTokensTransfersByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers-unconfirmed List Unconfirmed Tokens Transfers By Address
TransactionsApi createCoinsTransactionFromAddressForWholeAmount POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/all-transaction-requests Create Coins Transaction From Address For Whole Amount
TransactionsApi createCoinsTransactionRequestFromAddress POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/transaction-requests Create Coins Transaction Request from Address
TransactionsApi createCoinsTransactionRequestFromWallet POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/transaction-requests Create Coins Transaction Request from Wallet
TransactionsApi createFungibleTokenTransactionRequestFromAddressWithoutFeePriority POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/feeless-token-transaction-requests Create Fungible Token Transaction Request From Address Without Fee Priority
TransactionsApi createFungibleTokensTransactionRequestFromAddress POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/token-transaction-requests Create Fungible Tokens Transaction Request from Address
TransactionsApi createSingleTransactionRequestFromAddressWithoutFeePriority POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{address}/feeless-transaction-requests Create Single Transaction Request From Address Without Fee Priority
UnifiedEndpointsApi estimateTransactionSmartFee GET /blockchain-data/{blockchain}/{network}/estimate-transaction-smart-fee Estimate Transaction Smart Fee
UnifiedEndpointsApi getAddressBalance GET /blockchain-data/{blockchain}/{network}/addresses/{address}/balance Get Address Balance
UnifiedEndpointsApi getAddressDetails GET /blockchain-data/{blockchain}/{network}/addresses/{address} Get Address Details
UnifiedEndpointsApi getBlockDetailsByBlockHash GET /blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash} Get Block Details By Block Hash
UnifiedEndpointsApi getBlockDetailsByBlockHeight GET /blockchain-data/{blockchain}/{network}/blocks/height/{height} Get Block Details By Block Height
UnifiedEndpointsApi getFeeRecommendations GET /blockchain-data/{blockchain}/{network}/mempool/fees Get Fee Recommendations
UnifiedEndpointsApi getLastMinedBlock GET /blockchain-data/{blockchain}/{network}/blocks/last Get Last Mined Block
UnifiedEndpointsApi getNextAvailableNonce GET /blockchain-data/{blockchain}/{network}/addresses/{address}/next-available-nonce Get Next Available Nonce
UnifiedEndpointsApi getRawTransactionData GET /blockchain-data/{blockchain}/{network}/transactions/{transactionId}/raw-data Get Raw Transaction Data
UnifiedEndpointsApi getTransactionDetailsByTransactionID GET /blockchain-data/{blockchain}/{network}/transactions/{transactionId} Get Transaction Details By Transaction ID
UnifiedEndpointsApi listConfirmedTokensTransfersByAddressAndTimeRange GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers-by-time-range List Confirmed Tokens Transfers By Address And Time Range
UnifiedEndpointsApi listConfirmedTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/transactions List Confirmed Transactions By Address
UnifiedEndpointsApi listConfirmedTransactionsByAddressAndTimeRange GET /blockchain-data/{blockchain}/{network}/addresses/{address}/transactions-by-time-range List Confirmed Transactions By Address And Time Range
UnifiedEndpointsApi listInternalTransactionsByAddressAndTimeRange GET /blockchain-data/{blockchain}/{network}/addresses/{address}/internal-by-time-range List Internal Transactions By Address And Time Range
UnifiedEndpointsApi listLatestMinedBlocks GET /blockchain-data/{blockchain}/{network}/blocks/last/{count} List Latest Mined Blocks
UnifiedEndpointsApi listTransactionsByBlockHash GET /blockchain-data/{blockchain}/{network}/blocks/hash/{blockHash}/transactions List Transactions by Block Hash
UnifiedEndpointsApi listTransactionsByBlockHeight GET /blockchain-data/{blockchain}/{network}/blocks/height/{height}/transactions List Transactions by Block Height
UnifiedEndpointsApi listUnconfirmedTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/address-transactions-unconfirmed/{address} List Unconfirmed Transactions by Address
UnifiedEndpointsApi listUnspentTransactionOutputsByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/unspent-outputs List Unspent Transaction Outputs By Address
XRPRippleApi getLatestMinedXRPRippleBlock GET /blockchain-data/xrp-specific/{network}/blocks/last Get Latest Mined XRP (Ripple) Block
XRPRippleApi getXRPRippleAddressDetails GET /blockchain-data/xrp-specific/{network}/addresses/{address} Get XRP (Ripple) Address Details
XRPRippleApi getXRPRippleBlockDetailsByBlockHash GET /blockchain-data/xrp-specific/{network}/blocks/hash/{blockHash} Get XRP (Ripple) Block Details By Block Hash
XRPRippleApi getXRPRippleBlockDetailsByBlockHeight GET /blockchain-data/xrp-specific/{network}/blocks/height/{blockHeight} Get XRP (Ripple) Block Details By Block Height
XRPRippleApi getXRPRippleTransactionDetailsByTransactionID GET /blockchain-data/xrp-specific/{network}/transactions/{transactionHash} Get XRP (Ripple) Transaction Details By Transaction ID
XRPRippleApi listXRPRippleTransactionsByAddress GET /blockchain-data/xrp-specific/{network}/addresses/{address}/transactions List XRP (Ripple) Transactions by Address
XRPRippleApi listXRPRippleTransactionsByAddressAndTimeRange GET /blockchain-data/xrp-specific/{network}/addresses/{address}/transactions-by-time-range List XRP (Ripple) Transactions By Address And Time Range
XRPRippleApi listXRPRippleTransactionsByBlockHash GET /blockchain-data/xrp-specific/{network}/blocks/hash/{blockHash}/transactions List XRP (Ripple) Transactions By Block Hash
XRPRippleApi listXRPRippleTransactionsByBlockHeight GET /blockchain-data/xrp-specific/{network}/blocks/height/{blockHeight}/transactions List XRP (Ripple) Transactions By Block Height
ZilliqaApi getLatestMinedZilliqaBlock GET /blockchain-data/zilliqa-specific/{network}/blocks/last Get Latest Mined Zilliqa Block
ZilliqaApi getZilliqaAddressDetails GET /blockchain-data/zilliqa-specific/{network}/addresses/{address} Get Zilliqa Address Details
ZilliqaApi getZilliqaBlockDetailsByBlockHash GET /blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash} Get Zilliqa Block Details By Block Hash
ZilliqaApi getZilliqaBlockDetailsByBlockHeight GET /blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight} Get Zilliqa Block Details By Block Height
ZilliqaApi getZilliqaTransactionDetailsByTransactionID GET /blockchain-data/zilliqa-specific/{network}/transactions/{transactionHash} Get Zilliqa Transaction Details by Transaction ID
ZilliqaApi listZilliqaTransactionsByAddress GET /blockchain-data/zilliqa-specific/{network}/addresses/{address}/transactions List Zilliqa Transactions by Address
ZilliqaApi listZilliqaTransactionsByBlockHash GET /blockchain-data/zilliqa-specific/{network}/blocks/hash/{blockHash}/transactions List Zilliqa Transactions By Block Hash
ZilliqaApi listZilliqaTransactionsByBlockHeight GET /blockchain-data/zilliqa-specific/{network}/blocks/height/{blockHeight}/transactions List Zilliqa Transactions By Block Height

Models

Authorization

ApiKey

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

developers@cryptoapis.io

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 2021-03-20
    • Package version: 1.7.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen