Skip to content

Latest commit

 

History

History
216 lines (153 loc) · 13.2 KB

AutomaticCoinsForwardingApi.md

File metadata and controls

216 lines (153 loc) · 13.2 KB

CryptoAPIs\AutomaticCoinsForwardingApi

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

Method HTTP request Description
createAutomaticCoinsForwarding() POST /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations Create Automatic Coins Forwarding
deleteAutomaticCoinsForwarding() DELETE /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations/{referenceId} Delete Automatic Coins Forwarding
listCoinsForwardingAutomations() GET /blockchain-automations/{blockchain}/{network}/coins-forwarding/automations List Coins Forwarding Automations

createAutomaticCoinsForwarding()

createAutomaticCoinsForwarding($blockchain, $network, $context, $create_automatic_coins_forwarding_rb): \CryptoAPIs\Model\CreateAutomaticCoinsForwardingR

Create Automatic Coins Forwarding

Through this endpoint customers can set up an automatic forwarding function specifically for coins (not tokens). They can have a toAddress which is essentially the main address and the destination for the automatic coins forwarding. There is also a minimumTransferAmount which only when reached will then trigger the forwarding. Through this the customer can save from fees. Moreover, feePriority can be also set, which defines how quickly to move the coins once they are received. The higher priority, the larger the fee will be. It can be "SLOW", "STANDARD" or "FAST". The response of this endpoint contains an attribute fromAddress which can be used as a deposit address. Any funds received by this address will be automatically forwarded to toAddress based on what the customer has set for the automation. For this automatic forwarding the customer can set a callback subscription. {warning}The subscription will work for all incoming transactions until it is deleted. There is no need to do that for every transaction.{/warning} {note}This endpoint generates a new fromAddress each time.{/note}

Example

<?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\AutomaticCoinsForwardingApi(
    // 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 = bitcoin; // string | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
$network = testnet; // string | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
$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.
$create_automatic_coins_forwarding_rb = new \CryptoAPIs\Model\CreateAutomaticCoinsForwardingRB(); // \CryptoAPIs\Model\CreateAutomaticCoinsForwardingRB

try {
    $result = $apiInstance->createAutomaticCoinsForwarding($blockchain, $network, $context, $create_automatic_coins_forwarding_rb);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AutomaticCoinsForwardingApi->createAutomaticCoinsForwarding: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
blockchain string Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network string Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.
context 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. [optional]
create_automatic_coins_forwarding_rb \CryptoAPIs\Model\CreateAutomaticCoinsForwardingRB [optional]

Return type

\CryptoAPIs\Model\CreateAutomaticCoinsForwardingR

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

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

deleteAutomaticCoinsForwarding()

deleteAutomaticCoinsForwarding($blockchain, $network, $reference_id, $context): \CryptoAPIs\Model\DeleteAutomaticCoinsForwardingR

Delete Automatic Coins Forwarding

Through this endpoint customers can delete a forwarding function they have set for coins (not tokens). By setting a fromAddress and a toAddress, and specifying the amount, coins can be transferred between addresses. A feePriority will be returned which represents the fee priority of the automation whether it is "SLOW", "STANDARD" OR "FAST". {warning}The subscription will work for all incoming transactions until it is deleted. There is no need to do that for every transaction.{/warning}

Example

<?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\AutomaticCoinsForwardingApi(
    // 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 = bitcoin; // string | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
$network = testnet; // string | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
$reference_id = 600955ea5e75d660e71d3c7d; // string | Represents a unique ID used to reference the specific callback subscription.
$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->deleteAutomaticCoinsForwarding($blockchain, $network, $reference_id, $context);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AutomaticCoinsForwardingApi->deleteAutomaticCoinsForwarding: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
blockchain string Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network string Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.
reference_id string Represents a unique ID used to reference the specific callback subscription.
context 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. [optional]

Return type

\CryptoAPIs\Model\DeleteAutomaticCoinsForwardingR

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

listCoinsForwardingAutomations()

listCoinsForwardingAutomations($blockchain, $network, $context, $limit, $offset): \CryptoAPIs\Model\ListCoinsForwardingAutomationsR

List Coins Forwarding Automations

Through this endpoint customers can list all of their coins forwarding automations (not tokens). Customers can set up automatic forwarding functions for coins by setting a fromAddress and a toAddress, and specifying the amount that can be transferred between addresses. A feePriority will be returned which represents the fee priority of the automation whether it is "SLOW", "STANDARD" OR "FAST". {warning}The subscription will work for all transactions until it is deleted. There is no need to do that for every transaction.{/warning}

Example

<?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\AutomaticCoinsForwardingApi(
    // 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 = bitcoin; // string | Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
$network = testnet; // string | Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\" are test networks.
$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.
$limit = 50; // int | Defines how many items should be returned in the response per page basis.
$offset = 0; // int | The starting index of the response items, i.e. where the response should start listing the returned items.

try {
    $result = $apiInstance->listCoinsForwardingAutomations($blockchain, $network, $context, $limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AutomaticCoinsForwardingApi->listCoinsForwardingAutomations: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
blockchain string Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
network string Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - &quot;mainnet&quot; is the live network with actual data while networks like &quot;testnet&quot;, &quot;ropsten&quot; are test networks.
context 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. [optional]
limit int Defines how many items should be returned in the response per page basis. [optional] [default to 50]
offset int The starting index of the response items, i.e. where the response should start listing the returned items. [optional] [default to 0]

Return type

\CryptoAPIs\Model\ListCoinsForwardingAutomationsR

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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