Crypitor Api Guides

This document lets you interact with Crypitor from your server side to perform actions like:

  • Create your webhook
  • Delete your webhook
  • Receive hook for any transaction

Set up your api key

Before using Crypitor apis, you must create your api keys in Crypitor.

Prerequisites

  • To create api key on Crypitor, you must enable 2FA first.
  • If you have already enabled 2FA, skip this step.

Create your api key

  • Go to Crypitor Dashboard > Profile > API keys
  • Click New Api key
  • Enter your api key label
  • Click Create
  • A verification email will be sent to your email. Go to your email and click on the verification link to activate your api key.
  • Once you activated your api key, go back to API keys page and get your api key.

Create your webhook

This api lets you add an wallet address into Crypitor to receive notification about this address's transactions.

  • Api endpoint: POST https://api.crypitor.com/api/account/webhook/create
  • Header: Authorization: <Your api key>
  • Request Body:
{
  "coin" : "currency",
  "address" : "wallet address",
  "hook_url" : "your webhook url",
  "all_token" : true,
  "authorization" : "your custom authorization"
}
  • Parameters:
Name Type Mandatory Description
coin String YES Currency code. Eg: ETH
address String YES
hook_url String YES Your webhook url
all_token Boolean NO You will receive all transaction in any token if you set it TRUE. Default is FALSE
authorization String NO Authorization to verify request in your webhook side. See more
  • Response Body:

200 OK

{
  "_id" : "response id",
  "address" : "wallet address",
  "all_token" : true,
  "hook_url" : "your webhook url",
  "created_time" : 1564232824235
}
  • Example

    • Request
    curl -X POST https://api.crypitor.com/api/account/webhook/create
      -H 'Authorization: <Your Api Key>'
      -H 'Content-Type: application/json'
      -d '{
        "address" : "0x2109153bf9a45b73de56fb44f17c50895786e788",
        "hook_url": "https://yourdomain.com/hook/eth",
        "authorization" : "12345678",
        "all_token" : true,
        "coin" : "ETH"
    }'
    
    • Response:
    {
        "_id": "5d3c50ba08b4d734cf00d086",
        "address": "0x2109153bf9a45b73de56fb44f17c50895786e788",
        "all_token": true,
        "hook_url": "https://yourdomain.com/hook/eth",
        "created_time": 1564233914557
    }
    

Delete your webhook

This api lets you remove an wallet address from Crypitor to stop receiving notification about this address's transactions.

  • Api endpoint: POST https://api.crypitor.com/api/account/webhook/delete
  • Header: Authorization: <Your api key>
  • Request Body:
{
  "coin" : "currency",
  "address" : "wallet address"
}
  • Parameters:
Name Type Mandatory Description
coin String YES Currency code. Eg: ETH
address String YES
  • Response Body:

200 OK

{
  "address" : "wallet address",
  "is_remove" : true
}
  • Example

    • Request
    curl -X POST https://api.crypitor.com/api/account/webhook/delete
      -H 'Authorization: <Your Api Key>'
      -H 'Content-Type: application/json'
      -d '{
          	"address" : "0x2109153bf9a45b73de56fb44f17c50895786e788",
            "coin" : "ETH"
      }'
    
    • Response:
    {
        "address": "0x2109153bf9a45b73de56fb44f17c50895786e788",
        "is_remove": true
    }
    

Find your webhook

This api lets you find a webhook registered in Crypitor

  • Api endpoint: GET https://api.crypitor.com/api/account/webhook/find
  • Header: Authorization: <Your api key>
  • Request Parameters:
Name Type Mandatory Description
coin String YES Currency code. Eg: ETH
address String YES
  • Response Body:

200 OK

{
  "_id" : "response id",
  "address" : "wallet address",
  "all_token" : true,
  "hook_url" : "your webhook url",
  "created_time" : 1564232824235
}
  • Example

    • Request
    curl -X GET https://api.crypitor.com/api/account/webhook/find?coin=ETH&address=0x2109153bf9a45b73de56fb44f17c50895786e788
      -H 'Authorization: <Your Api Key>'
      -H 'Content-Type: application/json'
    
    • Response:
    {
        "_id": "5d3c50ba08b4d734cf00d086",
        "address": "0x2109153bf9a45b73de56fb44f17c50895786e788",
        "all_token": true,
        "hook_url": "https://yourdomain.com/hook/eth",
        "created_time": 1564233914557
    }
    

Set up your webhook to receive transaction

There is some requirements for your webhook endpoint:

  • URL security type: None
  • Method: POST
  • Content type: application/json
  • Expected response http status code: 200

See more information about webhook endpoint for specific currency