NAV
Shell HTTP JavaScript Node.JS PHP Ruby Python Java GO
  • Getting started
  • Authentication
  • REST APIs
  • WebSockets
  • Standards and Conventions
  • Errors and Rate Limits
  • Bitcoin Cash (BCH)

    General Information

    Get Node Information

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/mainnet/info' \
        -H 'ContentType: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/mainnet/info HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/mainnet/info').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/info",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/info');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/info")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/info'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/info")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/mainnet/info")
    }
    
    

    Response Body

    {
        "payload": {
            "difficulty": 211383755357.6043,
            "headers": 573879,
            "chain": "main",
            "chainWork": "000000000000000000000000000000000000000000e1828395b41951ef1a5d94",
            "mediantime": 1552641995,
            "blocks": 573879,
            "bestBlockHash": "00000000000000000310b97c2052594bf7fbe27e858f118d0515c629a05fff3c",
            "currency": "BCH",
            "transactions": 18647627,
            "verificationProgress": 0.9999956515512772
        }
    }
    
    Info

    General information about a blockchain is available by GET-ing the base resource.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/info

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    The returned object contains a litany of information about the blockchain, including its height, the time/hash of the latest block, and more.

    Get Block By Hash

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f")
    }
    
    

    Response Body

    {
        "payload": {
            "hash": "0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f",
            "size": 3725,
            "height": 1292753,
            "version": 536870912,
            "versionHex": "20000000",
            "merkleroot": "bb990c3d1d67db2e8a1290c0a3ab8d74d066c100cacf659d8d04c720aee3c748",
            "time": "2019-03-14 22:07:11 UTC", //deprecated
            "datetime": "2019-03-14 22:07:11 UTC",
            "mediantime": "2019-03-14 21:39:21 UTC",
            "nonce": 2192864429,
            "bits": "1c011c75",
            "difficulty": 230.3862896691888,
            "chainwork": "000000000000000000000000000000000000000000000044d6888a7ec8caf0ce",
            "previousblockhash": "000000000102d711f32594c80d4fa20381a73099440abc9c322b80f6ff8e225c",
            "nextblockhash": "0000000000e33f310991b8ea77d53ff484e51994bb51a6e9f0327b5b30dc8ddb",
            "transactions": 11,
            "tx": [
                "2afb8264508e2bf3e5288ccad01ed2ab766745b6b9747666b519d59212012c01",
                "18f40b1ae56bba3fa1934b737fbe46ed8d5ca40fa9aed95073eeb5a119530cd3",
                "349720d878547752607a69eb19e330592fee271fb5376cdfd811bee423558ed8",
                "35571c80e7d0e9247b467454ef147d1d5833c775bc2d4164b1bebd4c1f69164f",
                "480937e8efacdafeeb97d401ff0dd9ea8e8ddb27244cefa67a03621315bdb0e6",
                "523327469d0b90c0de9a905c2fe6e227278fc5b55b9d9911ca151e1c26647065",
                "61de4af971d94dbc741762f21dcef08b74b62863a56a1cb3496becdd8d47a858",
                "69f70a288403b5bba23030ccd05d2e5cb00394620fdae3b050cff9432cc590ce",
                "94472a90fbdba2eb2cba68308415181faedf3585c66b89efcbdb927a0c10ba23",
                "bc6f781f9e2f2df460f89995c5e1c7224e48ccbe1aa2a575961f3f5330259864",
                "f2d945a79bec5454a9ab4d570a150d81124daa308f1c81106a977d6413476944"
            ],
            "confirmations": 100,
            "timestamp": 1552601231
        }
    }
    
    Info

    Block Hash endpoint gives you detail information for particular block in the blockchain

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/blocks/${BLOCK_HASH}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    BLOCK_HASH ------- Hash of the block in blockchain

    BLOCK_HASH is a string representing the hash of the block you’re interested in querying, for example:

    0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f

    The returned object contains information about the block in JSON format, including its height, the number of transactions in it, transaction hashes listed in the canonical order in which they appear in the block, and more.

    Get Block by Height

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/blocks/1292753 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/blocks/1292753",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/1292753")
    }
    
    

    Response Body

    {
        "payload": {
            "hash": "0000000000b2bfe216efaef84f9a7f5d9bede5548d886ccc5258c49b8856fd4f",
            "size": 3725,
            "height": 1292753,
            "version": 536870912,
            "versionHex": "20000000",
            "merkleroot": "bb990c3d1d67db2e8a1290c0a3ab8d74d066c100cacf659d8d04c720aee3c748",
            "time": "2019-03-14 22:07:11 UTC", //deprecated
            "datetime": "2019-03-14 22:07:11 UTC",
            "mediantime": "2019-03-14 21:39:21 UTC",
            "nonce": 2192864429,
            "bits": "1c011c75",
            "difficulty": 230.3862896691888,
            "chainwork": "000000000000000000000000000000000000000000000044d6888a7ec8caf0ce",
            "previousblockhash": "000000000102d711f32594c80d4fa20381a73099440abc9c322b80f6ff8e225c",
            "nextblockhash": "0000000000e33f310991b8ea77d53ff484e51994bb51a6e9f0327b5b30dc8ddb",
            "transactions": 11,
            "tx": [
                "2afb8264508e2bf3e5288ccad01ed2ab766745b6b9747666b519d59212012c01",
                "18f40b1ae56bba3fa1934b737fbe46ed8d5ca40fa9aed95073eeb5a119530cd3",
                "349720d878547752607a69eb19e330592fee271fb5376cdfd811bee423558ed8",
                "35571c80e7d0e9247b467454ef147d1d5833c775bc2d4164b1bebd4c1f69164f",
                "480937e8efacdafeeb97d401ff0dd9ea8e8ddb27244cefa67a03621315bdb0e6",
                "523327469d0b90c0de9a905c2fe6e227278fc5b55b9d9911ca151e1c26647065",
                "61de4af971d94dbc741762f21dcef08b74b62863a56a1cb3496becdd8d47a858",
                "69f70a288403b5bba23030ccd05d2e5cb00394620fdae3b050cff9432cc590ce",
                "94472a90fbdba2eb2cba68308415181faedf3585c66b89efcbdb927a0c10ba23",
                "bc6f781f9e2f2df460f89995c5e1c7224e48ccbe1aa2a575961f3f5330259864",
                "f2d945a79bec5454a9ab4d570a150d81124daa308f1c81106a977d6413476944"
            ],
            "confirmations": 100,
            "timestamp": 1552601231
        }
    }
    
    Info

    Block Height endpoint gives you detail information for particular block in the blockchain

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/blocks/${BLOCK_HEIGHT}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    BLOCK_HEIGHT ------- Height of the block in blockchain

    BLOCK_HEIGHT is an integer representing the height of the block you’re interested in querying, for example:

    1292753

    The returned object contains information about the block in JSON format, including its height, the number of transactions in it, transaction hashes listed in the canonical order in which they appear in the block, and more.

    Get Latest Block

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/blocks/latest HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest",
      "method": "GET",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "port": "8021",
      "path": [
        "v1",
        "bc",
        "bch",
        "testnet",
        "blocks",
        "latest"
      ],
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("GET", "v1,bc,bch,testnet,blocks,latest", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest")
      .get()
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
      "fmt"
      "net/http"
      "io/ioutil"
    )
    
    func main() {
    
      url := "https://api.cryptoapis.io/v1/bc/bch/testnet/blocks/latest"
    
      req, _ := http.NewRequest("GET", url, nil)
    
      req.Header.Add("Content-Type", "application/json")
      req.Header.Add("X-API-Key", "my-api-key")
    
      res, _ := http.Defaubchlient.Do(req)
    
      defer res.Body.Close()
      body, _ := ioutil.ReadAll(res.Body)
    
      fmt.Println(res)
      fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
        "payload": {
            "hash": "000000001a5987a3f62a94c0101ce8a846240ebc4d5f9c4c1bc1652e44d4922b",
            "size": 10381,
            "height": 1292854,
            "version": 536870912,
            "versionHex": "20000000",
            "merkleroot": "e316659f4cd9a5fe394bec235a116075bff718b058e0ffc9bba93306b2f4ce6f",
            "time": "2019-03-15 10:04:05 UTC", //deprecated
            "datetime": "2019-03-15 10:04:05 UTC",
            "mediantime": "2019-03-15 09:13:20 UTC",
            "nonce": 1674170823,
            "bits": "1d00ffff",
            "difficulty": 1,
            "chainwork": "000000000000000000000000000000000000000000000044d68907f3d4c6d337",
            "previousblockhash": "00000000000977ae6ffaa583e0d9997b2bc003bd60257cdff840925efd7dbe56",
            "transactions": 38,
            "tx": [
                "0abe5720aa31973cfc4a2a63d4ed14c20ac83c3bedfff039ee6701c3d923a150",
                "015131e1c732c468251d9839b3b1c5f4dbb931814d9ba2f49a5dc12f45de2bdb",
                "08c8dc6b471328fa1f042b9edae7280b7c050046eceab6ea72bc10980b05acee",
                "2922da11338903fa724b5a828d2da735ae8a0b89769a5241da991c63626ddb90",
                "2c747f0a2ee87615a3d21aef48a987c8f1e791b9f1cd9a3ebee8c05bfaa26e09",
                "2e7d81818ff96abee39bca91651bfc68c80fad2f427e6131489fdcf9a89b3703",
                "3045e17d5f79d5a9a57961958c86515551089a6e9c532a0dadbf5270728e625f",
                "336253fcdea91dca4e9ff28d848fcc6b7888248be14b50eebad2fe715a48b46a",
                "3c712488a15ea0dc62b68af0145754fa4458190b01b790f6fb38e9034b0fab61",
                "5756ef6035c9c379463cc1bcac323c26c6ce1c04139fc304ed5019d5a9e01189",
                "580921cfee591b291e551a4938cb335955bf14b45daa25395ac68b60c7af1ce5",
                "6d9fbf3d1739c8931cb4c13517f74f11473609e13b4737832a65db9da2299da3",
                "6ef3fd338e9f96893d6e28d2c8051cca5c878dcd5280069efa34d300ba30a292",
                "74eaa9e2d2229e3fa24a5582a73db180e8ccbbd0ddb55809591c90ebf830af3b",
                "7c02c2a9f608685934e353a09ce91e4bd9f9feaf7c55027f54c6751fcf54e3a1",
                "7d17a9203ab9d80491b43dcf70b4bf7f81b41509de452bd58bb776e0d4f0c4bc",
                "85fbd2dd7f5b307125282596fb7541cfffcd60bfde95a0aadc030ecd113b97c9",
                "a831a0084c8130b0854256be40127f87b2a5b3c33b055133981227cfbbfd76db",
                "ab82322af789d77a1a9faa7bf4fc3eaa4269bfea310697e302273bc1b3181ecd",
                "ad4fe647284f59a50ca00d6e6dc18d2b9ffa62a6f91c479712a9477236eb3164",
                "b89b92d42afb03867098e76149b403c5fe229f0347ad62b856ef3a7b06e4fce6",
                "b92c2c222b79d304f79b70373cc96e7f2b06b6380f0373f79a642f1ac5a8eac2",
                "ba2cb40a61cf44bf623163b108dddcd1a6341997ba7885a83db618d5e600e8c3",
                "c4b9613b5d8ccf0fb50f2d1b37a1b9ff6e09766d3a1daf72af84481b42b79bab",
                "c627b5ae2877be214993dc25e962032c6088bbfc5d2f0eb5182bf8da3632bb3f",
                "cc69894ff3d17d5f123f7d60dcb7e8664eb55ab1b1b47d35eeb098dccc8c198c",
                "cd80739b46b7264526fcbff1a7d52604766b75cb091c2d8e6a09f72ea6ba050e",
                "ce3fe3fa4f613108db7c56ba25659013c37854d0dc94ab3cd5d05d3615ee33c5",
                "d00ce114b69bee6274db0e3b426c9869749a4273e23365c04fa5f020764edf5a",
                "d6f6ae1fae61b96bcfda33d45365c23c6ef5369ffbd135e4f841dc92f448ac07",
                "dd878d5a0b6fa20374f013bf80b73859220fb868815acd6a02ae80992b078083",
                "e0b238d4e726996f53d7da3325b6e2dd2ce48e060bf3f2d03af6668dc7d44273",
                "e3baf669f657e89c6f173f7f27457ec83d7fb8e9b32f66b081d30f0df0d9275e",
                "e53f717cace908b1a5f1b71f5a771aa9ed44fbde0615018e785b5ad221761261",
                "ec53440e0790684eaafff409cf3baf573d1c2475274ee260e2b194d1e6aa927b",
                "eef5d69b3a0e8225d3f9c217a895ad3322ebc810e983d1001185375df05e96d2",
                "f0e58426d01e8bf26b87683e31791b606e4402e4fadef22506d2469c0134c85f",
                "f1d5cd5105bd30e26094a6172bc58f411f8bdac594b54592b005fb08c1544d3a"
            ],
            "confirmations": 1,
            "timestamp": 1552644245
        }
    }
    
    Info

    Latest Block Endpoint gives you detail information for the latest block in the blockchain

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/blocks/latest

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. mainnet or testnet)

    The returned object contains information about the latest block in JSON format, including its height, the number of transactions in it and more.

    Addresses

    Generate Address

    Sample Data

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/mainnet/address' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    POST /v1/bc/bch/mainnet/address HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.post('https://api.cryptoapis.io/v1/bc/bch/mainnet/address')
      .then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/address",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/address');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/address")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/address'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.post(url, headers=headers, data={})
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/address")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Post("https://api.cryptoapis.io/v1/bc/bch/mainnet/address")
    }
    
    

    Response Body

    {
      "payload": {
          "privateKey": "28b587c5fc2a5bae25cbfcdecf8fc32ade49dbae6e0efc600b8a55c5e0906c39",
          "publicKey": "03f1fdae514d5fe4ce189232c9aa3e94e30d8debbf5c00f5cf55a241139495232f",
          "address": "1M8KWgxAkk6mX1nGKJUWTjTNoBbLUndVta",
          "wif": "KxaqufUK4C1oDxibwoz6FR6TA66FhCRmWRVfatxKoFTEp3j9AzGj",
          "bch": "bitcoincash:qrwvfc278gr4cl3tjh2vpq2gxwrrtlcr5vzvs97fxl"
       }
    }
    
    Info

    The Generate Address endpoint allows you to generate private-public key-pairs along with an associated public address. No information is required with this POST request.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/address

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)

    The returned object contains a private key in hex-encoded and wif-encoded format, a public key and address, and its representation as a BCH address.

    Crypto APIs Address API allows you to generate single-use, low-value key pairs with corresponding addresses based on the coin/chain resource you’ve selected for your endpoints.

    If you’re new to blockchains, you can think of public addresses as similar to bank account numbers in a traditional ledger. The biggest differences:

    Addresses & Transactions Data

    Crypto APIs Addresses & Transactions Data API allows you to look up information about public addresses on the blockchain as well as to look up information about unconfirmed transactions, query transactions based on hash or block.

    Get Address Details

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE")
    }
    
    

    Response Body

    {
      "payload": {
          "address": "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf",
          "totalSpent": "0",
          "totalReceived": "0.22",
          "balance": "0.22",
          "txi": 0,
          "txo": 4,
          "txsCount": 4,
          "addresses": [
              "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
          ],
          "legacy": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE"
      }
    }
    
    Info

    The default Address Endpoint strikes a general information about addresses.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain

    ADDRESS is a string representing the public address (or wallet/HD wallet name) you’re interested in querying, for example:

    MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc

    or

    bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    or

    qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    or

    bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5,bchtest:qzjqvt4sc5akpjm036l7awmq6lhp7lvthc5k4emruh,bchtest:qztpr37hd7v64zzqn07a28eg6x99l8f67q8r4q9483

    The second type address is a multisignature address. Since multisignature addresses may be treated as common addresses the following query for the same results is possible:

    GET /v1/bc/bch/testnet/address/mp9XbLBTJbrxL4jnfeRt5y79VFAYTdKtzh,mvUEX5Ee5FXZ5GHenVi87Q24YZhTSJt5sH,muCSxFNAUcYMiXixEyM5KVTTKsSsTjRVsY

    {
        "payload": {
          "address": "bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5,bchtest:qzjqvt4sc5akpjm036l7awmq6lhp7lvthc5k4emruh,bchtest:qztpr37hd7v64zzqn07a28eg6x99l8f67q8r4q9483",
          "totalSpent": "0",
          "totalReceived": "0.000078",
          "balance": "0.000078",
          "txi": 0,
          "txo": 1,
          "txsCount": 1,
          "addresses": [
              "bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5",
              "bchtest:qzjqvt4sc5akpjm036l7awmq6lhp7lvthc5k4emruh",
              "bchtest:qztpr37hd7v64zzqn07a28eg6x99l8f67q8r4q9483"
          ],
          "legacy": "mp9XbLBTJbrxL4jnfeRt5y79VFAYTdKtzh,mvUEX5Ee5FXZ5GHenVi87Q24YZhTSJt5sH,muCSxFNAUcYMiXixEyM5KVTTKsSsTjRVsY"
        }
    }
    

    The returned object contains information about the address, including its balance in BCH and the number of transactions associated with it. The endpoint omits any detailed transaction information, but if that isn’t required by your application, then it’s the fastest and preferred way to get public address information.

    Get Multisig Address Details

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5/multisig")
    }
    
    

    Response Body

    {
      "payload": [
          {
              "address": "bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5,bchtest:qzjqvt4sc5akpjm036l7awmq6lhp7lvthc5k4emruh,bchtest:qztpr37hd7v64zzqn07a28eg6x99l8f67q8r4q9483",
              "totalSpent": "0",
              "totalReceived": "0.000078",
              "balance": "0.000078",
              "txi": 0,
              "txo": 1,
              "txsCount": 1,
              "addresses": [
                  "bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5",
                  "bchtest:qzjqvt4sc5akpjm036l7awmq6lhp7lvthc5k4emruh",
                  "bchtest:qztpr37hd7v64zzqn07a28eg6x99l8f67q8r4q9483"
              ],
              "legacy": "mp9XbLBTJbrxL4jnfeRt5y79VFAYTdKtzh,mvUEX5Ee5FXZ5GHenVi87Q24YZhTSJt5sH,muCSxFNAUcYMiXixEyM5KVTTKsSsTjRVsY"
          }
      ],
      "meta": {
          "totalCount": 1,
          "index": 0,
          "limit": 50,
          "results": 1
      }
    }
    
    Info

    The Multisig Address Endpoint strikes a general information about a single address that is involved in multisignature addresses.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}/multisig

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain
    LIMIT ------- Limit results
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    ADDRESS is a string representing the public address (or wallet/HD wallet name) you’re interested in querying, for example:

    bchtest:qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5

    or

    qp02h3kdvjxw2ev9dlxk7n8y2mhgdrzlxv86qjp9f5

    or

    mp9XbLBTJbrxL4jnfeRt5y79VFAYTdKtzh

    The returned object returns a list of multisignature addresses in which the queried address is involved in, including balance in BCH and the number of transactions associated with it, and more.

    Get Basic Transactions By Address

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/basic/transactions")
    }
    
    

    Response Body

    {
      "payload": [
        {
          "txid": "44de757a90d2aef5c560e99429c895743559f78f6e95ea2b779f8d13029b2977",
          "amount": 0.07626181,
          "fee": 0.00023141,
          "unit": "bch",
          "datetime": "2020-01-07 13:36:19 UTC",
          "timestamp": 1578404179,
          "confirmations": 12076,
          "sent": {
            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf": 0.07649322
          },
          "received": {
            "bchtest:qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux": 0.00309,
            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf": 0.07317181
          }
        },
        ...
        {
          "txid": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
          "amount": 0.1999954,
          "fee": 0.0000023,
          "unit": "bch",
          "datetime": "2018-11-07 15:06:13 UTC",
          "timestamp": 1541603173,
          "confirmations": 97310,
          "sent": {
            "bchtest:qqw0nq73nju8en4hd2hch3z9xwz4msj4jvfhfpcqcn": 0.1999977
          },
          "received": {
            "bchtest:qrv0zecculel044z44hz6066vcjuqr38p5n4w5fxyz": 0.0999954,
            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf": 0.1
          }
        }
      ],
      "meta": {
        "totalCount": 31,
        "index": 0,
        "limit": 50,
        "results": 31
      }
    }
    
    Info

    The Address Transactions Endpoint returns basic information available about a particular address, including an array of basic transactions.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}/transactions?index=0&limit=50

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain
    index 0 First index of returned txs
    limit 50 Sets the number of returned txs
    legacy false (boolean) Sets the addresses' format to legacy.
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    The default values of the query parameters index and limit are as follows: 0 and 50. ADDRESS is a string representing the public address you’re interested in querying, for example:

    my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE

    or

    bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    or

    qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    The returned object contains an array with basic transaction records associated with this address in descending order by blocktime.

    Get Confirmed Transactions By Address

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions")
    }
    
    

    Response Body

    {
        "payload": [
            {
                "txid": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "hash": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "index": 9,
                "version": 2,
                "size": 373,
                "vsize": null,
                "locktime": 1268698,
                "time": "2018-11-19 07:49:17 UTC", //deprecated
                "datetime": "2018-11-19 07:49:17 UTC",
                "blockhash": "0000000018a43e5ac2a69f93bfdb361a8204c03da85e0ab3579cd17f289267e6",
                "blockheight": 1268699,
                "blocktime": "2018-11-19 07:49:17 UTC",
                "timestamp": 1542613757,
                "confirmations": 24154,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "ddb509761f3774162b626e8fcd196ef8556bc592fd9a1bf1f9fdb31bb952ff76",
                        "vout": 1,
                        "amount": "0.01997628",
                        "addresses": [
                            "bchtest:qzazyfwmhlz5wpzf20pjr4603n5d5wtvdylk6zwafh"
                        ],
                        "script": {
                            "asm": "3045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d[ALL|FORKID] 0215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "hex": "483045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d41210215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    },
                    {
                        "coinbase": null,
                        "txout": "99194dca09f6586a833b81ddb8e975c01fa725028815b3e1c773c2686168534f",
                        "vout": 0,
                        "amount": "0.01000001",
                        "addresses": [
                            "bchtest:qr5e4sja7wqk86ecu0hvh6q684sd4396vu0nlnz4rq"
                        ],
                        "script": {
                            "asm": "304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1[ALL|FORKID] 02b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "hex": "47304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1412102b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.01997239",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qqwyqn8jv6l6ycllt7ypd8rk9ncmj80w65wyc9q9uy"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 1c404cf266bfa263ff5f88169c762cf1b91deed5 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a9141c404cf266bfa263ff5f88169c762cf1b91deed588ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.01",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            },...,
            {
                "txid": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "hash": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "index": 9,
                "version": 2,
                "size": 226,
                "vsize": null,
                "locktime": 1266696,
                "time": "2018-11-07 15:06:13 UTC",
                "blockhash": "000000000000003adcd35a9e4182ccbc35184718871be252da66dd3446acbc19",
                "blockheight": 1266697,
                "blocktime": "2018-11-07 15:06:13 UTC",
                "timestamp": 1541603173,
                "confirmations": 26156,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "37380db6842be671269e7bd77846f8f82c10e8842fe23e9ce8687ef2547bf4c2",
                        "vout": 0,
                        "amount": "0.1999977",
                        "addresses": [
                            "bchtest:qqw0nq73nju8en4hd2hch3z9xwz4msj4jvfhfpcqcn"
                        ],
                        "script": {
                            "asm": "3045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa5[ALL|FORKID] 0231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "hex": "483045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa541210231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.0999954",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qrv0zecculel044z44hz6066vcjuqr38p5n4w5fxyz"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d88ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.1",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 7,
            "index": 0,
            "limit": 50,
            "results": 7
        }
    }
    
    Info

    The Address Transactions Endpoint returns all information available about a particular address, including an array of complete transactions.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}/transactions?index=0&limit=50

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain
    index 0 First index of returned txs
    limit 50 Sets the number of returned txs
    legacy false (boolean) Sets the addresses' format to legacy.
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    The default values of the query parameters index and limit are as follows: 0 and 50. ADDRESS is a string representing the public address you’re interested in querying, for example:

    my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE

    or

    bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    or

    qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    The returned object contains information about the address, including the number of transactions associated with it, and the corresponding full transaction records in descending order by blocktime.

    Get Confirmed Transactions For Address By Range

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/ HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf/transactions-by-range/1541603173/1542613757/")
    }
    
    

    Response Body

    {
        "payload": [
            {
                "txid": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "hash": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "index": 9,
                "version": 2,
                "size": 373,
                "vsize": null,
                "locktime": 1268698,
                "time": "2018-11-19 07:49:17 UTC", //deprecated
                "datetime": "2018-11-19 07:49:17 UTC",
                "blockhash": "0000000018a43e5ac2a69f93bfdb361a8204c03da85e0ab3579cd17f289267e6",
                "blockheight": 1268699,
                "blocktime": "2018-11-19 07:49:17 UTC",
                "timestamp": 1542613757,
                "confirmations": 24154,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "ddb509761f3774162b626e8fcd196ef8556bc592fd9a1bf1f9fdb31bb952ff76",
                        "vout": 1,
                        "amount": "0.01997628",
                        "addresses": [
                            "bchtest:qzazyfwmhlz5wpzf20pjr4603n5d5wtvdylk6zwafh"
                        ],
                        "script": {
                            "asm": "3045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d[ALL|FORKID] 0215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "hex": "483045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d41210215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    },
                    {
                        "coinbase": null,
                        "txout": "99194dca09f6586a833b81ddb8e975c01fa725028815b3e1c773c2686168534f",
                        "vout": 0,
                        "amount": "0.01000001",
                        "addresses": [
                            "bchtest:qr5e4sja7wqk86ecu0hvh6q684sd4396vu0nlnz4rq"
                        ],
                        "script": {
                            "asm": "304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1[ALL|FORKID] 02b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "hex": "47304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1412102b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.01997239",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qqwyqn8jv6l6ycllt7ypd8rk9ncmj80w65wyc9q9uy"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 1c404cf266bfa263ff5f88169c762cf1b91deed5 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a9141c404cf266bfa263ff5f88169c762cf1b91deed588ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.01",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            },...,
            {
                "txid": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "hash": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "index": 9,
                "version": 2,
                "size": 226,
                "vsize": null,
                "locktime": 1266696,
                "time": "2018-11-07 15:06:13 UTC",
                "blockhash": "000000000000003adcd35a9e4182ccbc35184718871be252da66dd3446acbc19",
                "blockheight": 1266697,
                "blocktime": "2018-11-07 15:06:13 UTC",
                "timestamp": 1541603173,
                "confirmations": 26156,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "37380db6842be671269e7bd77846f8f82c10e8842fe23e9ce8687ef2547bf4c2",
                        "vout": 0,
                        "amount": "0.1999977",
                        "addresses": [
                            "bchtest:qqw0nq73nju8en4hd2hch3z9xwz4msj4jvfhfpcqcn"
                        ],
                        "script": {
                            "asm": "3045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa5[ALL|FORKID] 0231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "hex": "483045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa541210231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.0999954",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qrv0zecculel044z44hz6066vcjuqr38p5n4w5fxyz"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d88ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.1",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 7,
            "index": 0,
            "limit": 50,
            "results": 7
        }
    }
    
    Info

    The Address Transactions By Range Endpoint returns all information available about a particular address, including an array of complete transactions.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}/transactions-by-range/${FROM_TIMESTAMP}/${TO_TIMESTAMP}?index=0&limit=50

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain
    FROM_TIMESTAMP ------- From timestamp of desired txs
    TO_TIMESTAMP ------- To timestamp of desired txs
    index 0 First index of returned txs
    limit 50 Sets the number of returned txs
    legacy false (boolean) Sets the addresses' format to legacy.
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    The default values of the query parameters index and limit are as follows: 0 and 50. FROM_TIMESTAMP and TO_TIMESTAMP must be provided to get transactions with date range. ADDRESS is a string representing the public address you’re interested in querying, for example:

    my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE

    or

    bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    or

    qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf

    The returned object contains information about the address, including the number of transactions associated with it, and the corresponding full transaction records in descending order by blocktime.

    Get Unconfirmed Transactions By Address

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/address/bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p/unconfirmed-transactions")
    }
    
    

    Response Body

    {
        "payload": [
            {
                "txid": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "hash": "9e558a794765f096110231dc1a33debcaa64b4bd463178039ca9dec64f350568",
                "index": 9,
                "version": 2,
                "size": 373,
                "vsize": null,
                "locktime": 1268698,
                "time": "2018-11-19 07:49:17 UTC", //deprecated
                "datetime": "2018-11-19 07:49:17 UTC",
                "blockhash": "0000000018a43e5ac2a69f93bfdb361a8204c03da85e0ab3579cd17f289267e6",
                "blockheight": 1268699,
                "blocktime": "2018-11-19 07:49:17 UTC",
                "timestamp": 1542613757,
                "confirmations": 24154,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "ddb509761f3774162b626e8fcd196ef8556bc592fd9a1bf1f9fdb31bb952ff76",
                        "vout": 1,
                        "amount": "0.01997628",
                        "addresses": [
                            "bchtest:qzazyfwmhlz5wpzf20pjr4603n5d5wtvdylk6zwafh"
                        ],
                        "script": {
                            "asm": "3045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d[ALL|FORKID] 0215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "hex": "483045022100d6a18d64be117fe96e4956acc67181a350cfab41c90f53f6b5b16d95f5fc214202204932e1fd37528b760d0cff31cddb674470c7e52f3e3d9066992967722273e18d41210215ba20b90310d3e89d2126f33b5193e0f8860864bb82f5ba4340ea53d689fe7a",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    },
                    {
                        "coinbase": null,
                        "txout": "99194dca09f6586a833b81ddb8e975c01fa725028815b3e1c773c2686168534f",
                        "vout": 0,
                        "amount": "0.01000001",
                        "addresses": [
                            "bchtest:qr5e4sja7wqk86ecu0hvh6q684sd4396vu0nlnz4rq"
                        ],
                        "script": {
                            "asm": "304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1[ALL|FORKID] 02b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "hex": "47304402204c10da2230072a803093a35b4d8cfd78bff5e4922046a5881099bfcf5e62a77e02206d641da33995a54d31f44a2ea3809d825d0433e94ba16eb2a79cdf033083a5f1412102b9a40ced79eb2707d8a403ee0bf8c7b918b3b51415a418fe8b6b62ba44a5ede6",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.01997239",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qqwyqn8jv6l6ycllt7ypd8rk9ncmj80w65wyc9q9uy"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 1c404cf266bfa263ff5f88169c762cf1b91deed5 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a9141c404cf266bfa263ff5f88169c762cf1b91deed588ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.01",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            },...,
            {
                "txid": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "hash": "eaaeaaf9c5e8c06818a3e5597adb68710f8c9b8daaddae3a0c491b7aa09321f9",
                "index": 9,
                "version": 2,
                "size": 226,
                "vsize": null,
                "locktime": 1266696,
                "time": "2018-11-07 15:06:13 UTC",
                "blockhash": "000000000000003adcd35a9e4182ccbc35184718871be252da66dd3446acbc19",
                "blockheight": 1266697,
                "blocktime": "2018-11-07 15:06:13 UTC",
                "timestamp": 1541603173,
                "confirmations": 26156,
                "txins": [
                    {
                        "coinbase": null,
                        "txout": "37380db6842be671269e7bd77846f8f82c10e8842fe23e9ce8687ef2547bf4c2",
                        "vout": 0,
                        "amount": "0.1999977",
                        "addresses": [
                            "bchtest:qqw0nq73nju8en4hd2hch3z9xwz4msj4jvfhfpcqcn"
                        ],
                        "script": {
                            "asm": "3045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa5[ALL|FORKID] 0231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "hex": "483045022100c7dae6326cb91b8c3440b353aae57875339f906d3c482a26807a9d856a08e86202204ec6e123a01afbe433c4f33f803369da21d977f2ce875c7b05ca500b75e1ffa541210231917b27fa166eacb327cef45c7515cbd3fcd9b403782b245f80a67e505857a8",
                            "reqsigs": null
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.0999954",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "bchtest:qrv0zecculel044z44hz6066vcjuqr38p5n4w5fxyz"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914d8f16718e7f3f7d6a2ad6e2d3f5a6625c00e270d88ac",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.1",
                        "type": "pubkeyhash",
                        "spent": false,
                        "addresses": [
                            "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 c06fa3357499eb2d7b7f0b01824b5847727e02d2 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac",
                            "reqsigs": 1
                        }
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 7,
            "index": 0,
            "limit": 50,
            "results": 7
        }
    }
    
    Info

    The Address Unconfirmed Transactions Endpoint returns all information available about a particular address, including an array of unconfirmed transactions.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/address/${ADDRESS}/unconfirmed-transactions?index=0&limit=50

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    ADDRESS ------- Address in blockchain
    index 0 First index of returned txs
    limit 50 Sets the number of returned txs
    legacy false (boolean) Sets the addresses' format to legacy.
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    The default values of the query parameters index and limit are as follows: 0 and 50. ADDRESS is a string representing the public address you’re interested in querying, for example:

    mo6zgsuMEbSXQvwK79exLzeo4HqbQ9p793

    or

    bchtest:qpfnjptddkqmqd6nxjt64dh7ntyxhdruyufqymvd5p

    The returned object contains information about the address, including the number of transactions associated with it, and the corresponding full transaction records in descending order by blocktime.

    Multiple Addresses Details

    Code samples

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'\
      -d '{
           "addresses" : ["bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35","bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject","bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"]      
    }'
    
    
    
    POST /v1/bc/bch/testnet/address/show-multiple HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "addresses" : [""bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35","bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject","bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"]      
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"addresses\": [\"bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35\",\"bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject\", \"bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal\"]}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/address/show-multiple",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ addresses: 
       ["bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35","bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject", "bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"],
     });
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "addresses": ["bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35","bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject","bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple")
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"addresses\": [\"bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35\",\"bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject\", \"bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal\"]}"
    response = http.request(request)
    puts response.read_body
    
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"addresses\": [\"bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35\",\"bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject\", \"bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal\"]}"
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/addresses/show-multiple, payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"addresses\": [\"bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35\",\"bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject\", \"bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal\"]}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/address/show-multiple"
    
        payload := strings.NewReader("{\n\t\"addresses\": [\"bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35\",\"bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject\", \"bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal\"]}");
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
      "payload": [
        {
          "address": "bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35",
          "totalSpent": "2747581.17802552",
          "totalReceived": "2749849.35870001",
          "balance": "2268.18067449",
          "txi": 7963,
          "txo": 8326,
          "txsCount": 8208,
          "addresses": [
            "bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35"
          ]
        },
        {
          "address": "bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject",
          "totalSpent": "0.8",
          "totalReceived": "0.8",
          "balance": "0",
          "txi": 2,
          "txo": 2,
          "txsCount": 4,
          "addresses": [
            "bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject"
          ]
        },
        {
          "address": "bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal",
          "totalSpent": "0.021",
          "totalReceived": "1.3733",
          "balance": "1.3523",
          "txi": 342,
          "txo": 15422,
          "txsCount": 412,
          "addresses": [
            "bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"
          ]
        }
      ],
      "meta": {
        "totalCount": 3,
        "limit": 3,
        "results": 3
      }
    }
    
    Info

    The Multiple Addresses Details Endpoint strikes a general information about the given addresses in the array.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/address/show-multiple

    Request Object

    {
    "addresses": [
    "bchtest:qqmd9unmhkpx4pkmr6fkrr8rm6y77vckjvqe8aey35",
    "bchtest:pprqmlj7fenk04ua4xxka8gafz2c084vsu7jr3ject",
    "bchtest:pqtjmnzwqffkrk2349g3cecfwwjwxusvnq87n07cal"
    ]
    }

    Max length of the array is 10 elements

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    As you can see from the code example, you need to provide several public addresses within the addresses array.

    The endpoint returns a string array with information about the addresses, including its balance in BCH and the number of transactions associated with it.

    Get Basic Transaction Details By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/txid/0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0")
    }
    

    Response Body

    {
        "payload": {
            "amount": 0.526137,
            "fee": 0.0000228,
            "unit": "btc",
            "datetime": "2020-03-05 14:15:27 UTC",
                "timestamp": 1583417727,
            "confirmations": 1,
            "sent": {
                 "bitcoincash:qrmgm9y9xzs70c9g367au9t3mxwx5yw6656n6qgukc": 0.5261598
            },
            "received": {
                "bitcoincash:qrret5jejq3pfcwwg2cs4vxjh0gnpcuvycw0e0d5q2": 0.2,
                "bitcoincash:qrf2q2gw8v5nztjus0mzejpupmrh2rhlgsd0en5q9v": 0.326137
            }
        }
    }
    
    Info

    The Basic Transaction by Txid Endpoint returns detailed information about a given transaction based on its id.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/txid/${TXID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    TXID ------- Id of the transaction in blockchain

    TXID is a string representing the id of the transaction you’re interested in querying, for example:

    0144c5bb98e489b625cf7a1d594588f4a8ad458094ac022f553e1f1fcfbf46f0

    The returned object contains basic information about the transaction in JSON format, including the total amount transacted, sent, received and more.

    Get Transaction Details By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/txid/066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977")
    }
    

    Response Body

    {
        "payload": {
            "txid": "066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977",
            "hash": "066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977",
            "index": 1,
            "version": 1,
            "size": 244,
            "locktime": 0,
            "time": "2019-03-14 23:26:09 UTC", //deprecated
            "datetime": "2019-03-14 23:26:09 UTC",
            "blockhash": "00000000007a4fdfeb39ef933a0e75aece6e399c33cc93be453ddce832a22482",
            "blockheight": 1292773,
            "blocktime": "2019-03-14 23:26:09 UTC",
            "timestamp": 1552605969,
            "confirmations": 100,
            "txins": [
                {
                    "txout": "7d40824cf79fe0d6dedea076a5d077198296ec034eaa2fc1acf577920ab6c3a7",
                    "vout": 0,
                    "amount": "0.03839682",
                    "addresses": [
                        "bchtest:qq72q9gry5mvp7fddu74hvaxqmwr6x829skptg8l0m"
                    ],
                    "script": {
                        "asm": "3044022049f5f8e107f8e233199880e8da0c9c73aaf3623631c6331e702b0fef9ef5953002203639e14f5d526ef47575baf83a290b33016553eef115046669c42b9fd831b878[ALL|FORKID] 021000fca5ef6bc90f48e61cb7530c47f7ea4bfeec6a837e5015ef5e818a5b10e3",
                        "hex": "473044022049f5f8e107f8e233199880e8da0c9c73aaf3623631c6331e702b0fef9ef5953002203639e14f5d526ef47575baf83a290b33016553eef115046669c42b9fd831b8784121021000fca5ef6bc90f48e61cb7530c47f7ea4bfeec6a837e5015ef5e818a5b10e3"
                    },
                    "votype": "pubkeyhash"
                }
            ],
            "txouts": [
                {
                    "amount": "0",
                    "type": "nulldata",
                    "spent": true,
                    "addresses": [],
                    "script": {
                        "asm": "OP_RETURN 696e7465726c696e6b ccc1a62bb456eeb57b79910d771e941a682698313bd7cf25dc58836c17ba3721",
                        "hex": "6a09696e7465726c696e6b20ccc1a62bb456eeb57b79910d771e941a682698313bd7cf25dc58836c17ba3721"
                    }
                },
                {
                    "amount": "0.03839436",
                    "type": "pubkeyhash",
                    "spent": true,
                    "addresses": [
                        "bchtest:qzrn435e8pap9k3qnzpn4ludqkrt3nfygqvr0smsws"
                    ],
                    "script": {
                        "asm": "OP_DUP OP_HASH160 873ac699387a12da2098833aff8d0586b8cd2440 OP_EQUALVERIFY OP_CHECKSIG",
                        "hex": "76a914873ac699387a12da2098833aff8d0586b8cd244088ac",
                        "reqsigs": 1
                    }
                }
            ]
        }
    }
    
    Info

    The Transaction Txid Endpoint returns detailed information about a given transaction based on its id.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/txid/${TXID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    TXID ------- Id of the transaction in blockchain

    TXID is a string representing the id of the block you’re interested in querying, for example:

    066100ef7304e0467aeac07b8f8866ddb30e6a0b8c935bc79f0870a081a88977

    The returned object contains information about the transaction in JSON format, including its block information, the total amount transacted with it (in bch), the inputs and outputs, and more.

    Get Unconfirmed Transaction Details By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed/txid/54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0")
    }
    

    Response Body

    {
      "payload": {
        "txid": "54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0",
        "hash": "54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0",
        "version": 1,
        "size": 250,
        "locktime": 0,
        "time": "2020-07-30 18:01:29 UTC",
        "datetime": "2020-07-30 18:01:29 UTC",
        "timestamp": 1596132089,
        "txins": [
          {
            "txout": "fbffa5c62c2c26e762a5c39bcfde53ad977b40a0410bb796a9e2ebb25d3d4a23",
            "vout": 1,
            "amount": "0.02373938",
            "addresses": [
              "bchtest:ppxy305q6qsyrg8qm2f4r7eznem6g4qt3qqng238pk"
            ],
            "script": {
              "asm": "3045022100a1f35c2cd484f6626241e656130721b73a4aedd02e73e72897eb2bc747070c9b022070009ebe8a75d22f668b504ff27252622efa23472aa9b55a03d3e0cd59ee468a[ALL|FORKID] 029a659c1a75ad337e0f51b7e6c9b0f22948e9a471e72936321551530325f1fee0 76a914c72ba81b303e08a4ae9c290b23a4c77f8fff716488ac",
              "hex": "483045022100a1f35c2cd484f6626241e656130721b73a4aedd02e73e72897eb2bc747070c9b022070009ebe8a75d22f668b504ff27252622efa23472aa9b55a03d3e0cd59ee468a4121029a659c1a75ad337e0f51b7e6c9b0f22948e9a471e72936321551530325f1fee01976a914c72ba81b303e08a4ae9c290b23a4c77f8fff716488ac"
            },
            "votype": "scripthash"
          }
        ],
        "txouts": [
          {
            "amount": "0.0001",
            "type": "pubkeyhash",
            "spent": false,
            "addresses": [
              "bchtest:qp9a9ll45fqaf3z2jjckqu22hrvtraj3msqyc29aya"
            ],
            "script": {
              "asm": "OP_DUP OP_HASH160 4bd2fff5a241d4c44a94b160714ab8d8b1f651dc OP_EQUALVERIFY OP_CHECKSIG",
              "hex": "76a9144bd2fff5a241d4c44a94b160714ab8d8b1f651dc88ac",
              "reqsigs": 1
            }
          },
          {
            "amount": "0.02361904",
            "type": "scripthash",
            "spent": false,
            "addresses": [
              "bchtest:ppxy305q6qsyrg8qm2f4r7eznem6g4qt3qqng238pk"
            ],
            "script": {
              "asm": "OP_HASH160 4c48be80d02041a0e0da9351fb229e77a4540b88 OP_EQUAL",
              "hex": "a9144c48be80d02041a0e0da9351fb229e77a4540b8887",
              "reqsigs": 1
            }
          }
        ]
      }
    }
    
    Info

    The Unconfirmed Transaction By Txid Endpoint returns detailed information about a given transaction based on its id.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/unconfirmed/txid/${TXID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    TXID ------- Id of the transaction in blockchain

    TXID is a string representing the id of the block you’re interested in querying, for example:

    54b7c734f44b3a12a4a3d462a86f6ceee24eb8b1f0aef9df4bae26f00b54b4c0

    The returned object contains information about the transaction in JSON format, the total amount transacted with it (in bitcoins), the inputs and outputs, and more.

    Get Transactions By Block Number

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/block/00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34")
    }
    
    

    Response Body

    {
        "payload": [
                {
                    "txid": "a8f26edb42d531241838922e364f2807961f267de4c6ed33b61edf4e167013ce",
                    "hash": "a8f26edb42d531241838922e364f2807961f267de4c6ed33b61edf4e167013ce",
                    "index": 0,
                    "version": 1,
                    "size": 120,
                    "locktime": 0,
                    "time": "2019-03-14 23:15:07 UTC",
                    "blockhash": "00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34",
                    "blockheight": 1292770,
                    "blocktime": "2019-03-14 23:15:07 UTC",
                    "timestamp": 1552605307,
                    "confirmations": 5119,
                    "txins": [
                        {
                            "coinbase": "03e2b91300fe184f0000fec5290a000963676d696e6572343208080000000000000000",
                            "addresses": []
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0.78134749",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qpkmyfgvzyadzf9xpc99ytaw7zmlpj9sa5qrn24u9t"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 6db2250c113ad124a60e0a522faef0b7f0c8b0ed OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a9146db2250c113ad124a60e0a522faef0b7f0c8b0ed88ac",
                                "reqsigs": 1
                            }
                        }
                    ]
                },
                ...
                {
                    "txid": "d021418d81b16e58ae737b313c42b25dd38a98ba6400df026f67a857ea01da8e",
                    "hash": "d021418d81b16e58ae737b313c42b25dd38a98ba6400df026f67a857ea01da8e",
                    "index": 3,
                    "version": 1,
                    "size": 245,
                    "locktime": 0,
                    "time": "2019-03-14 23:15:07 UTC",
                    "blockhash": "00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34",
                    "blockheight": 1292770,
                    "blocktime": "2019-03-14 23:15:07 UTC",
                    "timestamp": 1552605307,
                    "confirmations": 5119,
                    "txins": [
                        {
                            "txout": "68a766e98c10452bf6e3f8d1041ac0f62f5261a48aefb56d30ee6066f75fe568",
                            "vout": 0,
                            "amount": "0.03840174",
                            "addresses": [
                                "bchtest:qz9yq845yz4fw45sq9akmpdrxfkzpflz5sm7p20w0y"
                            ],
                            "script": {
                                "asm": "3045022100b4393bb0aa6da3eeb554d32967624b9d0cf6486b58867a75a619fce716d953d4022022f30efc7687e1b9aed5fa595036f9e1b4fe5d17dd38055f42270a7ef03421f1[ALL|FORKID] 03597d98e5b48120869841805d4621d90c9346f556a115335e1614efa49618ff71",
                                "hex": "483045022100b4393bb0aa6da3eeb554d32967624b9d0cf6486b58867a75a619fce716d953d4022022f30efc7687e1b9aed5fa595036f9e1b4fe5d17dd38055f42270a7ef03421f1412103597d98e5b48120869841805d4621d90c9346f556a115335e1614efa49618ff71"
                            },
                            "votype": "pubkeyhash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0",
                            "type": "nulldata",
                            "spent": true,
                            "addresses": [],
                            "script": {
                                "asm": "OP_RETURN 696e7465726c696e6b 43b11a39ace2e1998ff297e64ed5d620bf1c9589343cf9a2737457b6ebca37f9",
                                "hex": "6a09696e7465726c696e6b2043b11a39ace2e1998ff297e64ed5d620bf1c9589343cf9a2737457b6ebca37f9"
                            }
                        },
                        {
                            "amount": "0.03839928",
                            "type": "pubkeyhash",
                            "spent": true,
                            "addresses": [
                                "bchtest:qppqhvj5m657c9h973nehjmn2n4mep0hvc8etpktcs"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 420bb254dea9ec16e5f4679bcb7354ebbc85f766 OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914420bb254dea9ec16e5f4679bcb7354ebbc85f76688ac",
                                "reqsigs": 1
                            }
                        }
                    ]
                }
        ],
        "meta": {
            "totalCount": 4,
            "index": 0,
            "limit": 50,
            "results": 4
        }
    }
    
    Info

    The Transaction Index by Block Endpoint returns detailed information about a list of transactions. The endpoint is useable both with block height and block hash. index and limit query parameters might also be used, as their default values are, as follows: 0, 1. Therefore, if none is specified the returned object will be the first transaction (the coinbase transaction) included in the block.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/block/${BLOCK}?index=0&limit=1

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    BLOCK ------- Block height or block hash in blockchain
    index 0 index to start from
    limit 1 number of transactions to be returned
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    BLOCK is a string or an integer representing the hash or the height of the block you’re interested in querying, for example:

    00000000007458053c7cfa0105abd5b778753074d4aac19d7beedd0a74bc1e34

    or

    1593401

    The returned object contains information about the transaction in JSON format, including its block information, the total amount transacted with it (in bch), the inputs and outputs, and more.

    Get Unconfirmed Transactions

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/txs HTTP/1.1
    Host: api.cryptoapis.io
    X-API-Key: my-api-key
    Content-Type: application/json
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed",
      "method": "GET",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "port": null,
      "path": "/v1/bc/bch/testnet/txs/unconfirmed",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'content-type' => 'application/json',
      'authorization' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    
    url = "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed"
    
    headers = {
        'content-type': "application/json",
        'authorization': "my-api-key"
        }
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed")
      .get()
      .addHeader("authorization", "my-api-key")
      .addHeader("content-type", "application/json")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/unconfirmed"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "my-api-key")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
        "payload": [
                {
                    "txid": "adc72bd870473b7e2809edd660ea3ffb4a37ad96bfad2ea0829cc9e7598e716a",
                    "hash": "adc72bd870473b7e2809edd660ea3ffb4a37ad96bfad2ea0829cc9e7598e716a",
                    "version": 2,
                    "size": 236,
                    "locktime": 0,
                    "time": "2019-03-15 14:37:14 UTC", //deprecated
                    "datetime": "2019-03-15 14:37:14 UTC",
                    "timestamp": 1552660634,
                    "txins": [
                        {
                            "txout": "6c83d101862acdc868bace6b4f6c9b842d85b9c0bb77fb652e74afe6ddb086ff",
                            "vout": 1,
                            "amount": "0.0008",
                            "addresses": [
                                "bchtest:qqux7gek8sg6r9qjkrdmrvz6t4xet3ax3gztt2drzk"
                            ],
                            "script": {
                                "asm": "3044022011c1af87da36ab96f2386f2e71e12ffcc9bdaff9e31f9b27f2f144f10f6b6d230220622b9edb7f43a4f6f15e8e680754aa4d323151c149b6fbd70d43ae52ee4450c3[ALL|FORKID|ANYONECANPAY] 0219bb6f29c4aa02dc691a058df1418f9a8c135f981cbda83304a98b317bf9771c",
                                "hex": "473044022011c1af87da36ab96f2386f2e71e12ffcc9bdaff9e31f9b27f2f144f10f6b6d230220622b9edb7f43a4f6f15e8e680754aa4d323151c149b6fbd70d43ae52ee4450c3c1210219bb6f29c4aa02dc691a058df1418f9a8c135f981cbda83304a98b317bf9771c"
                            },
                            "votype": "pubkeyhash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0.000122",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qqux7gek8sg6r9qjkrdmrvz6t4xet3ax3gztt2drzk"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 386f23363c11a19412b0dbb1b05a5d4d95c7a68a OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914386f23363c11a19412b0dbb1b05a5d4d95c7a68a88ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0",
                            "type": "nulldata",
                            "spent": false,
                            "addresses": [],
                            "script": {
                                "asm": "OP_RETURN 0",
                                "hex": "6a00"
                            }
                        },
                        {
                            "amount": "0.00067473",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qza0qujtazj0lkcrhvesjxxl48lhssfk0cg88tpcm2"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 baf0724be8a4ffdb03bb330918dfa9ff7841367e OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914baf0724be8a4ffdb03bb330918dfa9ff7841367e88ac",
                                "reqsigs": 1
                            }
                        }
                    ]
                },
                {
                    "txid": "555a42395c0308d2400ce7f3c3a318614dc897a0e9dbb1c5da7c702ba6e8de57",
                    "hash": "555a42395c0308d2400ce7f3c3a318614dc897a0e9dbb1c5da7c702ba6e8de57",
                    "version": 2,
                    "size": 225,
                    "locktime": 0,
                    "time": "2019-03-15 14:34:40 UTC",
                    "timestamp": 1552660480,
                    "txins": [
                        {
                            "txout": "18dd4cd4f0fe3b27fafcb691e6ef732732e0e5ac2d6c18e534227afdd026b88a",
                            "vout": 0,
                            "amount": "0.09718644",
                            "addresses": [
                                "bchtest:qq4ptwh7k5def4jlw9rcdgkwn6nja2g24yyvsfq7n5"
                            ],
                            "script": {
                                "asm": "30440220659d64c4ce53faa6c7ed7ff2c280adc1dff7dfb00ba0a2540112b53e04e535e502201991e9a6e69fa390c9383e229eb1e7698e1ddf627ef2881a4b78867255ab0989[ALL|FORKID] 034eca4786f504829ad09cb82ff109d756577a8c9a57c2deb555e524cdbf413fe6",
                                "hex": "4730440220659d64c4ce53faa6c7ed7ff2c280adc1dff7dfb00ba0a2540112b53e04e535e502201991e9a6e69fa390c9383e229eb1e7698e1ddf627ef2881a4b78867255ab09894121034eca4786f504829ad09cb82ff109d756577a8c9a57c2deb555e524cdbf413fe6"
                            },
                            "votype": "pubkeyhash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0.09688418",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qq4ptwh7k5def4jlw9rcdgkwn6nja2g24yyvsfq7n5"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 2a15bafeb51b94d65f714786a2ce9ea72ea90aa9 OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a9142a15bafeb51b94d65f714786a2ce9ea72ea90aa988ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.0003",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qqux7gek8sg6r9qjkrdmrvz6t4xet3ax3gztt2drzk"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 386f23363c11a19412b0dbb1b05a5d4d95c7a68a OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914386f23363c11a19412b0dbb1b05a5d4d95c7a68a88ac",
                                "reqsigs": 1
                            }
                        }
                    ]
                },
            ...
        ],
        "meta": {
            "totalCount": 9,
            "index": 0,
            "limit": 50,
            "results": 9
        }
    }
    
    Info

    The Unconfirmed Transactions Endpoint returns an array of the latest transactions relayed by nodes in a blockchain that haven’t been included in any blocks.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/unconfirmed?index=0&limit=100

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    index 0 skip parameter
    limit ------- Sets the number of returned txs
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    The returned object is an array of transactions that haven’t been included in blocks, arranged in reverse chronological order (latest is first, then older transactions follow).

    Get Raw Transaction Hex By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/raw/txid/27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081")
    }
    

    Response Body

    {
        "payload": {
            "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff040318c514ffffffff03c817a804000000001976a9149708fd32bf8a32f9418ff1757e9009aaeec0103f88ac0000000000000000434104ffd03de44a6e11b9917f3a29f9443283d9871c9d743ef30d5eddcd37094b64d1b3d8090496b53256786bf5c82932ec23c3b74d9f05a6f95a8b5529352656664bac00000000000000002a6a289ea6e47d1a29fb9d2c492f27c8ee52bf42653abb5065f20b017f7cae0202396302000000c600000000000000"
        }
    }
    
    Info

    The Get Raw Transaction Endpoint returns raw transaction hex about a given transaction based on its id.

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/raw/txid/${TXID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    TXID ------- Id of the transaction in blockchain

    TXID is a string representing the id of the transaction you’re interested in querying, for example:

    27e9228e53e2c8b9cf9a8470c3176058e47e5d9f8eea824c48e127a285b49081

    The returned object contains information about the transaction in JSON format, including its raw transaction hex.

    HD Wallets

    Hierarchical Deterministic (HD) Wallets

    We also offer support for HD Wallets, which make it easy to manage multiple addresses under a single name. All HD wallet addresses are derived from a single seed. Please see BIP32 for more background on HD wallets.

    HD Wallets can be created, deleted, and have new addresses generated. However, unlike normal Wallets, addresses cannot be removed.

    When creating a wallet, one can optionally include one or more “subchain” indexes. These subchains can later be referenced when generating new addresses or sending txs. If none are provided in wallet creation, the wallet will derive & use addresses straight from the given extended pubkey. If no index is given when using the wallet with other APIs, it defaults to using the wallet’s first (sub) chain.

    In BIP32 notation, the wallet layout is m/0, m/1, … and m/i/0, m/i/1, … for each subchain i if the wallet has subchains. For example, the path of the fourth address generated is m/3 for a non-subchain wallet. The path of the fourth address at subchain index two is m/2/3. Note that this is different from the default BIP32 wallet layout.

    If you want to use BIP32 default wallet layout you can submit the extended public key of m/0’ (which can only be derived from your master private key) with subchain indexes = [0, 1]. Subchain index 0 represents the external chain (of account 0) and will discover all k keypairs that look like: m/0’/0/k. Subchain index 1 represents the internal chain (of account 0) and will discover all k keypairs in m/0’/1/k.

    If you want to use BIP 44 layout (for bch), you can submit the extended public key of m/44’/0’/0’. (which can only be derived from your master private key) with subchain indexes = [0, 1]. Subchain index 0 represents the external chain (of account 0) and will discover all k keypairs in m/44’/0’/0’/0/k. Subchain index 1 represents the internal chain (of account 0) and will discover all k keypairs in m/44’/0’/0’/1/k.

    If an address ahead of current addresses listed in an HD Wallet receives a transaction, it will be added, along with any addresses between the new address and the last used one.

    Using Hierarchical Deterministic (HD) Wallets

    HD Wallets can be leveraged by the Address API, just by using their $NAME instead of $ADDRESS. They can also be used with Events and with the Transaction API. In general, using a wallet instead of an address in an API will have the effect of batching the set of addresses contained in the wallet

    The following code examples should be considered serially; that is to say, the results will appear as if each API call were done sequentially. Also, $NAME is a string representing the name of your wallet, for example:

    alice

    Create Wallet

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/ \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "walletName" : "demohdwallet",
        "addressCount" : 5,
        "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }'
    
    
    POST /v1/bc/bch/testnet/wallets/hd HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "walletName" : "demohdwallet",
        "addressCount" : 5,
        "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }
    
    
    
    // normal wallet
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"walletName\" : \"demowallet\",\n\t\"addresses\" : [\"mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx\", \"bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste\", \"qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788\"]\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    // hd wallet
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"walletName\" : \"demohdwallet\",\n\t\"addressCount\" : 5,\n\t\"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    // normal wallet
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      walletName: 'demowallet',
      addresses: 
       ["mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx", "bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste", "qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788"] }));
    req.end();
    
    // hd wallet
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({
      walletName: 'demohdwallet',
      addressCount: 5,
      password: '8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32' }));
    req.end();
    
    
    
    <?php
    
    // normal wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "walletName" : "demowallet",
        "addresses" : ["mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx", "bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste", "qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788"]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    // hd wallet
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "walletName" : "demohdwallet",
        "addressCount" : 5,
        "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    
    ?>
    
    
    
    ####noraml wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"walletName\" : \"demowallet\",\n\t\"addresses\" : [\"mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx\", \"bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste\", \"qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788\"]\n}"
    
    response = http.request(request)
    puts response.read_body
    
    #### hd wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"walletName\" : \"demohdwallet\",\n\t\"addressCount\" : 5,\n\t\"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"walletName\" : \"demohdwallet\",\n\t\"addressCount\" : 5,\n\t\"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/wallets/hd", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    // normal wallet
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\\n\t\"walletName\" : \"demowallet\",\n\t\"addresses\" : [\"mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx\", \"bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste\", \"qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788\"]\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    // hd wallet
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"walletName\" : \"demohdwallet\",\n\t\"addressCount\" : 5,\n\t\"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    // notmal wallet
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets"
    
        payload := strings.NewReader("{\n\t\"walletName\" : \"demowallet\",\n\t\"addresses\" : [\"mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx\", \"bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste\", \"qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788\"]\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    // hd wallet
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd"
    
        payload := strings.NewReader("{\n\t\"walletName\" : \"demohdwallet\",\n\t\"addressCount\" : 5,\n\t\"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Response Body

    // normal wallet
    {
      "payload": {
          "walletName": "demowallet",
          "addresses": [
              "bchtest:qpfpec7klx2x2mfn65n873jqcas395y9jcfl64ed4x",
              "bchtest:qq686unm4724lfjh09p4n30n3k649yj56uvyf54ste",
              "bchtest:qpfgn0raa4ehdnekslj728qhmetdf9cndctn4jp788"
          ],
          "legacy": [
              "mo18K6Yfg6stmE7FGZZYFbkKT7LWSG5HBx",
              "mkJViFersfdPuvKSM2s23mutdpGKJgdwhS",
              "mo3NhsQAUDbP3FLEWMox9rj4Lc4jpmvLKe"
          ]
      }
    }
    // hd wallet
    {
      "payload": {
          "walletName": "demohdwallet",
          "addresses": [
              {
                  "address": "bchtest:qqvy55z9y0cj0ypa2y9t6lfmsykc8gkxvvthgv6lh8",
                  "legacy": "mhjPY46pwZ1RAjGciwA47yxKR5XC4pRDk4",
                  "path": "M/0H/0/0"
              },
              {
                  "address": "bchtest:qpteymj7zhxtaa8tqje2hvj4etazga2rlg4w3skmr0",
                  "legacy": "moVzVxQU3b3JE6cJzCBvkhBrSChptHCfL5",
                  "path": "M/0H/0/1"
              },
              {
                  "address": "bchtest:qramnah5gyzxhxykla043jup40q4w259wgetxx6wa7",
                  "legacy": "n4TxgFjdZ1NFMMC5Dm2pD7KJi92eeiLLqE",
                  "path": "M/0H/0/2"
              },
              {
                  "address": "bchtest:qr32leah53j59fx0muwue94hqnzq483vlvttfaqln0",
                  "legacy": "n2BZjWcwiSo9egTqFo6VLwDC4USR8LhUV7",
                  "path": "M/0H/0/3"
              },
              {
                  "address": "bchtest:qzdp2cfa5kn4f8tw850jtwqmgschxlwlqyrl0gqg89",
                  "legacy": "muZfy6PVtopjR9KGAV8oSTALkEZA31wk8G",
                  "path": "M/0H/0/4"
              }
          ]
      }
    }
    
    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    HD_WALLET_NAME ------- Wallet name
    ADDRESSES ------- Array of addresses that will be added to wallet
    ADDRESS_COUNT ------- Number of addresses that should be generated in the new wallet
    PASSWORD ------- Wallet password
    Request Wallet Object

    { "walletName" : ${HD_WALLET_NAME}, "addresses" : ${ADDRESSES} }

    Request HD Wallet Object

    { "walletName" : ${HD_WALLET_NAME}, "addressCount" : ${ADDRESS_COUNT}, "password" : ${PASSWORD} }

    This endpoint allows you to create a new wallet, by POSTing a partially filled out Wallet or HDWallet object, depending on the endpoint.

    For HD wallets, you must include HD_WALLET_NAME, the ADDRESS_COUNT and the PASSWORD attributes.

    If successful, it will return a Wallet or HDWallet object with the data you requested.

    List My Wallets

    Sample Data

    curl -X GET \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd \
      -H 'Content-Type: application/json'
      -H 'X-API-Key: my-api-key'
    
    
    GET /v1/bc/bch/testnet/wallets/hd HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd",
      "method": "GET",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    // normal wallet
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    // hd wallet
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    // normal wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    // hd wallet
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    
    
    ####noraml wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    #### hd wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    headers = {
      "Content-Type": "application/json",
      "X-API-Key", "my-api-key"
    }
    
    conn.request("GET", "/v1/bc/bch/testnet/wallets/hd", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    // normal wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets")
      .get()
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    // hd wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd")
      .get()
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    // notmal wallet
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    // hd wallet
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    // normal wallet
    {
      "payload": [
              "demowallet"
      ],
      "meta": {
          "totalCount": 1,
          "results": 1
      }
    }
    
    // hd wallet
    {
      "payload":  [
              "demohdwallet",
              "demowallet"
      ],
      "meta": {
          "totalCount": 2,
          "results": 2
      }
    }
    
    HTTP Request

    GET /v1/bc/bch/${NETWORK}/wallets/hd

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    This endpoint returns a string array ($NAMEARRAY) of active wallet names (both normal ор HD) under the token you queried. You can then query detailed information on individual wallets (via their names) by leveraging the Get Wallet Endpoint.

    Get Wallet Details

    Sample Data

    curl -X GET \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    GET /v1/bc/bch/testnet/wallets/hd/demohdwallet HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    // normal wallet
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/demowallet",
      "method": "GET",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    // hd wallet
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet",
      "method": "GET",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    // normal wallet
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/demowallet",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    // hd wallet
    var http = require("http");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd/demohdwallet",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    // normal wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/demowallet');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    // hd wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    
    ####noraml wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/demowallet")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    #### hd wallet
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    headers = {
      "Content-Type": "application/json",
      "X-API-Key", "my-api-key"
    }
    
    conn.request("GET", "/v1/bc/bch/testnet/wallets/hd/demohdwallet", headers=headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    // normal wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/demowallet")
      .get()
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    // hd wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet")
      .get()
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    // notmal wallet
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/demowallet"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    // hd wallet
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    // normal wallet
    {
      "payload": {
          "walletName": "demowallet",
          "addresses": [
              {
                  "address": "bchtest:qz2ul4lrcamlpkasrpeaxskctfva3erskuy7rrtps7",
                  "legacy": "muB5xqteXnju8SodZ1AyXsde1R11DHksTf",
                  "balance": "0.00012"
              },
              {
                  "address": "bchtest:qruj3pml7e5sk0a0pa8yprpuasg5qknucvtp00p8d6",
                  "legacy": "n4EP6qwj6G1JDTatCWZMNBrs6hQr2TDAMG",
                  "balance": "0.00000000"
              },
              {
                  "address": "bchtest:qpdtamqwcnnzurxj4dqu7wtxlwrlj2lljs4x9x85m3",
                  "legacy": "monmppSsRzZSUBdVqde74d6x4f5UtQv3ka",
                  "balance": "0.00000000"
              }
          ],
          "totalBalance": "0.00012"
      },
      "meta": {
          "totalCount": 3,
          "limit": 50,
          "results": 3
      }
    }
    
    // hd wallet
    {
        "payload": {
            "walletName": "demohdwallet",
            "addresses": [
                {
                    "address": "bchtest:qr6wprehdzwsjnucc8uhh00xk8n002dtnv59jtwt0d",
                    "legacy": "n3qkBXM2xufzcJvwEjGzHDYTRWLFNJ9Vmx",
                    "path": "M/0H/0/0",
                    "balance": "0.00000000"
                },
                {
                    "address": "bchtest:qzsdat3y42xswcqj9m3udcdjx3ygg2sjhg93mtypjk",
                    "legacy": "mvBZAqmhyMbqenJgQtZRRxDz1ggVArf5Ws",
                    "path": "M/0H/0/1",
                    "balance": "0.00000000"
                },
                {
                    "address": "bchtest:qr2k52w33898hth7kn9caumnnhxl730ffs2dj2quv7",
                    "legacy": "mzyPQGnhPwj7kZNVpaT2nBrto4bmjKfMck",
                    "path": "M/0H/0/2",
                    "balance": "0.00000000"
                },
                {
                    "address": "bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut",
                    "legacy": "msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN",
                    "path": "M/0H/0/3",
                    "balance": "0.00453718"
                },
                {
                    "address": "bchtest:qqlaap8z3pxefkq2kafh7n8uh4zj8j4khuaq3dqvpt",
                    "legacy": "mmLfS33wwBNtucEru7BFSeTS7WEr4F871n",
                    "path": "M/0H/0/4",
                    "balance": "0.00000000"
                }
            ],
            "totalBalance": "0.00453718"
        }
    }
    
    HTTP Request

    GET /v1/bc/bch/${NETWORK}/wallets/hd/${HD_WALLET_NAME}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    HD_WALLET_NAME ------- Wallet name

    This endpoint returns a Wallet or HDWallet based on its HD_WALLET_NAME.

    Generate Address in HD Wallet

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate \
      -H 'content-type: application/json' \
      -H 'authorization: my-api-key' \
      -d '{
        "addressCount": 3,
        "password": "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }'
    
    
    POST /v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate HTTP/1.1
    Host: api.cryptoapis.io
    X-API-Key: my-api-key
    Content-Type: application/json
    
    {
        "addressCount": 3,
        "password": "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate",
      "method": "POST",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      },
      "processData": false,
      "data": "{\n\t\"addressCount\": 3,\n\t\"password\": \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "port": null,
      "path": "/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ addressCount: 3, password: '8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32' }));
    req.end();
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'content-type' => 'application/json',
      'authorization' => 'my-api-key'
    ));
    
    $request->setBody('{
        "addressCount": 3,
        "password": "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["authorization"] = 'my-api-key'
    request["content-type"] = 'application/json'
    request.body = "{\n\t\"addressCount\": 3,\n\t\"password\": \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    import http.client
    
    conn = http.client.HTTPSConnection("api.cryptoapis.io")
    
    payload = "{\n\t\"addressCount\": 3,\n\t\"password\": \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}"
    
    headers = {
        'authorization': "my-api-key",
        'content-type': "application/json"
        }
    
    conn.request("POST", "/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"addressCount\": 3,\n\t\"password\": \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate")
      .post(body)
      .addHeader("authorization", "my-api-key")
      .addHeader("content-type", "application/json")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate"
    
        payload := strings.NewReader("{\n\t\"addressCount\": 3,\n\t\"password\": \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("authorization", "my-api-key")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
        "payload": {
            "walletName": "demohdwallet",
            "addresses": [
                {
                    "address": "mrNAYRddSnDGBuxPXZ1cXXgyuzG7pyUmW9",
                    "legacy": "mrNAYRddSnDGBuxPXZ1cXXgyuzG7pyUmW9",
                    "path": "M/0H/0/5"
                },
                {
                    "address": "mrDKZqEwnNrP4ntqhLHmj4TJXjD9oC1gBR",
                    "legacy": "mrDKZqEwnNrP4ntqhLHmj4TJXjD9oC1gBR",
                    "path": "M/0H/0/6"
                },
                {
                    "address": "n1fKuJRZqNiXE7t3Ds8aqqDFdF8DxHrBda",
                    "legacy": "n1fKuJRZqNiXE7t3Ds8aqqDFdF8DxHrBda",
                    "path": "M/0H/0/7"
                }
            ]
        }
    }
    
    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/${HD_WALLET_NAME}/addresses/generate

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    HD_WALLET_NAME ------- Wallet name
    Request HD Wallet Object

    { "addressCount" : ${ADDRESS_COUNT}, "password" : ${ENCRYPTED_PASSWORD} } This endpoint allows you to generate a new address associated with the HD_WALLET_NAME wallet, similar to the Generate Address Endpoint. If successful, it will return the newly created addresses.

    Delete Wallet
    curl -X DELETE \
      https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    DELETE /v1/bc/bch/mainnet/wallets/hd/demohdwallet HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet",
      "method": "DELETE",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    // normal wallet
    var http = require("http");
    
    var options = {
      "method": "DELETE",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/wallets/demowallet",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    // hd wallet
    var http = require("http");
    
    var options = {
      "method": "DELETE",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/wallets/hd/demohdwallet,
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    // normal wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/demowallet');
    $request->setMethod(HTTP_METH_DELETE);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    // hd wallet
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet');
    $request->setMethod(HTTP_METH_DELETE);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("DELETE", "/v1/bc/bch/mainnet/wallets/hd/demohdwallet", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    
    // normal wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/demowallet")
      .delete(null)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    // hd wallet
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet")
      .delete(null)
      .addHeader("content-type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    // normal wallet
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/demowallet"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    // hd wallet
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/demohdwallet"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("content-type", "application/json")
        req.Header.Add("cache-control", "no-cache")
        req.Header.Add("postman-token", "d953336f-8728-f3b8-9bef-ae6892018f05")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
      "payload": {
          "message": "Wallet demowallet was successfully deleted!"
      }
    }
    
    {
      "payload": {
          "message": "Wallet demohdwallet was successfully deleted!"
      }
    }
    
    HTTP Request

    DELETE /v1/bc/bch/${NETWORK}/wallets/hd/${HD_WALLET_NAME}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    HD_WALLET_NAME ------- Wallet name

    This endpoint deletes the Wallet or HD Wallet with HD_WALLET_NAME.

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    HD_WALLET_NAME ------- Wallet name
    Import Address as an HD Wallet

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import\
      -H 'content-type: application/json' \
      -H 'authorization: my-api-key' \
      -d '{
            "walletName": "testImportWallet",
            "password": "SECRET123456",
            "privateKey": "8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b",
            "address": "mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz"
        }'
    
    
    POST /v1/bc/bch/testnet/wallets/hd/import HTTP/1.1
    Host: api.cryptoapis.io
    X-API-Key: my-api-key
    Content-Type: application/json
    
    {
        "walletName": "testImportWallet",
        "password": "SECRET123456",
        "privateKey": "8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b",
        "address": "mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import",
      "method": "POST",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      },
      "processData": false,
      "data": "{\n    \"walletName\": \"testImportWallet\",\n    \"password\": \"SECRET123456\",\n    \"privateKey\": \"8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b\",\n    \"address\": \"mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    // hd wallet
    var http = require("https");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd/import,
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ walletName: 'testImportWallet',
      password: 'SECRET123456',
      privateKey: '8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b',
      address: 'mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz' }));
    req.end();
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'content-type' => 'application/json',
      'authorization' => 'my-api-key'
    ));
    
    $request->setBody('{
        "walletName": "testImportWallet",
        "password": "SECRET123456",
        "privateKey": "8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b",
        "address": "mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Post.new(url)
    request["authorization"] = 'my-api-key'
    request["content-type"] = 'application/json'
    request.body = "{\n    \"walletName\": \"testImportWallet\",\n    \"password\": \"SECRET123456\",\n    \"privateKey\": \"8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b\",\n    \"address\": \"mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPSConnection("api.cryptoapis.io")
    
    payload = "{\n    \"walletName\": \"testImportWallet\",\n    \"password\": \"SECRET123456\",\n    \"privateKey\": \"8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b\",\n    \"address\": \"mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz\"\n}"
    
    headers = {
        'authorization': "my-api-key",
        'content-type': "application/json"
        }
    
    conn.request("POST", "/v1/bc/bch/testnet/wallets/hd/demohdwallet/addresses/generate", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n    \"walletName\": \"testImportWallet\",\n    \"password\": \"SECRET123456\",\n    \"privateKey\": \"8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b\",\n    \"address\": \"mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz\"\n}");
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import")
      .post(body)
      .addHeader("authorization", "my-api-key")
      .addHeader("content-type", "application/json")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/import"
    
        payload := strings.NewReader("{\n    \"walletName\": \"testImportWallet\",\n    \"password\": \"SECRET123456\",\n    \"privateKey\": \"8aeb39b5f9b0xxxxxxxc7001c1cecc112712c9448b\",\n    \"address\": \"mv79B1CSYTzVJPH1jky6wESrMSMZ7Nj2nz\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("authorization", "my-api-key")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
        "payload": {
            "walletName": "testImportWallet",
            "addresses": [
                {
                    "address": "bchtest:qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux"
                }
            ]
        }
    }
    
    
    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/import

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    Request HD Wallet Object

    { "password" : ${ENCRYPTED_PASSWORD}, "walletName": ${HD_WALLET_NAME}, "privateKey": ${ADDRESS_PRIVATE_KEY}, "address": ${ADDRESS} }

    This endpoint allows you to import a BCH address. Although it is only an address it will be treated as an HDwallet. Therefore, with the imported wallet users can make transactions and payment forwardings. Moreover, imported wallets can be listed and deleted.

    Transactions

    Crypto APIs Transaction API allows you to create and propagate your own transactions, including multisignature transactions, and embed data on the blockchain—all based on the coin/chain resource you’ve selected for your endpoints.

    If you’re new to blockchains, the idea of transactions is relatively self-explanatory. Here’s what’s going on underneath the hood: a transaction takes previous “unspent transaction outputs” (also known as UTXOs) as “transaction inputs” and creates new “locking scripts” on those inputs such that they are “sent” to new addresses (to become new UTXOs). While most of these public addresses are reference points for single private keys that can “unlock” the newly created UTXOs, occasionally they are sent to more exotic addresses through pay-to-script-hash, typically multisignature addresses.

    Generally speaking, UTXOs are generated from previous transactions (except for Coinbase inputs).

    Prepare a Transaction
    Info

    Using Crypto APIs, you can push transactions to blockchains one of two ways:

    Use our two-endpoint process outlined below, wherein we generate a TXSkeleton based on your input address, output address, and value to transfer. In either case, for security reasons, we never take possession of your private keys. We do use private keys with our Microtransaction API, but they are for low-value transactions and we discard them immediately from our servers’ memory.

    New Transaction Endpoint

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
          "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
          "value": 0.00309
        }],
    
        "fee":  {
          "value": 0.00023141
        }
    }'
    
    
    POST /v1/bc/bch/testnet/txs/create HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
            "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
            "value": 0.00309
        }],
    
        "fee":  {
            "value": 0.00023141
        }
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/create",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ inputs: 
       [ { address: 'my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE',
           value: 0.00309 } ],
      outputs: 
       [ { address: 'mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP',
           value: 0.00309 } ],
      fee: { value: 0.00023141 } }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
            "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
            "value": 0.00309
        }],
    
        "fee":  {
            "value": 0.00023141
        }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/create, payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/create"
    
        payload := strings.NewReader("{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Response Body

    {
      "payload": {
         "hex": "020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000"
      }
    }
    

    To use Crypto APIs two-endpoint transaction creation tool, first you need to provide the input address(es), output address, and value to transfer (in litecoin). Provide this in a partially-filled out TX request object.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/create

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    As you can see from the code example, you only need to provide a single public address within the addresses array of both the input and output of your TX request object. You also need to fill in the value with the amount you’d like to transfer from one address to another.

    Required fields are: { "inputs": [{ "address": "...", "value": ... }, ...], "outputs": [{ "address": "...", "value": ... }, ...], "fee": { "address": "...", "value": ... } }

    Optional fields include: { "locktime": ..., "data": "..." } You need to include data (string) field only if you want to send messages/metadata with the transaction. Locktime (integer) has a default value of zero. Use locktime if a transaction should be delayed to a specific time.

    As a return object, you’ll receive a JSON containing a slightly-more complete TX alongside data you need to sign in the tosign array. You’ll need this object for the next steps of the transaction creation process.

    Validating the Data to Sign

    For the extra cautious, you can protect yourself from a potential malicious attack on Crypto APIs by validating the data we’re asking you to sign. Unfortunately, it’s impossible to do so directly, as pre-signed signature data is hashed twice using SHA256. To get around this, set the includeToSignTx URL flag to true. The optional tosign_tx array will be returned within the JSON, which you can use in the following way:

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "hex":"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000",
        "wifs" : [
                  "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }'
    
    
    POST /v1/bc/bch/testnet/txs/sign HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "hex":"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000",
        "wifs" : [
                  "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n    \"hex\":\"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\",\n    \"wifs\" : [\n              \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/txs/sign",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ hex: '020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000',
      wifs: [ 'cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs' ] }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "hex":"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000",
        "wifs" : [
                  "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n    \"hex\":\"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\",\n    \"wifs\" : [\n              \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n    \"hex\":\"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\",\n    \"wifs\" : [\n              \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/sign", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n    \"hex\":\"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\",\n    \"wifs\" : [\n              \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/sign"
    
          payload := strings.NewReader("{\n    \"hex\":\"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea70000000000ffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\",\n    \"wifs\" : [\n              \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Response Body

    {
      "payload": {
          "hex": "020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000",
          "complete": true
      }
    }
    
    Info

    The Sign a Transaction Endpoint allows users to sign a raw transaction.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/sign

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    The returned object is a hexadecimal string that represents the signed transaction. This hexadecimal is used by the Broadcast a Signed Transaction Endpoint in order to broadcast the transaction into the Litecoin Blockchain.

    Broadcast a Signed Transaction

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send/ \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "hex" : "020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000"
    }'
    
    
    POST /v1/bc/bch/testnet/txs/send HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "hex" : "020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"hex\" : \"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/txs/send",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ hex: '020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "hex" : "020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"hex\" : \"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"hex\" : \"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/send", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"hex\" : \"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/send"
    
        payload := strings.NewReader("{\n\t\"hex\" : \"020000000133c23cd5a0a74e5775fc60cbd0838f032968e1e88f64acb951ffd8f7b9a4cea7000000006b4830450221009fee30738e3ba7a275d025edfb2ccf1c42010561cad59472d7f5765d83f646780220214ebaacae65c590d1aee7e23dde614e35d423423173ba7ef4794070b1aa4607412103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0208b70400000000001976a914392f49c5a9b85d4f3de6996ef88af204d3ab425688acd3300a00000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    
    

    Response Body

    {
      "payload": {
          "txid": "e62bf368846c473adb9e9aa6ec85437af6471af654b2d1150254a4744b3c656f"
      }
    }
    

    Transaction Send Endpoint allows users to broadcast the signed transaction to the Litecoin Blockchain.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/send

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)

    If broadcasting is successful, you’ll receive a JSON with the hash of the unconfirmed transaction.

    Prepare, Sign and Broadcast a Transaction

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "createTx": { 
                "inputs": [{
                "address": "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf",
                "value": 0.00109
            }],
            "outputs": [{
                "address": "qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux",
                "value": 0.00109
            }],
    
            "fee":  {
                "value": 0.00023141
            }
        }, 
         "wifs" : [
                "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }'
    
    POST /v1/bc/bch/testnet/txs/new HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "createTx": { 
                "inputs": [{
                "address": "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf",
                "value": 0.00109
            }],
            "outputs": [{
                "address": "qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux",
                "value": 0.00109
            }],
    
            "fee":  {
                "value": 0.00023141
            }
        }, 
         "wifs" : [
                "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"createTx\": { \n\t\t\t\"inputs\": [{\n\t\t\t\"address\": \"bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf\",\n\t\t\t\"value\": 0.00109\n\t\t}],\n\t\t\"outputs\": [{\n\t\t\t\"address\": \"qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux\",\n\t\t\t\"value\": 0.00109\n\t\t}],\n\t\t\n\t\t\"fee\":  {\n\t\t\t\"value\": 0.00023141\n\t\t}\n\t}, \n\t \"wifs\" : [\n            \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/new",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ createTx: 
       { inputs: 
          [ { address: 'bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf',
              value: 0.00109 } ],
         outputs: 
          [ { address: 'qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux',
              value: 0.00109 } ],
         fee: { value: 0.00023141 } },
      wifs: [ 'cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs' ] }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "createTx": { 
                "inputs": [{
                "address": "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf",
                "value": 0.00309
            }],
            "outputs": [{
                "address": "qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux",
                "value": 0.00309
            }],
    
            "fee":  {
                "value": 0.00023141
            }
        }, 
         "wifs" : [
                "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs"
        ]
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"createTx\": { \n\t\t\t\"inputs\": [{\n\t\t\t\"address\": \"bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\"outputs\": [{\n\t\t\t\"address\": \"qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\n\t\t\"fee\":  {\n\t\t\t\"value\": 0.00023141\n\t\t}\n\t}, \n\t \"wifs\" : [\n            \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"createTx\": { \n\t\t\t\"inputs\": [{\n\t\t\t\"address\": \"bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\"outputs\": [{\n\t\t\t\"address\": \"qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\n\t\t\"fee\":  {\n\t\t\t\"value\": 0.00023141\n\t\t}\n\t}, \n\t \"wifs\" : [\n            \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/new", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"createTx\": { \n\t\t\t\"inputs\": [{\n\t\t\t\"address\": \"bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\"outputs\": [{\n\t\t\t\"address\": \"qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\n\t\t\"fee\":  {\n\t\t\t\"value\": 0.00023141\n\t\t}\n\t}, \n\t \"wifs\" : [\n            \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/new"
    
        payload := strings.NewReader("{\n\t\"createTx\": { \n\t\t\t\"inputs\": [{\n\t\t\t\"address\": \"bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\"outputs\": [{\n\t\t\t\"address\": \"qzsq3lqt2s08635y54h96la8002jy5tvlshrnskeux\",\n\t\t\t\"value\": 0.00309\n\t\t}],\n\t\t\n\t\t\"fee\":  {\n\t\t\t\"value\": 0.00023141\n\t\t}\n\t}, \n\t \"wifs\" : [\n            \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\"\n    ]\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Response Body

    {
      "payload": {
          "txid":"dfd390576fefa3aa372fc14549dc75c3c3f6a6bf657502c45f9848efde2ea0dc"
      }
    }
    

    The Prepare, Sign and Broadcast a Transaction Endpoint combines the other three endpoints: Create, Sign and Send Endpoints. Users should provide the inputs and outputs fields with the corresponding data, as well as the fee and the wifs(private ECDSA keys) of the addresses. Therefore, the endpoint creates, signs and broadcasts the new transaction to the BitcoinCash Blockchain. For more information, see the examples.

    Users can set two optional fields within the createTx object: data and locktime.

    "createTx": { 
                  "inputs": [ {
                    "address": "...",
                    "value": ...
                  }],
                  "outputs": [{
                    "address": "...",
                    "value": ...
                  }],
                  "fee":  {
                    "address": "...",
                    "value": ...
                  },
                  "locktime": ...,
                  "data": "CRYPTOAPISROCKS"
                }
    

    You need to include data (string) field only if you want to send messages/metadata with the transaction. Locktime (integer) has a default value of zero. Use locktime if a transaction should be delayed to a specific time.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/new

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    Prepare, Sign and Broadcast a Transaction Using HDWallet

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
            "walletName": "demohdwallet",
            "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
            "inputs": [{
              "address":"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN",
              "value": 0.007
            }],
            "outputs": [{
              "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
              "value": 0.007
            }],
            "fee":  {
              "address" : "bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut",
              "value": 0.00023141
            }
        }'
    
    POST /v1/bc/bch/mainnet/txs/hdwallet HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "walletName": "demohdwallet",
        "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
        "inputs": [{
          "address":"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN",
          "value": 0.007
        }],
        "outputs": [{
          "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
          "value": 0.007
        }],
        "fee":  {
          "address" : "bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut",
          "value": 0.00023141
        }
      }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n        \"inputs\": [{\n          \"address\":\"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN\",\n          \"value\": 0.007\n        }],\n        \"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n        \"fee\":  {\n          \"address\" : \"bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut\",\n          \"value\": 0.00023141\n        }\n    }"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/txs/hdwallet",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ walletName: 'demohdwallet',
      password: '8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32',
      inputs: [ { address: 'msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN', value: 0.007 } ],
      outputs: [ { address: 'my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE', value: 0.007 } ],
      fee: 
       { address: 'bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut',
         value: 0.00023141 } }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "walletName": "demohdwallet",
        "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
        "inputs": [{
          "address":"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN",
          "value": 0.007
        }],
        "outputs": [{
          "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
          "value": 0.007
        }],
        "fee":  {
          "address" : "bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut",
          "value": 0.00023141
        }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n        \"inputs\": [{\n          \"address\":\"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN\",\n          \"value\": 0.007\n        }],\n        \"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n        \"fee\":  {\n          \"address\" : \"bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut\",\n          \"value\": 0.00023141\n        }\n    }"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    payload = "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n        \"inputs\": [{\n          \"address\":\"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN\",\n          \"value\": 0.007\n        }],\n        \"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n        \"fee\":  {\n          \"address\" : \"bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut\",\n          \"value\": 0.00023141\n        }\n    }"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/mainnet/txs/hdwallet", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n        \"inputs\": [{\n          \"address\":\"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN\",\n          \"value\": 0.007\n        }],\n        \"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n        \"fee\":  {\n          \"address\" : \"bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut\",\n          \"value\": 0.00023141\n        }\n    }");
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/hdwallet"
    
        payload := strings.NewReader("{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n        \"inputs\": [{\n          \"address\":\"msD7uHJ4p1MTuca6sa7gzks1bf8wmzvgSN\",\n          \"value\": 0.007\n        }],\n        \"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n        \"fee\":  {\n          \"address\" : \"bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut\",\n          \"value\": 0.00023141\n        }\n    }")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Response Body

    {
        "payload": {
            "txid": "2718b85a1b08239391c8f8554f2def37d722e73e6fed92bd0fa34c797c9c5e56"
        }
    }
    

    Prepare, Sign and Broadcast a Transaction Using HDWallet Endpoint provides the possibility to create, sign and send new transactions using your HDWallet. The mandatory fields are: walletName, password, outputs and fee (see example). There are a few optional fields, such as: inputs, fee address and locktime. If input addresses are not included, then the system will automatically choose addresses from the wallet. However, if included, a list of addresses from the wallet and the values should be specified. Fee address is optional and if is not specified the fee will be proportionally distributed among the input addresses.

    Two optional fields are available:

    {
      "locktime": ...,
      "data": "..."
    }
    

    You need to include data (string) field only if you want to send messages/metadata with the transaction. Locktime (integer) has a default value of zero. Use locktime if a transaction should be delayed to a specific time.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/hdwallet

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    See the example where the complete JSON object request (mandatory* and optional fields inlcuded) is shown.

    The complete JSON object request

    {
        "walletName*": "walletName",
        "password*" : "...",
        "inputs":[{
            "address":"n...",
            "value":0.1
        },{
            "address":"n...",
            "value":0.3
        }],
        "outputs*": [{
            "address": "m...",
            "value": 0.4
        }],
    
        "fee":  {
            "address": "n...",
            "value*": 0.0002314
        },
        "locktime": 0,
      "data": "CRYPTOAPISROCKS"
    }
    
    Decode a Raw Transaction

    Sample Data

    
    curl -X POST \
     https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "hex": "0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000"
    }'
    
    
    
    POST /v1/bc/bch/mainnet/txs/decode HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "hex": "0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"hex\": \"0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/txs/decode",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ hex: '0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "hex": "0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"hex\": \"0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"hex\": \"0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/mainnet/txs/decode", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"hex\": \"0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/decode"
    
        payload := strings.NewReader("{\n\t\"hex\": \"0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
      "payload": {
          "txid": "02ec4a1f1632023e5e36b20065e387a141577862cc7876d4a5ee54eebb1d4334",
          "hash": "02ec4a1f1632023e5e36b20065e387a141577862cc7876d4a5ee54eebb1d4334",
          "size": 192,
          "version": 1,
          "locktime": 0,
          "blockhash": "00000000000000000158b23dc50913a945d2306e17f99def136e425200bf3340",
          "blockNumber": 573893,
          "confirmations": 32188,
          "time": "2019-03-15 12:02:48 UTC",
          "vin": [
              {
                  "txid": "a6d1550d176e5788b798dcd177e71699c5b0782482d5372ee06febbd721a70c5",
                  "sequence": 4294967295,
                  "vout": 1,
                  "scriptSig": {
                      "asm": "3045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c[ALL|FORKID] 02bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cad",
                      "hex": "483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cad"
                  }
              }
          ],
          "vout": [
              {
                  "value": "1.21886098",
                  "n": 0,
                  "scriptPubKey": {
                      "asm": "OP_DUP OP_HASH160 aaa2a872b9a6dd0d9004fe439cc16d0b8a534b49 OP_EQUALVERIFY OP_CHECKSIG",
                      "hex": "76a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac",
                      "reqSigs": 1,
                      "type": "pubkeyhash",
                      "addresses": [
                          "bitcoincash:qz4292rjhxnd6rvsqnly88xpd59c556tfyup7mppga"
                      ]
                  }
              }
          ]
      }
    }
    
    Info

    We also offer the ability to decode raw transactions without sending propagating them to the network; perhaps you want to double-check another client library or confirm that another service is sending proper transactions.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/decode

    Request Object

    { "hex": "${HEX}" }

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    HEX ------- hex of raw transaction

    $HEX is a hex-encoded raw representation of your transaction, for example:

    0100000001c5701a72bdeb6fe02e37d5822478b0c59916e777d1dc98b788576e170d55d1a6010000006b483045022100a93330021b1ebd1cc0ae797365b8ba8788128a0330e09deb9a6e9fa04d3f923702203f634e4797571a796ff1bff380c5c98ce038ecff8638109d67fcb6a743ec339c412102bbdf59ece62b6a1d39de3f41d5186846b865aeeb538d7142756150fdbf537cadffffffff0192d54307000000001976a914aaa2a872b9a6dd0d9004fe439cc16d0b8a534b4988ac00000000

    If it succeeds, you’ll receive your decoded TX object.

    Refund a Transaction

    Sample Data

    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "txid" : "66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab",
        "wif": "cd123QthW......M35vSTy9xGEKbCbaJ"
    }'
    
    POST /v1/bc/bch/testnet/txs/refund HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "txid" : "66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab",
        "wif": "cd123QthW......M35vSTy9xGEKbCbaJ"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"txid\" : \"66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab\",\n\t\"wif\": \"cd123QthW......M35vSTy9xGEKbCbaJ\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/refund",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ txid: '66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab',
      wif: 'cd123QthW......M35vSTy9xGEKbCbaJ'}));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "txid" : "66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab",
        "wif": "cd123QthW......M35vSTy9xGEKbCbaJ"
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"txid\" : \"66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab\",\n\t\"wif\": \"cd123QthW......M35vSTy9xGEKbCbaJ\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"txid\" : \"66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab\",\n\t\"wif\": \"cd123QthW......M35vSTy9xGEKbCbaJ\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/refund", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"txid\" : \"66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab\",\n\t\"wif\": \"cd123QthW......M35vSTy9xGEKbCbaJ\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/refund"
    
        payload := strings.NewReader("{\n\t\"txid\" : \"66fe6c6b8027a5475457043d851123aee8e902bec6995e7e153b70eb0da906ab\",\n\t\"wif\": \"cd123QthW......M35vSTy9xGEKbCbaJ\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Response Body

    {
      "payload": {
          "txid":"187703315538d942affdb5554238c8ac20070ce69ac39a03a0acd6254c56f454"
      }
    }
    

    The Refund a Transaction Endpoint allows users easily to return the amount in bch they have received from an unknown source. Only two fields are required: the txid of the transcation and the wif of the recipient address (see examples). There is an optional field fee. If fee field is not set the system will set the recommended fee from the Transaction Fee Endpoint.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/refund

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    Transactions Fees

    Every transaction on Blockchain has fee, the fee is not a fixed amount or % of the amount. The fee depends mainly on how much the network is overloaded. The higher fee you pay, the faster your transaction will be mined. You can use our different endpoints to get information all the time about fees and decide what fee you would set for your transactions.

    Transaction Size
    Info

    Using Crypto APIs, you can calculate the approximate size of a standard transaction.

    Required fields are: { "inputs": [{ "address": "...", "value": ... }, ...], "outputs": [{ "address": "...", "value": ... }, ...], "fee": { "address": "...", "value": ... } }

    Optional fields include: { "locktime": ..., "data": "..." }

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
          "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
          "value": 0.00309
        }],
        "fee":  {
          "value": 0.00023141
        }
    }'
    
    
    POST /v1/bc/bch/testnet/txs/size HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
            "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
            "value": 0.00309
        }],
    
        "fee":  {
            "value": 0.00023141
        }
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/txs/size",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ inputs: 
       [ { address: 'my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE',
           value: 0.00309 } ],
      outputs: 
       [ { address: 'mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP',
           value: 0.00309 } ],
      fee: { value: 0.00023141 } }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "inputs": [{
        "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "value": 0.00309
        }],
        "outputs": [{
            "address": "mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP",
            "value": 0.00309
        }],
    
        "fee":  {
            "value": 0.00023141
        }
    }');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/txs/size, payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/txs/size"
    
        payload := strings.NewReader("{\n\t\"inputs\": [{\n\t\"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n\t\"value\": 0.00309\n\t}],\n\t\"outputs\": [{\n\t\t\"address\": \"mkjKTdPRKX2CuH1fQHdcaWF8tYDLpNftKP\",\n\t\t\"value\": 0.00309\n\t}],\n\t\n\t\"fee\":  {\n\t\t\"value\": 0.00023141\n\t}\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Response Body

    {
        "payload": {
            "tx_size_bytes": 119
        }
    }
    
    HTTP Request

    POST /v1/bc/bch/${NETWORK}/txs/size

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    Transaction Size for HD Wallet
    Info

    Using this endpoint you can get the approximate size of a transaction in HD wallet.

    Required fields are: { "walletName": "......", "password" : "......", "outputs": [{ "address": "......", "value": ........ }] }

    Optional fields include: { "locktime": ..., "data": "...", "fee": { "address" : "bchtest:qzqyyz4m5v6v4wthvadmfwxdw4mzlmusfyyrnk73ut", "value": 0.00023141 } }

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
            "walletName": "demohdwallet",
            "password": "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
            "outputs": [
              {
                "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
                "value": 0.007
              }
            ]
          }'
    
    
    POST /v1/bc/bch/testnet/wallets/hd/txs/size HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
            "walletName": "demohdwallet",
            "password" : "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
            "outputs": [{
            "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
            "value": 0.007 
        }]
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd/txs/size",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify("{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}");
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
    "walletName": "demohdwallet",
    "password": "8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32",
    "outputs": [{
    "address": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
    "value": 0.007
    }]}');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "/v1/bc/bch/testnet/wallets/hd/txs/size, payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, ""{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}"");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/txs/size"
    
        payload := strings.NewReader("{\n        \"walletName\": \"demohdwallet\",\n        \"password\" : \"8a0690d2cd4fad1371090225217bb1425b3700210f51be6111eb225d5142ac32\",\n\"outputs\": [{\n          \"address\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n          \"value\": 0.007\n        }],\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Response Body

    {
        "payload": {
            "tx_size_bytes": 238
        }
    }
    
    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/txs/size

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    Get Transactions Fee

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/bch/mainnet/txs HTTP/1.1
    Host: api.cryptoapis.io
    X-API-Key: my-api-key
    Content-Type: application/json
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee",
      "method": "GET",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("https");
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "port": null,
      "path": "/v1/bc/bch/mainnet/txs",
      "headers": {
        "authorization": "my-api-key",
        "content-type": "application/json"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee');
    $request->setMethod(HTTP_METH_GET);
    
    $request->setHeaders(array(
      'content-type' => 'application/json',
      'authorization' => 'my-api-key'
    ));
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee")
    
    http = Net::HTTP.new(url.host, url.port)
    http.use_ssl = true
    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
    
    request = Net::HTTP::Get.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'my-api-key'
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    
    url = "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee"
    
    headers = {
        'content-type': "application/json",
        'authorization': "my-api-key"
        }
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee")
      .get()
      .addHeader("authorization", "my-api-key")
      .addHeader("content-type", "application/json")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/txs/fee"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "my-api-key")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
      "payload": {
        "min": "0.00000185",
        "max": "0.005",
        "average": "0.00002045",
        "min_fee_per_byte": "0.00000001",
        "average_fee_per_byte": "0.00000002",
        "max_fee_per_byte": "0.00000448",
        "average_bytes": "951", //deprecated
        "recommended": "0.00001617", //deprecated
        "slow_fee_per_byte": "0.00000013",
        "standard_fee_per_byte": "0.00000035",
        "fast_fee_per_byte": "0.0000011",
        "unit": "bch"
      }
    }
    
    Info

    Transactions Fee Endpoint gives information about the fees for all transactions included in the last 70 blocks. min shows the lowest fee, max is the highest and average - the average fee. recommended is the fee that we consider as the one that corresponds to a cheap and fast execution. However, it is only a suggestion and should be used at users' sole discretion. average_bytes represents the average size of the transactions in bytes and is used for the calculations of the recommended fee price.

    min_fee_per_byte, average_fee_per_byte and max_fee_per_byte represent the lowest, average and highest values per byte. slow_fee_per_byte, standard_fee_per_byte and fast_fee_per_byte represent the slowest, standard and fastest values per byte for a transaction fee. Crypto APIs provides an endpoint where you can get the size of your transaction in bytes. Using the provided data you can easily calculate and set your fee.

    All fees are in bch!

    HTTP Request

    GET /v1/bc/bch/${NETWORK}/txs/fee

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)

    xPub, yPub, zPub

    What is Xpub?

    Every child key pair can define an xPub (Extended Public Key). As the name suggests, an Xpub doesn’t contain information about private keys, but only public ones. This means that an xPub will not give you access to the funds in a wallet, but the user can also view the child wallet’s addresses, transactions, and balances. You can think of it as a read-only view of a wallet.

    What are Ypub and Zpub?

    After the adoption of SegWit, theBIP49 standard gave origin to the yPub. A yPub key is the same as an xPub key. However, it follows the new standard and has an address type P2SH-P2WPKH. yPub is for backward-compatible SegWit Wallets.

    After the xPub and yPub, the newest Public Extended Key is zPub. Just as its predecessor the zPub follows the BIP49 standard, but the address type is P2WPKH. zPub is for native compatible SegWit wallets.

    Create Public Extended Key (xPub, yPub, zPub)

    Sample Data

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "password": "SECRET123456"
        }'
    
    
    POST /v1/bc/bch/mainnet/wallets/hd/xpub HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "password": "SECRET123456"
    }
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"password\": \"SECRET123456\"\n}"
    });
    
    $.post('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub')
      .then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/wallets/hd/xpub",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    req.write(JSON.stringify({ password: 'SECRET123456' }));
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    $request->setBody('{
        "password": "SECRET123456"
    }');
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"password\": \"SECRET123456\"\n}"
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    
    payload = "{\n\t\"password\": \"SECRET123456\"\n}"
    response = requests.post(url, payload, headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"password\": \"SECRET123456\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
        SetHeader("Content-Type", "application/json").
        SetHeader("X-API-Key", "my-api-key").
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub"
        payload := strings.NewReader("{\n\t\"password\": \"SECRET123456\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    }
    
    

    Response Body

    {
        "payload": {
            "xpriv": "xprv9u3nsnLZ6jAmp9ozk4DXrDjwGdsTtRAJGjRdvk9ipw5rLPjVXzV5f8kgsMCuVZVBZ2RWHgz2w8Y9sggbLjq4mbdggc7n6aDtBdPHiFv5E69",
            "xpub": "xpub6839HHsSw6j52dtTr5kYDMgfpfhxHst9dxMEj8ZLPGcqDC4e5XoLCw5Aidk15GGHCnMyoeYYJVXMoCRue9WBShr1XHuCUB7Tqd7qezTVNMw",
            "wif": "Ky9enQStBzcHGZokv8j9Tj9C8Kp3HX5wFEBixzfg12eNMY5FWpyJ"
        }
    }
    
    Info

    Create Public Extended Key (xPub, yPub, zPub) Endpoint allows you to create a random extended public key (based on your password), xpriv and wif.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/xpub

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    Get Public Extended Key Addresses (xPub, yPub, zPub)

    Sample Data

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }'
    
    
    POST /v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    });
    
    $.post('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5')
      .then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    req.write(JSON.stringify({ xpub: 'xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h' }));
    request.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    $request->setBody('{
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }');
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    
    payload = "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    
    response = requests.post(url, payload, headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
        SetHeader("Content-Type", "application/json").
        SetHeader("X-API-Key", "my-api-key").
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses?limit=5"
        payload := strings.NewReader("{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    }
    
    

    Response Body

    {
        "payload": [
            "bitcoincash:qzdt85m2puvfdea0gatj0wcdsjh80mgxnqt54fa9d2",
            "bitcoincash:qrnvlm7hlypqq0yryxxdjdemla24w509n590uue70c",
            "bitcoincash:qqh6ewq8tj8ptwnex8cuz5vlkcagsznn8vh56t36k7",
            "bitcoincash:qp9qex2t9s4d2mnaae4rch4l6748rf8gdunzrz939y",
            "bitcoincash:qppqu4jxqe6mchnxyjhraw6z779p6z23ey27gmhhwl"
        ],
        "meta": {
            "totalCount": 5,
            "index": 0,
            "limit": 5,
            "results": 5
        }
    }
    
    Info

    Get Pub Addresses Endpoint allows you to get addresses associated with the specified extended public key. Supported BIP formats are: bip39 and bip44. Since addresses are hierarchically ordered we provide the query params index and limit, in order to be able to get the addresses in specific positions. Default values are: 0 and 100, accordingly. The default values will return the first one hundred receive addresses. If you want to get the change addresses of the extended public key you should set type to be equal to "change" as a query parameter. If you want to get addresses in P2PKH (P2PKH which begin with the number 1, eg: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2) address format type you should set address_type to be equal to P2PKH. If you want to get addresses in P2SH (P2SH which begin with the number 3, eg: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy) address format type you should set address_type to be equal to P2SH. If you want to get addresses in Bech32 (Bech32 which begin with bc1, eg: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq) address format type you should set address_type to be equal to Bech32.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/xpub/addresses

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    index 0 starting point (integer)
    limit 100 result count (integer)
    type receive address type (string)
    address_type P2PKH address format type (string) (Allowed types are: P2PKH, P2SH, Bech32)
    Get Public Extended Key Transactions (xPub, yPub, zPub)

    Sample Data

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }'
    
    
    POST /v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    });
    
    $.post('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions')
      .then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    req.write(JSON.stringify({ xpub: 'xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h' }));
    request.end();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    $request->setBody('{
        "xpub":"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h"
    }');
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    
    payload = "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}"
    
    response = requests.post(url, payload, headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/mainnet/wallets/hd/xpub/addresses/transactions")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
        SetHeader("Content-Type", "application/json").
        SetHeader("X-API-Key", "my-api-key").
        url := "https://api.cryptoapis.io/v1/bc/bch/mainnett/wallets/hd/xpub/addresses/transactions"
        payload := strings.NewReader("{\n\t\"xpub\":\"xpub68sZmWTsr2FYYr8RGHG9Yu1JtZkAUSAQnJmB1UxFFMeaGqFTgbe3MZLpiLKodsiyrRrsq9k4DLCPxFvuw94AKTihXQHWQGpbvG7ACaNWK6h\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    }
    
    

    Response Body

     {
        "payload": [
            {
                "address": "bitcoincash:qqyx49mu0kkn9ftfj6hje6g2wfer34yfnq5tahq3q6",
                "transactions": [
                    {
                        "txid": "546d3d56eea57d204a4a3e729d09984af6ff3981f863073ccc14aded8cee3639",
                        "hash": "546d3d56eea57d204a4a3e729d09984af6ff3981f863073ccc14aded8cee3639",
                        "index": 57,
                        "version": 1,
                        "size": 185,
                        "locktime": 595725,
                        "datetime": "2019-08-14 07:58:33 UTC",
                        "time": "2019-08-14 07:58:33 UTC",
                        "blockhash": "0000000000000000007712f409bbc67ee91adabb2ab38c834d80fb536a4f04d5",
                        "blockheight": 595726,
                        "blocktime": "2019-08-14 07:58:33 UTC",
                        "timestamp": 1565769513,
                        "txins": [
                            {
                                "txout": "2f3abb7e66135e7fbd801aa58a6122f20170606c5dc43b0d6b8a6a0864d529ee",
                                "vout": 0,
                                "amount": "0.00015",
                                "addresses": [
                                    "bitcoincash:qqyx49mu0kkn9ftfj6hje6g2wfer34yfnq5tahq3q6"
                                ],
                                "script": {
                                    "asm": "4748434c26e2a1bc3c0b27fa7cf87994ef0ceef86cb403edd2c45add870f88123a03cfee79341ec01f7973977fdb12fbf9149dc709e89375d8256b0c0cfcc04f[ALL|FORKID] 02bbe7dbcdf8b2261530a867df7180b17a90b482f74f2736b8a30d3f756e42e217",
                                    "hex": "414748434c26e2a1bc3c0b27fa7cf87994ef0ceef86cb403edd2c45add870f88123a03cfee79341ec01f7973977fdb12fbf9149dc709e89375d8256b0c0cfcc04f412102bbe7dbcdf8b2261530a867df7180b17a90b482f74f2736b8a30d3f756e42e217"
                                },
                                "votype": "pubkeyhash"
                            }
                        ],
                        "txouts": [
                            {
                                "amount": "0.00014815",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "bitcoincash:qzq047m73kp2rp6fhylp049ugcl5p5metshtw868xp"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 80fafb7e8d82a18749b93e17d4bc463f40d3795c OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a91480fafb7e8d82a18749b93e17d4bc463f40d3795c88ac",
                                    "reqsigs": 1
                                }
                            }
                        ]
                    },
                    {
                        "txid": "2f3abb7e66135e7fbd801aa58a6122f20170606c5dc43b0d6b8a6a0864d529ee",
                        "hash": "2f3abb7e66135e7fbd801aa58a6122f20170606c5dc43b0d6b8a6a0864d529ee",
                        "index": 120,
                        "version": 1,
                        "size": 373,
                        "locktime": 0,
                        "datetime": "2019-08-14 07:25:56 UTC",
                        "time": "2019-08-14 07:25:56 UTC",
                        "blockhash": "000000000000000001a18a5701034b481376867d33d28fa9706c79080a773157",
                        "blockheight": 595722,
                        "blocktime": "2019-08-14 07:25:56 UTC",
                        "timestamp": 1565767556,
                        "txins": [
                            {
                                "txout": "c69eb25a33c1bfaac5394a6f941e8d0d2beb4d8ad1a7fa9f3ca58349c8ecf405",
                                "vout": 0,
                                "amount": "0.00015778",
                                "addresses": [
                                    "bitcoincash:qz09ldhwup9hyfdqklhux6knyk68ya64jsdq4ftp43"
                                ],
                                "script": {
                                    "asm": "30440220303be19a5c73b98f1d0cc5d7e818740c5c94d038e0b1795c78362008e77b18b8022067186e80aa00b552d1818fc1baebb54639fa0055fc5a4097e0c37027aa214662[ALL|FORKID] 0245f1f7a2e89cf3db24d39e7431b7c67a80d5ada45784f8591818dc2f9a229fbc",
                                    "hex": "4730440220303be19a5c73b98f1d0cc5d7e818740c5c94d038e0b1795c78362008e77b18b8022067186e80aa00b552d1818fc1baebb54639fa0055fc5a4097e0c37027aa21466241210245f1f7a2e89cf3db24d39e7431b7c67a80d5ada45784f8591818dc2f9a229fbc"
                                },
                                "votype": "pubkeyhash"
                            },
                            {
                                "txout": "78c79ee6fd75f8180b1a6b75e3c7ccd66a95a3a5c8836e86aac554bc7859fc98",
                                "vout": 1,
                                "amount": "0.00001625",
                                "addresses": [
                                    "bitcoincash:qrgq4apr4x3lv5ps5ljzaxw5kerkhspwe5u4yw9z20"
                                ],
                                "script": {
                                    "asm": "3045022100d6e4f9025dee9547180d1005753f0ad9d685aaa8b886a27408e92b08077601750220449e0005418763685b722c49ddbb5ca12d75f9c71b5ea225753e865a903bfd34[ALL|FORKID] 03234d4d80cf5786bde5efbe8db9e897eaa2206fbe2c5bbdbd12d861a025cd0938",
                                    "hex": "483045022100d6e4f9025dee9547180d1005753f0ad9d685aaa8b886a27408e92b08077601750220449e0005418763685b722c49ddbb5ca12d75f9c71b5ea225753e865a903bfd34412103234d4d80cf5786bde5efbe8db9e897eaa2206fbe2c5bbdbd12d861a025cd0938"
                                },
                                "votype": "pubkeyhash"
                            }
                        ],
                        "txouts": [
                            {
                                "amount": "0.00015",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "bitcoincash:qqyx49mu0kkn9ftfj6hje6g2wfer34yfnq5tahq3q6"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 086a977c7dad32a56996af2ce90a727238d48998 OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a914086a977c7dad32a56996af2ce90a727238d4899888ac",
                                    "reqsigs": 1
                                }
                            },
                            {
                                "amount": "0.00002029",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "bitcoincash:qpn8tnpk6cdh38f2gz0f42qts757rreyxutmr3579g"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 6675cc36d61b789d2a409e9aa80b87a9e18f2437 OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a9146675cc36d61b789d2a409e9aa80b87a9e18f243788ac",
                                    "reqsigs": 1
                                }
                            }
                        ]
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 1,
            "index": 0,
            "limit": 100,
            "results": 1
        }
    }
    
    Info

    Get Pub Addresses Endpoint allows you to get transactions associated with the specified extended public key. Supported BIP formats are: bip39, and bip44. Since addresses are hierarchically ordered we provide the query params index and limit, in order to be able to get the addresses and their transactions in specific positions. Default values are: 0 and 100, accordingly. The default values will return the transactions for the first one hundred receive addresses. If you want to get the change addresses of the extended public key you should set type to be equal to "change" as a query parameter. If the transactions you are looking for are transactions from addresses in P2PKH (P2PKH which begin with the number 1, eg: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2) address format type you should set address_type to be equal to P2PKH. If the transactions you are looking for are transactions from addresses in P2SH (P2SH which begin with the number 3, eg: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy) address format type you should set address_type to be equal to P2SH. If the transactions you are looking for are transactions from addresses in Bech32 (Bech32 which begin with bc1, eg: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq) address format type you should set address_type to be equal to Bech32. If the transactions you are looking for are transactions from addresses in ALLw (P2PKH, P2SH, Bech32) formats type you should set address_type to be equal to ALL.

    results property in the response shows the number of addresses that have transactions for the specified query.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/xpub/addresses/transactions

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    index 0 starting point (integer)
    limit 100 result count (integer)
    type receive address type (string)
    address_type P2PKH address format type (string) (Allowed types are: P2PKH, P2SH, Bech32, ALL)
    Get Public Extended Key Details (xPub, yPub, zPub)

    Sample Data

    
    curl -X POST 'https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
        "xpub":"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch"
    }'
    
    
    POST /v1/bc/bch/testnet/wallets/hd/xpub/details HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    {
        "xpub":"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch"
    }
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"xpub\":\"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch\"\n}"
    });
    
    $.post('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details')
      .then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/bch/testnet/wallets/hd/xpub/details",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    };
    
    var request = https.request(options, function (response) {
      response.on("data", function (data) {
        console.log(data);
      });
    });
    req.write(JSON.stringify({ xpub: 'tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch' }));
    request.end();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details');
    $request->setMethod(HTTP_METH_POST);
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    $request->setBody('{
        "xpub":"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch"
    }');
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Post.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    request.body = "{\n\t\"xpub\":\"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch\"\n}"
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    
    payload = "{\n\t\"xpub\":\"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch\"\n}"
    
    response = requests.post(url, payload, headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"xpub\":\"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
        SetHeader("Content-Type", "application/json").
        SetHeader("X-API-Key", "my-api-key").
        url := "https://api.cryptoapis.io/v1/bc/bch/testnet/wallets/hd/xpub/details"
        payload := strings.NewReader("{\n\t\"xpub\":\"tpubD8bCmstqk2DN34dDtBniRxjjbdqK8Gu3sHayY94iUZ5oLdX5mxPyQL9pTRHA61ymGuGaoorC4jj1LpLPCnwRHQqZGjfqiyJ6FLayVBXcEch\"\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    }
    
    

    Response Body

    {
        "payload": {
            "totalBalance": {
                "amount": "0.000005",
                "unit": "BCH"
            },
            "transactions": [
                {
                    "txid": "9edab35545d20216d0eb698c36318efa7108e8bd121c89195311a8093733694e",
                    "hash": "9edab35545d20216d0eb698c36318efa7108e8bd121c89195311a8093733694e",
                    "index": 3,
                    "version": 2,
                    "size": 357,
                    "locktime": 0,
                    "datetime": "2020-06-09 07:47:47 UTC",
                    "time": "2020-06-09 07:47:47 UTC",
                    "blockhash": "000000000000a98e251a283bf6681a290ea998e962c8c4c1522a51153296568a",
                    "blockheight": 1385204,
                    "blocktime": "2020-06-09 07:47:47 UTC",
                    "timestamp": 1591688867,
                    "txins": [
                        {
                            "txout": "89c8b6d58203f3d45ae60e09bc03c7eef2446013772740cca7b1d85ee075a2c3",
                            "vout": 0,
                            "amount": "0.09999296",
                            "addresses": [
                                "bchtest:qqxtrgqa73qv5wadkz63nlsyfhux7ccs4c0esdwhyc"
                            ],
                            "script": {
                                "asm": "304402200d054d76308ae951ae4a342b34e8e6a898a9828b2b189c059e4e311d1694cd4202206108d1445825701ce6b648d2e84cb00bf535079fa1b6985f0ddc7175d3be3d49[ALL|FORKID] 032a40a50271d8a355ddb6bbde0651235cb13055874be918330880975fb8db3d81",
                                "hex": "47304402200d054d76308ae951ae4a342b34e8e6a898a9828b2b189c059e4e311d1694cd4202206108d1445825701ce6b648d2e84cb00bf535079fa1b6985f0ddc7175d3be3d494121032a40a50271d8a355ddb6bbde0651235cb13055874be918330880975fb8db3d81"
                            },
                            "votype": "pubkeyhash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0.000001",
                            "type": "scripthash",
                            "spent": false,
                            "addresses": [
                                "bchtest:prn7uwhuvugqj8a9qf4ag777l8a7av6n75gvgrx2em"
                            ],
                            "script": {
                                "asm": "OP_HASH160 e7ee3afc6710091fa5026bd47bdef9fbeeb353f5 OP_EQUAL",
                                "hex": "a914e7ee3afc6710091fa5026bd47bdef9fbeeb353f587",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.000001",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qq7kjykj2k8zqnrs9w9tsyrmqpurffjxhqymqq3drj"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 3d6912d2558e204c702b8ab8107b007834a646b8 OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a9143d6912d2558e204c702b8ab8107b007834a646b888ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.000001",
                            "type": "scripthash",
                            "spent": false,
                            "addresses": [
                                "bchtest:pqxv2dghm2ugsrmuyut6j95840ay6ss4lccy8d63hl"
                            ],
                            "script": {
                                "asm": "OP_HASH160 0cc53517dab8880f7c2717a91687abfa4d4215fe OP_EQUAL",
                                "hex": "a9140cc53517dab8880f7c2717a91687abfa4d4215fe87",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.000001",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qzcwrp70jlgkqfuykq6we5pfnafmz6m725py5td8n4"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 b0e187cf97d1602784b034ecd0299f53b16b7e55 OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914b0e187cf97d1602784b034ecd0299f53b16b7e5588ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.000001",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qp8mapnsg3d7u8xpcm0pjthsmcmmcaramgea2q36zm"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 4fbe8670445bee1cc1c6de192ef0de37bc747dda OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a9144fbe8670445bee1cc1c6de192ef0de37bc747dda88ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "0.09997983",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "bchtest:qqxtrgqa73qv5wadkz63nlsyfhux7ccs4c0esdwhyc"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 0cb1a01df440ca3badb0b519fe044df86f6310ae OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a9140cb1a01df440ca3badb0b519fe044df86f6310ae88ac",
                                "reqsigs": 1
                            }
                        }
                    ]
                }
            ]
        },
        "meta": {
            "totalCount": 1,
            "index": 0,
            "results": 1
        }
    }
    
    Info

    Get Pub Details Endpoint allows you to get transactions associated with the specified extended public key and the total balance of the results. Supported BIP formats are: bip39, bip44, bip49 and bip84. Since addresses are hierarchically ordered we provide the query params index and limit, in order to be able to get the addresses and their transactions in specific positions. Default values are: 0 and 100, accordingly. The default values will return the transactions for the first one hundred receive addresses. If you want to get the change addresses of the extended public key you should set type to be equal to "change" as a query parameter. If you are looking for the details from addresses in P2PKH (P2PKH which begin with the number 1, eg: 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2) address format type you should set address_type to be equal to P2PKH. If you are looking for the details from addresses in P2SH (P2SH which begin with the number 3, eg: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy) address format type you should set address_type to be equal to P2SH. If you are looking for the details from addresses in ALL (P2PKH, P2SH) formats type you should set address_type to be equal to ALL.

    results property in the response shows the number of addresses that have transactions for the specified query.

    HTTP Request

    POST /v1/bc/bch/${NETWORK}/wallets/hd/xpub/details

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    index 0 starting point (integer)
    limit 100 result count (integer)
    address_type receive address type (string)
    address_format P2PKH address format type (string) (Allowed types are: P2PKH, P2SH, ALL)

    Payment Forwarding

    Payment Forwarding is an automatic way to move any received funds to another wallet, it's mainly used to move funds once received to cold wallets. Moving funds from hot wallets to cold wallets is a common practice in the market, it's used by all exchanges and wallets. You can subscribe for payment forwarding for any wallet/address you own, in the subscription you mention where to move the funds and how to notify you once done. Crypto APIs will monitor the wallet/address you have subscription for and once any funds are received, Crypto APIs will move them to the target wallet/address then notify you by sending a call to the URL you have specified. commerce without necessarily requiring extensive setup barriers, like registering new accounts. In that spirit, our Payment Forwarding API is the easiest way to accept—and consolidate—payments securely without forcing your users to create accounts and jump through unnecessary loops. It’s also a generic way to automatically transfer value from one address to another. One of the well-known benefits of cryptocurrency is the ability to allow users to partake in online commerce without necessarily requiring extensive setup barriers, like registering new accounts. In that spirit, our Payment Forwarding API is the easiest way to accept—and consolidate—payments securely without forcing your users to create accounts and jump through unnecessary loops. It’s also a generic way to automatically transfer value from one address to another. While there are many possible use cases, the two we hear most about are: A way to generate payment-specific addresses for which funds will automatically transfer to a main merchant address. Great for automatic merchandise (whether physical or virtual) processing.

    We do not take a fee on payment forwarding, other than the required miner fee; payments are free. However, as part of your own services, you can include a fee (either fixed or a percentage) that will also be automatically transfered to your own address in the same transaction. Fee-based business models are thus easily achieved, and moreover, easily auditable via the blockchain.

    Create Payment Forwarding Automation

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/payments \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "wallet": "demohdwallet",
        "callback": "http://example.com/paymet_forwarding_hook",
        "from": "bchtest:qr6wprehdzwsjnucc8uhh00xk8n002dtnv59jtwt0d",
        "to": "bchtest:qpect0g3kjqzdp5kdyzsqtx7hvyw0p84aq3mjqs0x5",
        "password": "SECRET123456",
        "confirmations": 2,
        "fee": 0.00022827
    }'
    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/bch/testnet/payments/wif \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "callback": "http://example.com/paymet_forwarding_hook",
        "from": "bchtest:qrqxlge4wjv7kttm0u9srqjttprhylsz6g84fhjgzf",
        "to": "bchtest:qpect0g3kjqzdp5kdyzsqtx7hvyw0p84aq3mjqs0x5",
        "wif": "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs",
        "confirmations": 2,
        "fee": 0.00022827
    }'
    
    
    
    POST /v1/bc/bch/testnet/payments