New Confirmed Token Transactions For Specific Amount

Through this endpoint customers can create callback subscriptions for a specific event and "amountHigherThan" value. In this case the event is when there are new incoming or outgoing confirmed token transactions for the specified blockchain and the amount is equal or higher than the value specified. By creating this subscription the user will be notified by Crypto APIs 2.0 when that event occurs, filtered for the specified amount. Being confirmed means that the transactions are verified by miners and added to the next block. This endpoint refers to tokens transactions only, not coins.

Supports Callback Functionality Single Result - This endpoint returns only one single result. POST /blockchain-events/{blockchain}/{network}/subscriptions/tokens-transfers-for-specific-amount

Path Parameters

  • Required
    blockchain string

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

    Example : ethereum
    Possible Values : ethereum ethereum-classic binance-smart-chain tron
  • Required
    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. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten" are test networks.

    Example : ropsten
    Possible Values : mainnet testnet ropsten mordor nile

Query parameters

  • Optional
    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.

    Example : yourExampleString

Request body schema application/json

  • Optional
    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.

    Example : yourExampleString
  • Required
    data object
    • Required
      item object
      • Optional
        allowDuplicates boolean

        Specifies a flag that permits or denies the creation of duplicate addresses.

        Default : False
        Example : True
      • Required
        amountHigherThan integer

        Represents a specific amount of tokens after which the system have to send a callback to customers' callbackUrl.

        Example : 2
      • Optional
        callbackSecretKey string

        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 2.0. For more information please see our Documentation.

        Example : yourSecretKey
      • Required
        callbackUrl string

        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.

        Example : https://example.com
      • Required
        contractAddress string

        Represents the contract address of the token, which controls its logic. It is not the address that holds the tokens.

        Example : 0x7495fede000c8a3b77eeae09cf70fa94cd2d53f5

Response schema

201 400 401 402 403 404 409 415 422 429 500
HTTP Status Code: 201
Content-Type: application/json

The resource has been successfully created.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2021-03-20
  • Required
    requestId string

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

    Example : 601c1710034ed6d407996b30
  • Optional
    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.

    Example : yourExampleString
  • Required
    data object
    • Required
      item object
      • Required
        amountHigherThan integer

        Represents a specific amount of coins after which the system have to send a callback to customers' callbackUrl.

        Example : 2
      • Optional
        callbackSecretKey string

        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.

        Example : yourSecretKey
      • Required
        callbackUrl string

        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.

        Example : https://example.com
      • Required
        contractAddress string

        Represents the contract address of the token, which controls its logic. It is not the address that holds the tokens.

        Example : 0x7495fede000c8a3b77eeae09cf70fa94cd2d53f5
      • Required
        createdTimestamp integer

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

        Example : 1611238648
      • Required
        eventType string

        Defines the type of the specific event available for the customer to subscribe to for callback notification.

        Example : CONFIRMED_TOKENS_TRANSACTION_FOR_CERTAIN_AMOUNT_OR_HIGHER
      • Required
        isActive boolean

        Defines whether the subscription is active or not. Set as boolean.

        Example : True
      • Required
        referenceId string

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

        Example : bc243c86-0902-4386-b30d-e6b30fa1f2aa

Callback parameters Method : POST

You can use the optional parameter callbackSecretKey in your request for additional security. It is then used to create a unique hash string in the x-signature response header in the callback request itself. For more information, please see our Documentation.
CONFIRMED_TOKENS_TRANSACTION_FOR_CERTAIN_AMOUNT_OR_HIGHER

