Jump to
Ctrl
+
/

Add Tokens To Existing fromAddress

POST
/blockchain-automations/{blockchain}/{network}/tokens-forwarding/automations/add-token

Through this endpoint customers can add Automatic Tokens forwardings to an already existing fromAddress. Unlike the "Create Automatic Tokens Forwarding" endpoint, where the fromAddress is generated each time, with this endpoint customers can add an automation from another token to one and the same fromAddress.

The fromAddress 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. The toAddress is essentially the main address and destination for the automatic tokens 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 tokens once they are received. The higher priority, the larger the fee will be. It can be "SLOW", "STANDARD" or "FAST".

For this automatic forwarding the customer can set a callback subscription.


Currently we support fungible tokens (ERC-20) only, NFTs (ERC-721) are not supported.

The subscription will work for all incoming transactions until it is deleted. There is no need to do that for every transaction.

Path Parameters

blockchain string Required

Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

network string Required

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 network like "testnet" is the test network.

Query Parameters

context string Optional

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.

Request Body Schema application/json

context string Optional

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.

data object Required
item object Required
callbackSecretKey string Optional

Represents the Secret Key value provided by the customer. This field is used for security purposes during the callback notification, in order to prove the sender of the callback as Crypto APIs. For more information please see our Documentation.

callbackUrl string Required

Represents the URL that is set by the customer where the callback will be received at. The callback notification will be received only if and when the event occurs. We support ONLY httpS type of protocol.

confirmationsCount integer Required

Represents the number of confirmations, i.e. the amount of blocks that have been built on top of this block.

feePriority string Required

Represents the fee priority of the automation, whether it is "SLOW", "STANDARD" or "FAST".

fromAddress string Required

Represents the hash of the address that forwards the tokens.

minimumTransferAmount string Required

Represents the minimum transfer amount of the currency in the fromAddress that can be allowed for an automatic forwarding.

toAddress string Required

Represents the hash of the address the currency is forwarded to.

tokenData object Required
propertyId integer Required

Represents the specific propertyId of the token data that will be forwarded.

Response Schema

apiVersion string Required

Specifies the version of the API that incorporates this endpoint.

2023-04-25
requestId string Required

Defines the ID of the request. The requestId is generated by Crypto APIs and it's unique for every request.

601c1710034ed6d407996b30
context string Optional

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.

yourExampleString
data object Required
item object Required
callbackUrl string Required

Represents the URL that is set by the customer where the callback will be received at. The callback notification will be received only if and when the event occurs. We support ONLY httpS type of protocol.

https://example.com
confirmationsCount integer Required

Represents the number of confirmations, i.e. the amount of blocks that have been built on top of this block.

3
createdTimestamp integer Required

Defines the specific time/date when the automatic forwarding was created in Unix Timestamp.

1611238648
feeAddress string Required

Represents the specific fee address, which is always automatically generated. Users must fund it.

mojjR51gMXLJ4B3SBPhEXXRFDX7U5UWXNQ
feePriority string Required

Represents the fee priority of the automation, whether it is "SLOW", "STANDARD" or "FAST".

standard
fromAddress string Required

Represents the hash of the address that forwards the tokens.

mizRduUBKEbJ6uzYJUegPh78gEGgM3WjAr
minimumTransferAmount string Required

Represents the minimum transfer amount of the tokens in the fromAddress that can be allowed for an automatic forwarding.

0.0001
referenceId string Required

Represents a unique ID used to reference the specific callback subscription.

6017dd02a309213863be9e55
toAddress string Required

Represents the hash of the address the tokens are forwarded to.

mnumE76iEKN47bUsdni85oped5D1fRwKWi
tokenData object Required
propertyId integer Required

Defines the propertyId of the Omni Layer token.

2

Callback parameters

apiVersion string Required

Specifies the version of the API that incorporates this endpoint.

2021-03-20
referenceId string Required

Represents a unique identifier that serves as reference to the specific request which prompts a callback, e.g. Blockchain Events Subscription, Blockchain Automation, etc.

6038d09050653d1f0e40584c
idempotencyKey string Required

Specifies a unique ID generated by the system and attached to each callback. It is used by the server to recognize consecutive requests with the same data with the purpose not to perform the same operation twice.

