Crypto APIs 2.0 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 bl

1.2.0 2021-07-30 09:23 UTC

This package is auto-updated.

Last update: 2021-08-30 09:28:09 UTC


README

Crypto APIs 2.0 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 blockchain applications. Crypto APIs 2.0 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.2 and later.

Composer

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

{
  "require": {
    "cryptoapis/sdk": "^1.1.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
);
$context = 'context_example'; // 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.
$asset_type = crypto; // string | Defines the type of the supported asset. This could be either \"crypto\" or \"fiat\".
$crypto_type = coin; // string | Subtype of the crypto assets. Could be COIN or TOKEN
$limit = 50; // int | Defines how many items should be returned in the response per page basis.
$offset = 10; // int | The starting index of the response items, i.e. where the response should start listing the returned items.
$waas_enabled = true; // bool | Show only if WaaS is/not enabled

try {
    $result = $apiInstance->listAssetsDetails($context, $asset_type, $crypto_type, $limit, $offset, $waas_enabled);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AssetsApi->listAssetsDetails: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

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

Class Method HTTP request Description
AssetsApi listAssetsDetails GET /market-data/assets/details List Assets Details
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
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 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 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 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
InformativeApi getWalletAssetDetails GET /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network} Get Wallet Asset Details
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
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
ManageSubscriptionsApi deleteBlockchainEventSubscription DELETE /blockchain-events/{blockchain}/{network}/subscriptions/{referenceId} Delete Blockchain Event Subscription
ManageSubscriptionsApi listBlockchainEventsSubscriptions GET /blockchain-events/{blockchain}/{network}/subscriptions List Blockchain Events Subscriptions
MetadataApi listSupportedAssets GET /market-data/assets/supported List Supported Assets
OmniLayerApi getOmniTransactionDetailsByTransactionIDTxid GET /blockchain-data/{blockchain}/{network}/omni/transactions/{transactionId} Get Omni Transaction Details By Transaction ID (Txid)
OmniLayerApi getUnconfirmedOmniTransactionByTransactionIDTxid GET /blockchain-data/{blockchain}/{network}/omni/transactions-unconfirmed/{transactionId} Get Unconfirmed Omni Transaction By Transaction ID (Txid)
OmniLayerApi listOmniTokensByAddress GET /blockchain-data/{blockchain}/{network}/omni/addresses/{address} List Omni Tokens By Address
OmniLayerApi listOmniTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/omni/addresses/{address}/transactions List Omni Transactions By Address
OmniLayerApi listOmniTransactionsByBlockHash GET /blockchain-data/{blockchain}/{network}/omni/blocks/hash/{blockHash}/transactions List Omni Transactions By Block Hash
OmniLayerApi listOmniTransactionsByBlockHeight GET /blockchain-data/{blockchain}/{network}/omni/blocks/height/{blockHeight}/transactions List Omni Transactions By Block Height
OmniLayerApi listUnconfirmedOmniTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/omni/address-transactions-unconfirmed/{address} List Unconfirmed Omni Transactions By Address
OmniLayerApi listUnconfirmedOmniTransactionsByPropertyID GET /blockchain-data/{blockchain}/{network}/omni/properties/{propertyId}/transactions List Unconfirmed Omni Transactions By Property ID
TokensApi getContractDetailsByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{contractAddress}/contract Get Contract Details by Address
TokensApi listTokensByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens List Tokens By Address
TokensApi listTokensTransfersByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/tokens-transfers List Tokens Transfers By Address
TokensApi listTokensTransfersByTransactionHash GET /blockchain-data/{blockchain}/{network}/transactions/{transactionHash}/tokens-transfers List Tokens Transfers By Transaction Hash
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 createTokensTransactionRequestFromAddress POST /wallet-as-a-service/wallets/{walletId}/{blockchain}/{network}/addresses/{senderAddress}/token-transaction-requests Create Tokens Transaction Request from Address
UTXOBasedApi getHDWalletXPubYPubZPubDetails GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/details Get HD Wallet (xPub, yPub, zPub) Details
UTXOBasedApi listHDWalletXPubYPubZPubTransactions GET /blockchain-data/{blockchain}/{network}/hd/{extendedPublicKey}/transactions List HD Wallet (xPub, yPub, zPub) Transactions
UTXOBasedApi syncHDWalletXPubYPubZPub POST /blockchain-data/{blockchain}/{network}/hd/sync Sync HD Wallet (xPub, yPub, zPub)
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 getLatestMinedBlock GET /blockchain-data/{blockchain}/{network}/blocks/last Get Latest Mined Block
UnifiedEndpointsApi getTransactionDetailsByTransactionID GET /blockchain-data/{blockchain}/{network}/transactions/{transactionId} Get Transaction Details By Transaction ID
UnifiedEndpointsApi listTransactionsByAddress GET /blockchain-data/{blockchain}/{network}/addresses/{address}/transactions List Transactions By Address
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
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 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: 2.0.0
    • Package version: 1.2.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen