CryptoHooks (1.0.0)

Download OpenAPI specification:Download

CryptoHooks provides a simple API that notifies you when your addresses have new transactions on the mempool and on every confirmation up to 10

Quick Start

  1. Log into the UI console to create an API key, in app.cryptohooks.dev

  2. Create a Subscription to specify your endpoint to receive the webhooks

  3. Add addresses to get notified when they have transactions

Authenticate

Once you have your API key you should send the two following headers in your API calls: Api-Key & Api-Secret

Validate Webhooks

Webhooks will have attached a signature in the Ch-Signature header with the following form:

Base64(RSA512(_PRIVATE_KEY_, SHA512(body)))

You can verify it with the this public key

Show Public Key
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAioSPl/zlEOaJWtOgS7AA
9XkOfmQISfm9UgXwlXibziCRgbOiCRBlpvHOxumtUMy9PCnBnrIb/K+nZmNfimUP
KYUNILILu9D8fOR1mgzt4GbnA0fGy6I44uychsaSUUhDsfQwAgYuopiAUqlu1uab
eGSFWv/Q8ZMNLYpw6wptkBuYKV/OJoSMtbIjRhRQIdr1dmKceBn3m5EG2sCgf143
aGp3ImuKuywZQQWcfbfUXm2T53QLxbEGNW3l65z/F4as0u13B/Z1yZQ5u30cSwv/
VszBzqHXPfyAess5RMTsmfVrKhE/K9qYOVq37RgOSBWphVEbweyv1Pod3KLUkNB3
oe7GRtSaGsLZjqnzDKSaPXD4WpKctqSFtv9gjFlghiTQ1PkISjlHegNQSz5FrCsk
1g7y4A+KMJ/KdyssanNGnfdnXOgYYn+XXzQvDp36QTYP14D6HhLRGUuSG3YqXy8u
dNEQOs3X5Az6hC5OLsEEl5ECIBWXKY+JbfROGdn6B46sop11HTeKqJieYvB6iKB+
7drccYR8IOV2IfPpGXDeC7ZAypDXWif6hhhnKgwcV+0pXGRTdjlMxjDy48V3RSpY
4b37/uS+mtxbGKE2MF+nbbTXJUpumbWU+jPEGmg47UGW4z+jVXI2Gi8Y6o5XQfDm
sds1R8Drhpx5f5bqXwRm3V8CAwEAAQ==
-----END PUBLIC KEY-----

Subscriptions

Subscriptions contain a list of addresses, your endpoint and the asset of those addresses.

Create subscription

Create a new subscription.

Request Body schema: application/json
required
url
string <uri>
name
string [ 0 .. 50 ] characters
description
string [ 0 .. 150 ] characters
object

Specifies the blockchain networks supported. Only btc and btc_testnet are valid keys.

Responses

Response Schema: application/json
subId
string <uuid>
url
string <uri>
name
string
description
string
object
status
string
type
string
createdAt
string <date-time>

Request samples

Content type
application/json
{
  • "name": "Main account",
  • "description": "This is a sample description.",
  • "chains": {
    }
}

Response samples

Content type
application/json
{
  • "subId": "9dd874c6-d25c-4488-92af-c956e88677e7",
  • "name": "string",
  • "description": "string",
  • "chains": {
    },
  • "status": "string",
  • "type": "string",
  • "createdAt": "2019-08-24T14:15:22Z"
}

List subscriptions

List all subscriptions.

Responses

Response Schema: application/json
Array of objects (SubscriptionResponse)

Response samples

Content type
application/json
{
  • "subscriptions": [
    ]
}

Addresses

Endpoints related to address management.

Create address

Create a new address for a subscription.

path Parameters
subId
required
string

Subscription ID.

Request Body schema: application/json
required
address
string
subId
string
name
string
description
string
createdAt
string <date-time>

Responses

Response Schema: application/json
address
string
subId
string
name
string
description
string
createdAt
string <date-time>

Request samples

Content type
application/json
{
  • "address": "bcrt1q6vq32hgadmmnsua79nfdjnencwx9qszthu2yfh",
  • "subId": "2c9e1d3b-bbd5-437f-9415-a315c211bd13",
  • "name": "Sample Name",
  • "description": "This is a sample description.",
  • "createdAt": "2024-03-28T17:46:43.287Z"
}

Response samples

Content type
application/json
{
  • "address": "bcrt1q6vq32hgadmmnsua79nfdjnencwx9qszthu2yfh",
  • "subId": "2c9e1d3b-bbd5-437f-9415-a315c211bd13",
  • "name": "Sample Name",
  • "description": "This is a sample description.",
  • "createdAt": "2024-03-28T17:46:43.287Z"
}

List addresses

List all addresses for a subscription.

path Parameters
subId
required
string

Subscription ID.

Responses

Response Schema: application/json
Array of objects (AddressResponse)

Response samples

Content type
application/json
{
  • "addresses": [
    ]
}