e55bf7a4a7188855f1c27541a6c387d04cc3b22ee34d1304b0e6ecad61c9906c
data object Required

Specifies all data, as attributes, included into the callback notification, which depends on the event.

product string Required

Represents the Crypto APIs 2.0 product which sends the callback.

BLOCKCHAIN_AUTOMATIONS
event string Required

Defines the specific event, for which a callback subscription is set.

TOKENS_FORWARDING_SUCCESS
item object Required

Defines an item as one result.

blockchain string Required

Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.

bitcoin
network string Required

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", "sepolia" are test networks.

testnet
fromAddress string Required

Represents the hash of the address that provides the tokens.

mySJoZ6wsjrKXZQRWpGoeBW5KkdKGL79Xz
toAddress string Required

Represents the hash of the address to forward the tokens to.

mmd963W1fECjLyaDCHcioSCZYHkRwjkGST
spentFeesAmount string Required

Represents the amount of the fee spent for the tokens to be forwarded.

0.00013601
spentFeesUnit string Required

Represents the unit of the fee spent for the tokens to be forwarded, e.g. BTC.

BTC
triggerTransactionId string Required

Defines the unique Transaction ID that triggered the token forwarding.

6ed1f1c8f2887a78ee8c45a975d928ca63eafc7b63def56324606ddd3cc9854f
forwardingTransactionId string Required

Defines the unique Transaction ID that forwarded the tokens.

b15ab5bbaf5107d551ae1b50181f4c55959205c4ff843e3c10d86d00e690fc72
tokenType string Required

Defines the type of token sent with the transaction, e.g. ERC 20.

OMNI
token object Required
name string Required

Specifies the name of the token.

Tether USD
symbol string Required

Specifies an identifier of the token, where up to five alphanumeric characters can be used for it.

USDT
decimals string Optional

Defines how many decimals can be used to break the token.

6
amount string Required

Defines the amount of tokens sent with the confirmed transaction.

0.00039
contractAddress string Required

Defines the address of the contract.

0xdac17f958d2ee523a2206206994597c13d831ec7

Credits Cost : 500 Credits for 1 Results

Was this page helpful?
Yes
No
Powered by
Language
URL

{
    "apiVersion": "2023-04-25",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "callbackUrl": "https://example.com",
            "confirmationsCount": 3,
            "createdTimestamp": 1611238648,
            "feeAddress": "mojjR51gMXLJ4B3SBPhEXXRFDX7U5UWXNQ",
            "feePriority": "standard",
            "fromAddress": "mizRduUBKEbJ6uzYJUegPh78gEGgM3WjAr",
            "minimumTransferAmount": "0.0001",
            "referenceId": "6017dd02a309213863be9e55",
            "toAddress": "mnumE76iEKN47bUsdni85oped5D1fRwKWi",
            "tokenData": {
                "propertyId": 2
            }
        }
    }
}
{
    "apiVersion": "2021-03-20",
    "referenceId": "6038d09050653d1f0e40584c",
    "idempotencyKey": "e55bf7a4a7188855f1c27541a6c387d04cc3b22ee34d1304b0e6ecad61c9906c",
    "data": {
        "product": "BLOCKCHAIN_AUTOMATIONS",
        "event": "TOKENS_FORWARDING_SUCCESS",
        "item": {
            "blockchain": "bitcoin",
            "network": "testnet",
            "fromAddress": "mySJoZ6wsjrKXZQRWpGoeBW5KkdKGL79Xz",
            "toAddress": "mmd963W1fECjLyaDCHcioSCZYHkRwjkGST",
            "spentFeesAmount": "0.00013601",
            "spentFeesUnit": "BTC",
            "triggerTransactionId": "6ed1f1c8f2887a78ee8c45a975d928ca63eafc7b63def56324606ddd3cc9854f",
            "forwardingTransactionId": "b15ab5bbaf5107d551ae1b50181f4c55959205c4ff843e3c10d86d00e690fc72",
            "tokenType": "OMNI",
            "token": {
                "name": "Tether USD",
                "symbol": "USDT",
                "decimals": "6",
                "amount": "0.00039",
                "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
            }
        }
    }
}