List Blockchain Events Subscriptions

Through this endpoint the customer can obtain a list of their callback subscriptions for the available Blockchain events.

Currently Crypto APIs 2.0 offers certain Blockchain event endpoints which allow the user to subscribe for one/a few/all and receive callback notifications when the specific event occurs.

To have an operational callback subscription, you need to first verify a domain for the Callback URL. Please see more information on Callbacks here.

Crypto APIs will notify the user only when the event occurs. There are cases when the specific event doesn't happen at all, or takes a long time to do so. A callback notification will not be sent if the event does not or cannot occur, or will take long time to occur.

GET /blockchain-events/{blockchain}/{network}/subscriptions

Path Parameters

  • Required
    blockchain string

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

    Example : bitcoin
    Possible Values : bitcoin bitcoin-cash litecoin dogecoin dash ethereum ethereum-classic xrp zilliqa
  • 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", "rinkeby" are test networks.

    Example : testnet
    Possible Values : mainnet testnet ropsten rinkeby mordor kotti

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.

  • Optional
    limit integer

    Defines how many items should be returned in the response per page basis.

    Default : 50
    Example : 50
  • Optional
    offset integer

    The starting index of the response items, i.e. where the response should start listing the returned items.

    Default : 0
    Example : 10

Response schema

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

The request has been successful.

  • Object :

  • Required
    apiVersion string

    Specifies the version of the API that incorporates this endpoint.

    Example : 2.0
  • 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 : You can add any text here
  • Required
    data object
    • Required
      offset integer

      The starting index of the response items, i.e. where the response should start listing the returned items.

      Example : 0
    • Required
      limit integer

      Defines how many items should be returned in the response per page basis.

      Example : 50
    • Required
      total integer

      Defines the total number of items returned in the response.

      Example : 100
    • Required
      items array
      Example : Array ( )
      • Required
        address string

        Represents the address of the transaction.

        Example : tb1qtm44m6xmuasy4sc7nl7thvuxcerau2dfvkkgsc
      • Required
        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.

        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.

        Example : https://example.com
      • Required
        confirmationsCount integer

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

        Example : 5
      • Required
        createdTimestamp integer

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

        Example : 1966238648
      • Required
        eventType string

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

        Example : BLOCK_MINED
      • 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
      • Required
        transactionId string

        Represents the unique identification string that defines the transaction.

        Example : 742b4a8d54a663d372fa16abf74093595ae6fc950f2fa2bb7388c7f4d061d7b8
Try it out

Request Example

GET
https://rest.cryptoapis.io/v2/blockchain-events/bitcoin/testnet/subscriptions?limit=50&offset=10
Headers
Host: https://rest.cryptoapis.io/v2
Content-Type: application/json
X-API-Key: my-api-key

Response Example

{
    "apiVersion": "2.0",
    "requestId": "601c1710034ed6d407996b30",
    "context": "You can add any text here",
    "data": {
        "offset": 0,
        "limit": 50,
        "total": 100,
        "items": [
            {
                "address": "tb1qtm44m6xmuasy4sc7nl7thvuxcerau2dfvkkgsc",
                "callbackSecretKey": "yourSecretKey",
                "callbackUrl": "https://example.com",
                "confirmationsCount": 5,
                "createdTimestamp": 1966238648,
                "eventType": "BLOCK_MINED",
                "isActive": true,
                "referenceId": "bc243c86-0902-4386-b30d-e6b30fa1f2aa",
                "transactionId": "742b4a8d54a663d372fa16abf74093595ae6fc950f2fa2bb7388c7f4d061d7b8"
            }
        ]
    }
}