Content-Type : application/json

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2021-03-20
  • Required
    referenceId string

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

    Example : 6038d09050653d1f0e40584c
  • Required
    idempotencyKey string

    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.

    Example : e55bf7a4a7188855f1c27541a6c387d04cc3b22ee34d1304b0e6ecad61c9906c
  • Required
    data object

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

    • Required
      product string

      Represents the Crypto APIs 2.0 product which sends the callback.

      Example : BLOCKCHAIN_EVENTS
    • Required
      event string

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

      Example : CONFIRMED_TOKENS_TRANSACTION_FOR_CERTAIN_AMOUNT_OR_HIGHER
    • Required
      item object

      Defines an item as one result.

      • Required
        blockchain string

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

        Example : ethereum
      • Required
        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. - "mainnet" is the live network with actual data while networks like "testnet", "ropsten", "mordor" are test networks.

        Example : ropsten
      • Required
        minedInBlock object

        Refers to the specific block the transaction was mined in.

        • Required
          height integer

          Defines the number of blocks in the blockchain preceding this specific block.

          Example : 657915
        • Required
          hash string

          Represents the hash of the block's header, i.e. an output that has a fixed length.

          Example : 269b0de44db95beddb6aecc520b375ba8f91f3dc5558a24aa4c26979eb00c7e2
        • Required
          timestamp integer

          Defines the exact date/time when this transaction was mined in seconds since Unix Epoch time.

          Example : 1586365500
      • Required
        transactionId string

        Defines the unique ID of the specific transaction, i.e. its identification number.

        Example : 0xbe38781783b1b9d480219255ff98e20335a39e13979a66112efa33f05fde0a33
      • Required
        tokenType string

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

        Example : ERC-20
        Possible Values : ERC-20 ERC-721 BEP-20
      • Required
        token object One Of
        object
        • Required
          name string

          Specifies the name of the token.

          Example : Tether USD
        • Required
          symbol string

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

          Example : USDT
        • Optional
          decimals string

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

          Example : 6
        • Required
          amount string

          Defines the amount of tokens sent with the confirmed transaction.

          Example : 0.00039
        • Required
          contractAddress string

          Defines the address of the contract.

          Example : 0xdac17f958d2ee523a2206206994597c13d831ec7

Credits Cost : 100 Credits For 1 Result(s)

Try it out

Request Example

POST
https://rest.cryptoapis.io/blockchain-events/ethereum/ropsten/subscriptions/tokens-transfers-for-specific-amount?context=yourExampleString
Headers
Content-Type: application/json
X-API-Key: my-api-key

Request Body
{
    "context": "yourExampleString",
    "data": {
        "item": {
            "allowDuplicates": true,
            "amountHigherThan": 2,
            "callbackSecretKey": "yourSecretKey",
            "callbackUrl": "https://example.com",
            "contractAddress": "0x7495fede000c8a3b77eeae09cf70fa94cd2d53f5"
        }
    }
}

Response Example

{
    "apiVersion": "2021-03-20",
    "requestId": "601c1710034ed6d407996b30",
    "context": "yourExampleString",
    "data": {
        "item": {
            "amountHigherThan": 2,
            "callbackSecretKey": "yourSecretKey",
            "callbackUrl": "https://example.com",
            "contractAddress": "0x7495fede000c8a3b77eeae09cf70fa94cd2d53f5",
            "createdTimestamp": 1611238648,
            "eventType": "CONFIRMED_TOKENS_TRANSACTION_FOR_CERTAIN_AMOUNT_OR_HIGHER",
            "isActive": true,
            "referenceId": "bc243c86-0902-4386-b30d-e6b30fa1f2aa"
        }
    }
}

Callback Example

{
    "apiVersion": "2021-03-20",
    "referenceId": "6038d09050653d1f0e40584c",
    "idempotencyKey": "e55bf7a4a7188855f1c27541a6c387d04cc3b22ee34d1304b0e6ecad61c9906c",
    "data": {
        "product": "BLOCKCHAIN_EVENTS",
        "event": "CONFIRMED_TOKENS_TRANSACTION_FOR_CERTAIN_AMOUNT_OR_HIGHER",
        "item": {
            "blockchain": "ethereum",
            "network": "ropsten",
            "minedInBlock": {
                "height": 657915,
                "hash": "269b0de44db95beddb6aecc520b375ba8f91f3dc5558a24aa4c26979eb00c7e2",
                "timestamp": 1586365500
            },
            "transactionId": "0xbe38781783b1b9d480219255ff98e20335a39e13979a66112efa33f05fde0a33",
            "tokenType": "ERC-20",
            "token": {
                "name": "Tether USD",
                "symbol": "USDT",
                "decimals": "6",
                "amount": "0.00039",
                "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
            }
        }
    }
}