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

    General Information

    Some of the main points of Ethereum Classic (ETC):

    Get Node Information

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/info \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/info 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/etc/mainnet/info",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "info"
      ],
      "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/etc/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/etc/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 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,etc,mainnet,info", 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/etc/mainnet/info")
      .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/etc/mainnet/info"
    
      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

    {
      "payload": {
          "chain": "mainnet",
          "height": 8550052,
          "difficulty": "697125473263177901515",
          "bestBlockHash": "0xc372378e3278ec106d9dee377b0036d416bebca8a811c275ae1508227b8757ed",
          "txs_count": 47230584,
          "synced": true
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    Get Block By Hash

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88 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/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "blocks",
        "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88"
      ],
      "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/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88');
    $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/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88")
    
    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,etc,mainnet,blocks,0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88", 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/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88")
      .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/etc/mainnet/blocks/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88"
    
      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

    {
        "payload": {
            "chain": "ETC.mainnet",
            "height": 8549987,
            "hash": "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
            "parent_hash": "0x1d1c096175e5386995277027589fbd8d93d256c931b908a439126426c1afe347",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "42000",
            "size": 757, //in bytes
            "timestamp": 1565160180,
            "date": "2019-08-07 06:43:00 UTC", //deprecated
            "datetime": "2019-08-07 06:43:00 UTC",
            "transactions": 2,
            "difficulty": "115025464804756",
            "total_difficulty": "697118000644283723876",
            "gas_limit": "7986487",
            "nonce": "0x00b7e2951c0209719a",
            "mined_by": "0xfe96c2235e805ce312cc830a41d3b10f26a69057",
            "mined_in_seconds": 7,
            "uncles": [],
            "extra_data": "0x616e79686173682e6e6574",
            "confirmations": 42,
            "total_fees": "2100000000000000"
        }
    }
    
    Info

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

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden 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:

    0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88

    The returned object contains information about the block in JSON format, including its height, the total amount of wei transacted within it, 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/etc/mainnet/blocks/8549987 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/blocks/8549987 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/etc/mainnet/blocks/8549987",
      "method": "GET",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "https://api.cryptoapis.io",
      "path": "/v1/bc/etc/mainnet/blocks/8549987",
      "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/etc/mainnet/blocks/8549987');
    $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/etc/mainnet/blocks/8549987")
    
    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,etc,mainnet,blocks,8549987", 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/etc/mainnet/blocks/8549987")
      .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/etc/mainnet/blocks/8549987"
    
      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

    {
        "payload": {
            "chain": "ETC.mainnet",
            "height": 8549987,
            "hash": "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
            "parent_hash": "0x1d1c096175e5386995277027589fbd8d93d256c931b908a439126426c1afe347",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "42000",
            "size": 757, //in bytes
            "timestamp": 1565160180,
            "date": "2019-08-07 06:43:00 UTC", //deprecated
            "datetime": "2019-08-07 06:43:00 UTC",
            "transactions": 2,
            "difficulty": "115025464804756",
            "total_difficulty": "697118000644283723876",
            "gas_limit": "7986487",
            "nonce": "0x00b7e2951c0209719a",
            "mined_by": "0xfe96c2235e805ce312cc830a41d3b10f26a69057",
            "mined_in_seconds": 7,
            "uncles": [],
            "extra_data": "0x616e79686173682e6e6574",
            "confirmations": 52,
            "total_fees": "2100000000000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    8549987

    The returned object contains information about the block in JSON format, including its height, the total amount of wei transacted within it, the number of transactions in it and more.

    Get Latest Block

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/blocks/latest \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/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/etc/mainnet/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",
        "etc",
        "mainnet",
        "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/etc/mainnet/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/etc/mainnet/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,etc,mainnet,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/etc/mainnet/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/etc/mainnet/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.DefaultClient.Do(req)
    
      defer res.Body.Close()
      body, _ := ioutil.ReadAll(res.Body)
    
      fmt.Println(res)
      fmt.Println(string(body))
    
    }
    
    

    Response Body

    {
        "payload": {
            "chain": "ETC.mainnet",
            "height": 8550057,
            "hash": "0x3cab14cd1910615da8c22d01a221380d6d205d1d36cf4de9770f368a06fb7461",
            "parent_hash": "0xaccbaf9e7eae41558ee43f3233558d88d9a341c81e5a53f750a6b279a93d69d9",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "21000",
            "size": 650, //in bytes
            "timestamp": 1565161209,
            "date": "2019-08-07 07:00:09 UTC", //deprecated
            "datetime": "2019-08-07 07:00:09 UTC",
            "transactions": 1,
            "difficulty": "114687245431021",
            "total_difficulty": "697126047036087357861",
            "gas_limit": "8000029",
            "nonce": "0x00bfb0cdc00cb5ce87",
            "mined_by": "0xdf7d7e053933b5cc24372f878c90e62dadad5d42",
            "mined_in_seconds": 4,
            "uncles": [],
            "extra_data": "0x65746865726d696e652d6574632d657532",
            "confirmations": 1,
            "total_fees": "23100000000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    Addresses

    Whereas the Bitcoin blockchain was purely a list of transactions, ETC's basic unit is the account. The ETC blockchain tracks the state of every account, and all state transitions on the Ethereum blockchain are transfers of value and information between accounts. There are two types of accounts:

    Crypto APIs Address API allows you to look up information about public ETC addresses/accounts and generate your own low-value ETC addresses/public-private key pairs.

    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:

    Get Address Details

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561 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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "address",
        "0xd6054746a43e3a5c47a18796dc47437574127561"
      ],
      "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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561');
    $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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561")
    
    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,etc,mainnet,address,0xd6054746a43e3a5c47a18796dc47437574127561", 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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561")
      .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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561"
    
      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

    {
        "payload": {
            "chain": "ETC.mainnet",
            "address": "0xd6054746a43e3a5c47a18796dc47437574127561",
            "balance": "1.986363856E-9",
            "txs_count": 1255,
            "from": 625,
            "to": 630
        }
    }
    
    Info

    The default Address Endpoint strikes a balance between speed of response and data on Addresses. It returns information about the balance (in ETC) and transactions of a specified address.

    HTTP Request

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

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

    ADDRESS is a string representing the public address you’re interested in querying, for example:

    0xd6054746a43e3a5c47a18796dc47437574127561

    The returned object contains information about the address, including its balance in ETH 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 Transactions By Address

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15  \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15 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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "address",
        "0xd6054746a43e3a5c47a18796dc47437574127561",
        "transactions"
      ],
        "qs": {
        "index": 0,
        "limit": 15
      },
      "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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15');
    $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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15")
    
    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")
    
    querystring = {"index": 0, "limit": 15}
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("GET", "v1,bc,etc,mainnet,address,0xd6054746a43e3a5c47a18796dc47437574127561,transactions", headers=headers, params=querystring))
    
    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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15")
      .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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/transactions?index=0&limit=15"
    
      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

    {
      "payload": [
        {
          "from": "0xfc9ff8801a1713f6d144d531e3e2afdd1d735307",
          "to": "0x3e88833ffa0aaacdc064537ed77a48725f9d7e3e",
          "hash": "0x43efc44100d0388a2ed632685ec080931ce8a49643995b71f7e634781e4dc431",
          "value": "120000000000000000",
          "datetime": "2019-10-30 12:50:54",
          "timestamp": 1572439854,
          "nonce": 1048578,
          "confirmations": 6126,
          "block": 5209280,
          "gas_price": "21000000000",
          "gas_used": "21000"
        },
        {
          "from": "0xfc9ff8801a1713f6d144d531e3e2afdd1d735307",
          "to": "0x3e88833ffa0aaacdc064537ed77a48725f9d7e3e",
          "hash": "0x9cbc4ea931a8816518869d8e688b53bddac7041b268a3c67e58ef189a8cd2c4d",
          "value": "5000000000000000",
          "datetime": "2019-10-29 13:06:02",
          "timestamp": 1572354362,
          "nonce": 1048577,
          "confirmations": 12204,
          "block": 5203202,
          "gas_price": "21000000000",
          "gas_used": "21000"
        },
        ...
        {
          "from": "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
          "to": "0xfc9ff8801a1713f6d144d531e3e2afdd1d735307",
          "hash": "0x02bf071150ab349f7692f0e44edf62b891513241e36bcbb3822978b0d5f7cd04",
          "value": "10000000000000000000",
          "datetime": "2019-10-29 12:55:59",
          "timestamp": 1572353759,
          "nonce": 1048588,
          "confirmations": 12243,
          "block": 5203163,
          "gas_price": "21000000000",
          "gas_used": "21000"
        }
      ],
      "meta": {
        "totalCount": 4,
        "index": 0,
        "limit": 5,
        "results": 4
      }
    }
    
    Info

    The Transactions By Address Endpoint returns all transactions specified by the query params: index and limit; The maxim value of limit is 50. The value in the returned transactions in WEI.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/address/${ADDRESS}/transactions?index=${INDEX}&limit=${LIMIT}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    ADDRESS ------- Address in blockchain
    INDEX 0 start from
    LIMIT ------- limit up to n transactions
    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 you’re interested in querying, for example:

    0xd6054746a43e3a5c47a18796dc47437574127561

    INDEX is a integer representing the order of the transaction, for example:

    0

    LIMIT is a integer representing limit for transactions, for example:

    15

    Generate Address

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/address \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    POST /v1/bc/etc/mainnet/address 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/etc/mainnet/address",
      "method": "POST",
      "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": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "address"
      ],
      "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/etc/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/etc/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 http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,address", 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/etc/mainnet/address")
      .post(null)
      .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/etc/mainnet/address"
    
      req, _ := http.NewRequest("POST", 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

    {
      "payload": {
          "address": "0x8ff4719811ae8e07d63173232cb35c7e8d833649",
          "privateKey": "87f76ddb09f6d7fbcd330e389b572d21083fcaa227f3f0559d45634a2a47ec6f",
          "publicKey": "475f6aefe977f8c1c4ca44711fb34e65ed815aeff2f024ddbaffdb951a10bb8543fb09d40f5c090ab72ea5272b2dc8d2ed847d6df06604acfcaf259f4363e002"
      }
    }
    
    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/etc/${NETWORK}/address

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

    The returned object contains a private key in hex-encoded, a public key, and a public address.

    Generate Account

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/account \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "password":"yourpassword"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/account HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "password":"yourpassword"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/account",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"password\":\"yourpassword\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "account"
      ],
      "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({ password: 'yourpassword' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/account');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "password":"yourpassword"
    }');
    
    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/etc/mainnet/account")
    
    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\":\"yourpassword\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"password\":\"yourpassword\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,account", 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\"password\":\"yourpassword\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/account")
      .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/etc/mainnet/account"
    
      payload := strings.NewReader("{\n\t\"password\":\"yourpassword\"\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": {
            "success": "keystore saved",
            "address": "0x7d75381c3e5bccf64730a5b13a3dfbcdea3b2c8e"
        }
    }
    
    Info

    The Generate Account Endpoint allows you to generate private-public key-pairs along with an associated public address encoded in a keyfile. A password and user id are required with this POST request. Keyfiles are stored in a keystore subdirectory on our servers. The critical component of the keyfile, the account’s private key, is always encrypted, and it is encrypted with the password entered when the account was created.

    The user id is needed in order to associate the keyfile with the specific user.

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/account

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

    The returned object contains a public address.

    Get Address Nonce

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce 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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "address",
        "0xd6054746a43e3a5c47a18796dc47437574127561",
        "nonce"
      ],
      "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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce');
    $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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce")
    
    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,etc,mainnet,address,0xd6054746a43e3a5c47a18796dc47437574127561,nonce", 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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce")
      .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/etc/mainnet/address/0xd6054746a43e3a5c47a18796dc47437574127561/nonce"
    
      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

    {
        "payload": {
            "nonce": 625
        }
    }
    
    Info

    The Nonce Endpoint returns the current nonce of the specified address.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/address/${ADDRESS}/nonce

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

    ADDRESS is a string representing the public address you’re interested in querying, for example:

    0xd6054746a43e3a5c47a18796dc47437574127561

    Transactions

    Crypto APIs Transaction API allows you to look up information about pending transactions, query transactions based on hash, create and propagate your own transactions and embed data on the blockchain—all based on the coin/chain resource you’ve selected for your endpoints.

    Unlike Bitcoin, ETC has no concept of UTXOs. Instead, addresses have a running balance, and use an ever-increasing sequence/nonce for every transaction to maintain proper address state. You can read more about this design decision here. Transaction signing and generation are also different in Ethereum, but for basic transactions, the process is very similar to our Bitcoin API.

    Get Transaction Hash

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb 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/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb",
      "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"
      ],
      "path": [
        "v1",
        "etc",
        "bc",
        "mainnet",
        "txs",
        "hash",
        "0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb"
      ],
      "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/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb');
    $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/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb")
    
    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,etc,mainnet,txs,hash,0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb", 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/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb")
      .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/etc/mainnet/txs/hash/0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb"
    
      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

    {
        "payload": {
            "chain": "ETC.mainnet",
            "status": "0x1",
            "index": 2,
            "hash": "0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb",
            "value": "1010590073934829952",
            "from": "0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d",
            "to": "0xae991953dd12b1021650076ed94edcfbdeb7075d",
            "date": "2019-08-07 07:18:52 +UTC",
            "timestamp": 1571922578,
            "block_hash": "0x944c7afd01d0ee980699528634b13de34b9e3da871ead6e9db2321712e6bad68",
            "block_number": 8550127,
            "gas": "50000",
            "gas_price": "1100000000",
            "gas_used": "21000",
            "nonce": 4321591,
            "confirmations": 256,
            "token_transfers": [],
            "input": "0x"
        }
    }
    
    Info

    The Transaction Hash Endpoint returns detailed information about a given transaction based on its hash.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/hash/${TX_HASH}

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)
    TX_HASH - Hash of the transaction in blockchain

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

    0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb

    The returned object contains detailed information about the transaction, including the value transfered, fees collected, date received, any scripts associated with an output, and more.

    Transactions Index by Index, Limit and Block Number

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/block/4173655?index=0&limit=4 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/block/4173655?index=0&limit=4 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/etc/mainnet/txs/block/4173655?index=0&limit=4",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "block",
        "4173655"
      ],
      "qs": {
        "index": 0,
        "limit": 4
      },
      "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/etc/mainnet/txs/block/4173655?index=0&limit=4');
    $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/etc/mainnet/txs/block/4173655?index=0&limit=4")
    
    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")
    
    querystring = {"index": 0, "limit": 4}
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("GET", "v1,bc,etc,mainnet,txs,block,4173655", headers=headers, params=querystring)
    
    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/etc/mainnet/txs/block/4173655?index=0&limit=4")
      .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/etc/mainnet/txs/block/4173655?index=0&limit=4"
    
      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

    {
        "meta": {
            "totalCount": 6,
            "index": 0,
            "limit": 4,
            "results": 4
        },
        "payload": [
            {
                "chain": "ETC.mainnet",
                "status": "0x1",
                "index": 3,
                "hash": "0x4774f59853dea21dd61f89a23730f41c1e03f0bce58a6c6c495738a80291bf1e",
                "value": "99442990000000000",
                "from": "0x78a0c0f376fcaea5aac4e8109d467f623965fe5b",
                "to": "0xe94b04a0fed112f3664e45adb2b8915693dd5ff3",
                "date": "2017-07-28 00:43:12 +UTC",
                "timestamp": 1571922578,
                "block_hash": "0x60183162f927adbbb8a4f615b154c7e75b6210e30ec6defb0df770d2cd4f634c",
                "block_number": 4173655,
                "gas": "136163",
                "gas_price": "20000000000",
                "gas_used": "36163",
                "nonce": 8,
                "confirmations": 4376733,
                "token_transfers": [],
                "input": "0x0f2c9329000000000000000000000000fbb1b73c4f0bda4f67dca266ce6ef42f520fbb98000000000000000000000000e592b0d8baa2cb677034389b76a71b0d1823e0d1"
            },
            ...
            {
                "chain": "ETC.mainnet",
                "status": "0x1",
                "index": 0,
                "hash": "0xed8773270e312a27194d5c2599a115f8d6ad8cae480557c7f1b12426e6931e63",
                "value": "938000000000000000",
                "from": "0xd5c2e7215fb9f83e4aa2eee5fb3e837a0aba539a",
                "to": "0x634097ae5c454148a74913de47f66560cae3c5b4",
                "date": "2017-07-28 00:43:12 +UTC",
                "timestamp": 1571922578,
                "block_hash": "0x60183162f927adbbb8a4f615b154c7e75b6210e30ec6defb0df770d2cd4f634c",
                "block_number": 4173655,
                "gas": "150000",
                "gas_price": "24000000000",
                "gas_used": "21000",
                "nonce": 8165,
                "confirmations": 4376733,
                "token_transfers": [],
                "input": "0x"
            }
        ]
    }
    
    Info

    The Transaction Index Endpoint by Index, Limit and Block Number returns detailed information about transactions for the block height defined, starting from the index defined up to the limit defined . In the example above index is 0 and limit is 4, therefore the response will be an array of 4 transactions starting from index 0. The highest number for the limit is 50.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/block/${BLOCK_NUMBER}?index=${TX_INDEX}&limit=${LIMIT}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    TX_INDEX ------- Index - start from
    LIMIT ------- Limit - up to
    BLOCK_NUMBER ------- Block height
    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

    TX_INDEX is a integer representing the order of the transaction within the block, for example:

    0

    LIMIT is a integer representing limit for transactions, for example:

    4

    BLOCK_NUMBER is a integer representing the height of the block, for example:

    4173655

    Get Transaction By Transaction Index and Block Number

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/block/8549987/1 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/block/8549987/1 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/etc/mainnet/txs/block/8549987/1",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "8549987",
        "1"
      ],
      "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/etc/mainnet/txs/block/8549987/1');
    $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/etc/mainnet/txs/block/8549987/1")
    
    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,etc,mainnet,txs,8549987,1", 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/etc/mainnet/txs/block/8549987/1")
      .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/etc/mainnet/txs/block/8549987/1"
    
      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

    {
      "payload": {
          "chain": "ETC.mainnet",
          "status": "0x1",
          "index": 1,
          "hash": "0x95dd1fa6d87daf7a28d683061f9af1c60254ad39cd1033ec5a77ce4da2f6be56",
          "value": "102834720000000000",
          "from": "0xd6054746a43e3a5c47a18796dc47437574127561",
          "to": "0xa12105efa0663147bddee178f6a741ac15676b79",
          "date": "2019-08-07 06:43:00 +UTC",
          "timestamp": 1501202592,
          "block_hash": "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
          "block_number": 8549987,
          "gas": "21000",
          "gas_price": "50000000000",
          "gas_used": "21000",
          "nonce": 624,
          "confirmations": 382,
          "token_transfers": [],
          "input": "0x"
      }
    }
    
    Info

    The Transaction Index Endpoint by Block Number returns detailed information about a given transaction based on its index and block height.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/block/${BLOCK_NUMBER}/${TX_INDEX}

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)
    TX_INDEX - Index of the transaction in block
    BLOCK_NUMBER - Block height

    TX_INDEX is a integer representing the order of the transaction within the block, for example:

    1

    BLOCK_NUMBER is a integer representing the height of the block, for example:

    8549987

    The returned object contains detailed information about the transaction, including the value transfered, fees collected, date received, any scripts associated with an output, and more.

    Get Transaction by Transaction Index and Block Hash

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1 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/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "block",
        "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
        "1"
      ],
      "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/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1');
    $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/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1")
    
    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,etc,mainnet,txs,block,0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88,1", 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/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1")
      .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/etc/mainnet/txs/block/0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88/1"
    
      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

    {
      "payload": {
          "chain": "ETC.mainnet",
          "status": "0x1",
          "index": 1,
          "hash": "0x95dd1fa6d87daf7a28d683061f9af1c60254ad39cd1033ec5a77ce4da2f6be56",
          "value": "102834720000000000",
          "from": "0xd6054746a43e3a5c47a18796dc47437574127561",
          "to": "0xa12105efa0663147bddee178f6a741ac15676b79",
          "date": "2019-08-07 06:43:00 +UTC",
          "timestamp": 1565162332,
          "block_hash": "0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88",
          "block_number": 8549987,
          "gas": "21000",
          "gas_price": "50000000000",
          "gas_used": "21000",
          "nonce": 624,
          "confirmations": 382,
          "token_transfers": [],
          "input": "0x"
      }
    }
    
    Info

    The Transaction Index Endpoint by Block Hash returns detailed information about a given transaction based on its index and block hash.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/block/${BLOCK_HASH}/${TX_INDEX}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    TX_INDEX ------- Index of the transaction in block
    BLOCK_HASH ------- Block hash

    TX_INDEX is a integer representing the order of the transaction within the block, for example:

    1

    BLOCK_HASH is a string representing the hash of the block, for example:

    0x3b41239a11d264e14786d48f3719a4ceee7b5a711f821df312a056ec4e755e88

    The returned object contains detailed information about the transaction, including the value transfered, fees collected, date received, any scripts associated with an output, and more.

    Creating Transactions
    Info

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

    Use a third-party library to create your transactions and push raw transactions Use our two-endpoint process outlined below, wherein we generate a TXSkeleton based on your input address, output address, and value to transfer.

    New Transaction Endpoint using keystore file stored on our server

    In order to use this endpoint you should have an account(keystore file) stored on our servers.

    Then, you need to provide the from address, to address, value to transfer (in Ether), gas price and gas limit in wei. A standard ETC transfer requires at least a gas limit of 21,000 units of gas. Even if you set a higher than the required gas limit, only the required limit will be deducted.

    If you are not sure whether your gasLimit is enough to make a transaction or what is the average gasPrice, you can take a look at the following endpoints from our docs: Transaction GasLimit Endpoint and Transactions GasPrice Endpoint.

    Optional fields are: nonce and data. The nonce represents the transactions count for the specified from address. If not specified the system will automatically calculate the correct nonce.

    If needed, a data hexidecimal string can be provided as well (within the json request), as follows: "data" : "0xbc373585" Be aware that the gas limit will be higher than the minumum amount of 21,000 wei.

    The password associated with the keyfile should also be specified in order to unlock the account.

    HTTP Request

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

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress": "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
            "toAddress": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "gasPrice": 21000000000,
            "gasLimit": 21000,
            "value": 1.12,
            "password": "[email protected]#456",
            "nonce": 0
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/new HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "password" : "[email protected]#456",
      "nonce": 0
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"[email protected]#456\",\n\t\"nonce\":0\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "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({ fromAddress: '0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      gasPrice: 21000000000,
      gasLimit: 21000,
      value: 1.12,
      password: '[email protected]#456',
      nonce: 0 }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "password" : "[email protected]#456",
      "nonce": 0
    }');
    
    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/etc/mainnet/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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"[email protected]#456\",\n\t\"nonce\":0\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"gasPrice\" : 21000000000,\n  \"gasLimit\" : 21000,\n  \"value\" : 1.12,\n  \"password\" : \"[email protected]#456\",\n\t\"nonce\":0\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"[email protected]#456\",\n\t\"nonce\":0\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/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/etc/mainnet/txs/new"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"[email protected]#456\",\n\t\"nonce\":0\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": "0x9d8a22afd76a6b57ac3a95c04be7ec40f498b8d63f8b7c8fd23e079149f6621c",
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden 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, gas price, gas limit and password.

    While this particular usage will differ between client libraries, the result is the same: the addresses within your wallet will be used as the inputs, as if all of them had been placed within the addresses array.

    As a return object, you’ll receive a transaction hash, for example:

    { "payload": { "hex": "0x9d8a22afd76a6b57ac3a95c04be7ec40f498b8d63f8b7c8fd23e079149f6621c" } }

    This hash can be traced in the explorer. It will be with a pending status until it is mined.

    Send All Amount Endpoint using keystore file stored on our server

    This endpoint allows users to send all the available etc on their accounts to a specified address. Users should only specify the following information: - fromAddress; - toAddress; - password;

    Gas limit and price are optional. Gas limit will be calculated by the EVM and the gas price has a default value of 15 Gwei.

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/txs/new/all

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new/all \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "password" : "[email protected]#456"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/new/all HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "password" : "[email protected]#456"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new/all",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"[email protected]#456\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "new",
        "all"
      ],
      "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({ fromAddress: '0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      password: '[email protected]#456' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new/all');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "password" : "[email protected]#456"
    }');
    
    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/etc/mainnet/txs/new/all")
    
    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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"[email protected]#456\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"password\" : \"[email protected]#456\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,txs,new,all", 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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"[email protected]#456\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new/all")
      .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/etc/mainnet/txs/new/all"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"password\" : \"[email protected]#456\"\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": "0x9d8a22afd76a6b57ac3a95c04be7ec40f498b8d63f8b7c8fd23e079149f6621c",
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)

    As a return object, you’ll receive a transaction hash, for example:

    { "payload": { "hex": "0x9d8a22afd76a6b57ac3a95c04be7ec40f498b8d63f8b7c8fd23e079149f6621c" } }

    This hash can be traced in the explorer. It will be with a pending status until it is mined.

    New Transaction Endpoint with a private key

    Crypto APIs allows sending transactions for address that are not hold on our servers. In this case the data that should be provided is as follows:

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/txs/new-pvtkey

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
            -d '{
            "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "gasPrice" : 21000000000,
            "gasLimit" : 21000,
            "value" : 1.12,
            "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/new-pvtkey HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "new-pvtkey"
      ],
      "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({ fromAddress: '0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      gasPrice: 21000000000,
      gasLimit: 21000,
      value: 1.12,
      privateKey: '0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
    }');
    
    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/etc/mainnet/txs/new-pvtkey")
    
    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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"gasPrice\" : 21000000000,\n  \"gasLimit\" : 21000,\n  \"value\" : 1.12,\n  \"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,txs,new-pvtkey", 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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey")
      .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/etc/mainnet/txs/new-pvtkey"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\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": "0x3f7260953a861d21097c596af603023ee71a6bfe689e90d7f4951d9431e782d9"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. mainnet, rinkeby 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, gas price, gas limit and the private key of the address. A standard ETC transfer requires a gas limit of 21,000 units of gas, thefore if gas limit is not priveded the default value will be 60,000 units of gas.

    As a return object, you’ll receive a transaction hash, for example:

    { "payload": { "hex": "0x3f7260953a861d21097c596af603023ee71a6bfe689e90d7f4951d9431e782d9" } }

    This hash can be traced in the explorer. It will be with a status pending until it is mined.

    Send All Amount Endpoint with a private key

    Crypto APIs allows sending transactions (all available etc on a specified address) for address that are not hold on our servers. In this case the data that should be provided is as follows:

    Default gas price is 15Gwei, gas limit (if not set) will be calculated by the EVM.

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/txs/new-pvtkey/all

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey/all \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
            -d '{
            "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/new-pvtkey/all HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey/all",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\", privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "new-pvtkey",
        "all"
      ],
      "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({ fromAddress: '0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      privateKey: '0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey/all');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "privateKey" : "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e"
    }');
    
    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/etc/mainnet/txs/new-pvtkey/all")
    
    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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,txs,new-pvtkey,all", 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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/new-pvtkey/all")
      .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/etc/mainnet/txs/new-pvtkey/all"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\", \n\t\"privateKey\" : \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"\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": "0xa1903c284e03276f77abe59d93832efc7ace43710932106a06c1d8a5347afe9c"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)

    As a return object, you’ll receive a transaction hash, for example:

    { "payload": { "hex": "0xa1903c284e03276f77abe59d93832efc7ace43710932106a06c1d8a5347afe9c" } }

    This hash can be traced in the explorer. It will be with a status pending until it is mined.

    Locally Sign Your Transaction

    Crypto APIs provides the opportunity to locally sign your transaction. If you want to use third-pary tools for signing your raw transactions you can send to the Locally Sign Your Transaction Endpoint only the following data:

    For your convenience we need only this information. We will calculate the nonce for your transaction and add default values for gas price and gas value. After sending the request a JSON will be send to you (see response body). With your JSON returned from the Locally Sign Your Transaction Endpoint you now need to use your private key to sign the data provided.

    After signing your JSON locally you will be provided with hex-encoded raw string, for example(depends on your third-party tools):

    { raw: "0xf8690e827d00831e8480940cb1883c01377f45ee5d7448a32b5ac1709afc11877265bab9c48000802aa05be8d75183572592949237b32a9aec605631ca3e7471f038d69fff6a4b320777a00f41b170152f34644c1423b1aaf29b2229f05c35eb7534830d30c974c7f9c7c4", tx: { gas: "0x1e8480", gasPrice: "0x7d00", hash: "0x61710049f64c5187611ebc827d7a9f2479cd7c78e8bf6d66232e8dc57328b09c", input: "0x", nonce: "0xe", r: "0x5be8d75183572592949237b32a9aec605631ca3e7471f038d69fff6a4b320777", s: "0xf41b170152f34644c1423b1aaf29b2229f05c35eb7534830d30c974c7f9c7c4", to: "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11", v: "0x2a", value: "0x7265bab9c48000" } }

    We expect the hex-encoded data from the raw field.

    HTTP Request

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

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/send \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "value" : 1.212
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/send HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "value" : 1.212
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/send",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"value\" : 1.212\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "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({ fromAddress: '0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      value: 1.212 }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/send');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "value" : 1.212
    }');
    
    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/etc/mainnet/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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"value\" : 1.212\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"value\" : 1.212\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,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\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"value\" : 1.212\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/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/etc/mainnet/txs/send"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"value\" : 1.212\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": {
            "from": "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
            "gas": "2000000",
            "gasLimit": "21000",
            "gasPrice": "11000000000",
            "nonce": 0,
            "to": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "value": "1212000000000000000"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)

    If request is successful, you’ll receive a JSON with the completed TX and an HTTP Status Code 200.

    Push Raw (Signed) Transaction

    Once you’ve finished signing the raw transaction locally, send that raw transaction to our Push Raw Transaction Endpoint.

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/txs/push

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/push \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "hex" : "0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/txs/push HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "hex" : "0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/push",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"hex\" : \"0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "push"
      ],
      "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: '0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/push');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "hex" : "0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69"
    }');
    
    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/etc/mainnet/txs/push")
    
    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\" : \"0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"hex\" : \"0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,txs,push", 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\" : \"0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/push")
      .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/etc/mainnet/txs/push"
    
      payload := strings.NewReader("{\n\t\"hex\" : \"0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69\"\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" : "0xdf568db46398af186829236aeb6fe37b2917671d68de305f99a802b6f02e91ea"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)

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

    { "hex" : 0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69 }

    If it succeeds, you’ll receive your transacation hash, for example:

    { "payload": { "hex" : "0xdf568db46398af186829236aeb6fe37b2917671d68de305f99a802b6f02e91ea" } }

    Get Pending Transactions

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/pending \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/pending 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/etc/mainnet/txs/pending",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "pending"
      ],
      "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/etc/mainnet/txs/pending');
    $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/etc/mainnet/txs/pending")
    
    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,etc,mainnet,txs,pending", 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/etc/mainnet/txs/pending")
      .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/etc/mainnet/txs/pending"
    
      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

    {
        "meta": {
            "totalCount": 2,
            "limit": 50,
            "results": 2
        },
        "payload": [
            {
                "hash": "0xdf568db46398af186829236aeb6fe37b2917671d68de305f99a802b6f02e91ea",
                "nonce": 4010,
                "blockHash": "0xdea1bd3956b8410f17dc0971309399114561b92a0a22419e286a7aaeea5c40e4",
                "blockNumber": 8550407,
                "transactionIndex": 0,
                "from": "0x97699afce0327e73b9978b7a90770acd9453ac61",
                "value": "0",
                "gasPrice": "20000000000",
                "gas": "4000000",
                "input": "0x60606040526000805460a060020a60ff02191674010000000000000000000000000000000000000000179055341561003657600080fd5b60008054600160a060020a033316600160a060020a0319909116179055610296806100626000396000f3006060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635a6b26ba811461008c5780638da5cb5b146100bb578063ca7d1ccb146100f7578063de242ff41461010f575b60005474010000000000000000000000000000000000000000900460ff16151561008a57600080fd5b005b341561009757600080fd5b61008a73ffffffffffffffffffffffffffffffffffffffff60043516602435610136565b34156100c657600080fd5b6100ce6101a0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561010257600080fd5b61008a60043515156101bc565b341561011a57600080fd5b610122610249565b604051901515815260200160405180910390f35b6000543373ffffffffffffffffffffffffffffffffffffffff90811691161461015e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff821681156108fc0282604051600060405180830381858888f19350505050151561019c57600080fd5b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000543373ffffffffffffffffffffffffffffffffffffffff9081169116146101e457600080fd5b60005474010000000000000000000000000000000000000000900460ff16151581151514610246576000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515021790555b50565b60005474010000000000000000000000000000000000000000900460ff16815600a165627a7a72305820e6bcaab642c13c39fb30fb0986dccbec8fdbf8e54b2228e7fa91400c25e6d29f0029"
            },
            {
                "hash": "0xebbaa3a833564c5c42af3c850ef57aeb913add69f713809cdeda3792bb871785",
                "nonce": 33,
                "blockHash": "0xdea1bd3956b8410f17dc0971309399114561b92a0a22419e286a7aaeea5c40e4",
                "blockNumber": 8550407,
                "transactionIndex": 1,
                "from": "0x3537dfccbd78da155962475471566807d8d47ebc",
                "to": "0x6667ed6cb6e7accc4004e8844dbdd0e72d58c31c",
                "value": "29806330000000000000",
                "gasPrice": "20000000000",
                "gas": "21000",
                "input": "0x"
            }
        ]
    }
    
    Info

    Pending Transactions Endpoint makes a call to the EVM and returns all pending transactions. The response might be limited if you lack credits.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/pending

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    LIMIT 50 limit to 50 transactions
    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 contains detailed information about the pending transactions.

    Get Queued Transactions

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/queued \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/queued 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/etc/mainnet/txs/queued",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "queued"
      ],
      "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/etc/mainnet/txs/queued');
    $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/etc/mainnet/txs/queued")
    
    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,etc,mainnet,txs,queued", 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/etc/mainnet/txs/queued")
      .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/etc/mainnet/txs/queued"
    
      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

    {
        "meta": {
            "totalCount": 3,
            "limit": 50,
            "results": 3
        },
        "payload": [
            {
                "hash": "0x950b160a02528589f488ae12a5a04fb609d0bbf3974129729b2282e8fb028a37",
                "nonce": 4042,
                "blockHash": "0x4305f6c6755bc82d955ed169e10979fc019ce400660f9892f2b558e25e4c6609",
                "blockNumber": 8550484,
                "transactionIndex": 0,
                "from": "0x97699afce0327e73b9978b7a90770acd9453ac61",
                "value": "0",
                "gasPrice": "20000000000",
                "gas": "4000000",
                "input": "0x60606040526000805460a060020a60ff02191674010000000000000000000000000000000000000000179055341561003657600080fd5b60008054600160a060020a033316600160a060020a0319909116179055610296806100626000396000f3006060604052600436106100615763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416635a6b26ba811461008c5780638da5cb5b146100bb578063ca7d1ccb146100f7578063de242ff41461010f575b60005474010000000000000000000000000000000000000000900460ff16151561008a57600080fd5b005b341561009757600080fd5b61008a73ffffffffffffffffffffffffffffffffffffffff60043516602435610136565b34156100c657600080fd5b6100ce6101a0565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b341561010257600080fd5b61008a60043515156101bc565b341561011a57600080fd5b610122610249565b604051901515815260200160405180910390f35b6000543373ffffffffffffffffffffffffffffffffffffffff90811691161461015e57600080fd5b73ffffffffffffffffffffffffffffffffffffffff821681156108fc0282604051600060405180830381858888f19350505050151561019c57600080fd5b5050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b6000543373ffffffffffffffffffffffffffffffffffffffff9081169116146101e457600080fd5b60005474010000000000000000000000000000000000000000900460ff16151581151514610246576000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000831515021790555b50565b60005474010000000000000000000000000000000000000000900460ff16815600a165627a7a72305820e6bcaab642c13c39fb30fb0986dccbec8fdbf8e54b2228e7fa91400c25e6d29f0029"
            },
            {
                "hash": "0x08da62a2725e8d4e127f4bcfb13fde8ce44b16234fd71231e888b4c6a69f2d08",
                "nonce": 30649,
                "blockHash": "0x4305f6c6755bc82d955ed169e10979fc019ce400660f9892f2b558e25e4c6609",
                "blockNumber": 8550484,
                "transactionIndex": 1,
                "from": "0x57a2cf1c9ff817f0a047552c3b021a3a68282d90",
                "to": "0xca68fe57a0e9987f940ebcc65fe5f96e7bc30128",
                "value": "0",
                "gasPrice": "2000000000",
                "gas": "1704624",
                "input": "0x1801fbe5b12682b03b2f97c8af118df338ca478703000000eed4004f595357f8109f83dd0000000a35e2921cc1832a5eebdaaf3591086b74ae12d23e03fe8ffdc369a363"
            },
            {
                "hash": "0xe484b162d5320b0ced332f04a0aef3b1eed108a4fc8fbbec11fe7ba13d6b3837",
                "nonce": 196,
                "blockHash": "0x4305f6c6755bc82d955ed169e10979fc019ce400660f9892f2b558e25e4c6609",
                "blockNumber": 8550484,
                "transactionIndex": 2,
                "from": "0x2d4beca01fde8963b3a2dbf8a838e0f2ebab0ff9",
                "to": "0xa11a23f2e9ce24a57f269c5f99dc926951a4d977",
                "value": "6914510000000000",
                "gasPrice": "50000000000",
                "gas": "21000",
                "input": "0x"
            }
        ]
    }
    
    Info

    Queued Transactions Endpoint makes a call to the EVM and returns all queued transactions. The response might be limited if you lack credits.

    HTTP Request

    GET /v1/bc/etc/${NETWORK}/txs/queued

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    LIMIT 50 limit to 50 transactions
    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 contains detailed information about the queued transactions.

    Get Estimate Transaction GasLimit

    Crypto APIs provides an endpoint for estimating the gas needed for a successful transaction. This is very useful when sending etc to contracts or making a transaction with additional data in it.

    You have to provide the following data: - from address; - to address; - value of the transaction; - data - this field is optional. However, if data is added it should be a valid hexadecimal number otherwise an error will be returned as a response!

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/txs/gas

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/gas \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
            "toAddress" : "0xc595B20EEC3d35E8f993d79262669F3ADb6328f7",
            "value" : 0.12,
            "data" : "24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7"
        }'
    
    
    POST /v1/bc/etc/mainnet/txs/gas HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
      "toAddress" : "0xc595B20EEC3d35E8f993d79262669F3ADb6328f7",
      "value" : 0.12,
      "data" : "24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/gas",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n  \"fromAddress\" : \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n  \"toAddress\" : \"0xc595B20EEC3d35E8f993d79262669F3ADb6328f7\",\n  \"value\" : 0.12,\n  \"data\" : \"24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "gas"
      ],
      "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({ fromAddress: '0x7857af2143cb06ddc1dab5d7844c9402e89717cb',
      toAddress: '0xc595B20EEC3d35E8f993d79262669F3ADb6328f7',
      value: 0.12,
      data: '24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/gas');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
      "toAddress" : "0xc595B20EEC3d35E8f993d79262669F3ADb6328f7",
      "value" : 0.12,
      "data" : "24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7"
    }');
    
    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/etc/mainnet/txs/gas")
    
    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  \"fromAddress\" : \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n  \"toAddress\" : \"0xc595B20EEC3d35E8f993d79262669F3ADb6328f7\",\n  \"value\" : 0.12,\n  \"data\" : \"24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n  \"toAddress\" : \"0xc595B20EEC3d35E8f993d79262669F3ADb6328f7\",\n  \"value\" : 0.12,\n  \"data\" : \"24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,txs,gas", 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  \"fromAddress\" : \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n  \"toAddress\" : \"0xc595B20EEC3d35E8f993d79262669F3ADb6328f7\",\n  \"value\" : 0.12,\n  \"data\" : \"24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/gas")
      .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/etc/mainnet/txs/gas"
    
      payload := strings.NewReader("{\n  \"fromAddress\" : \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n  \"toAddress\" : \"0xc595B20EEC3d35E8f993d79262669F3ADb6328f7\",\n  \"value\" : 0.12,\n  \"data\" : \"24224747A80F225FD841E7AB2806A2FDF78525B58C1BC1F5D5A5D3943B4214B6C350CE0D973CAD81BD7A6E57048A487939D7CD6373BF8C9F3ADB6328f7\"\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": {
            "gasLimit": "25148"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)

    If it succeeds, you’ll receive a response with the estimated gas, as follows:

    { "gasLimit": "25148" }

    Transactions GasPrice

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/txs/fee \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/txs/fee 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/etc/mainnet/txs/fee",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "txs",
        "fee"
      ],
      "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/etc/mainnet/txs/fee');
    $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/etc/mainnet/txs/fee")
    
    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,etc,mainnet,txs,fee", 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/etc/mainnet/txs/fee")
      .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/etc/mainnet/txs/fee"
    
      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

    {
        "payload": {
            "min": "0.000000001",
            "max": "200",
            "average": "10.5",
            "recommended": "20",
            "unit": "Gwei"
        }
    }
    
    Info

    Transactions Fee Endpoint gives information about the gas price for the successful transactions included in the last 1500 blocks. min shows the lowest gas price, max is the highest and average - the average gas price. recommended is the gas price 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. All gas prices are in Gwei.

    HTTP Request

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

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

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/morden/txs/refund \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
            -d '{
        "txHash" : "0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918",
        "privateKey": "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e" or "password": "SECRET123456", 
        "gasPrice": 12123340000
    }'
    
    
    
    POST /v1/bc/etc/morden/txs/refund HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "txHash" : "0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918",
        "privateKey": "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e" or "password": "SECRET123456",
        "gasPrice": 12123340000
    }
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/morden/txs/refund",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"txHash\" : \"0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918\",\n\t\"privateKey\": \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\"  or \"password\": \"SECRET123456\",\n\t\"gasPrice\": 12123340000\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "morden",
        "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({ txHash: '0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918',
      privateKey: '0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e' or password: 'SECRET123456',
      gasPrice: 12123340000 }));
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/morden/txs/refund');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "txHash" : "0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918",
        "privateKey": "0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e" or "password": "SECRET123456",
        "gasPrice": 12123340000
    }');
    
    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/etc/morden/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\"txHash\" : \"0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918\",\n\t\"privateKey\": \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\" or \"password\": \"SECRET123456\",\n\t\"gasPrice\": 12123340000\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"txHash\" : \"0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918\",\n\t\"privateKey\": \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\" or \"password\": \"SECRET123456\",\n\t\"gasPrice\": 12123340000\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,morden,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\"txHash\" : \"0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918\",\n\t\"privateKey\": \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\" or \"password\": \"SECRET123456\",\n\t\"gasPrice\": 12123340000\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/morden/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/etc/morden/txs/refund"
    
      payload := strings.NewReader("{\n\t\"txHash\" : \"0xcdc1c26803275b7ea6408d4019debfcf96e42f1c94b2b0a93f3e45d2ee4ab918\",\n\t\"privateKey\": \"0x17de216dff24b36c35af535c7d4d9d36f57326f3ee8aaf7fd373715c27a15b7e\" or \"password\": \"SECRET123456\",\n\t\"gasPrice\": 12123340000\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": "0x5dbdc5a5f26f59d9d0d18722e443a1bb669939c6ab898f654500ee0475908603"
        }
    }
    

    The Refund Transaction Endpoint allows users easily to return the amount in etc they have received from an unknown source. Only two fields are required: the txHash of the transcation and the privateKey or password (if you are using an account) of the recipient address/account (see examples). There is an optional field gasPrice. If gasPrice field is not set the system will set the recommended gasPrice from the Transaction Fee Endpoint.

    HTTP Request

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

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

    Contract

    Compared to other blockchains, contracts lie at the heart of Ethereum’s unique value proposition. Contracts can be expressively programmed in languages like Solidity; if you’re not familiar with Ethereum’s contract language you should definitely start there.

    We offer a number of API endpoints that significantly simplify contract creation and method calling. Via the methods below, you can embed new contracts into the Ethereum blockchain, check their code and ABI, and initiate contract methods and execution. Essentially, we provide a JSON/HTTP binding for your Ethereum contracts.

    With great power comes great responsibility; in other words, it’s easier to shoot yourself in the foot with Ethereum. Don’t The DAO it. Follow best security and safety practices when coding your smart contracts.

    Estimate Gas Smart Contract

    This endpoint returns the average gas price and gas limit set by the Ethereum Classic Blockchain. At this point for all kinds of deployments the json result will be as follows:

    { "payload": { "gas_price": "22000000000", "gas_limit": "4300000" } }

    The actual amount will be known after the deployment is complete.

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/contracts/gas \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/contracts/gas 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/etc/mainnet/contracts/gas",
      "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:" ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "contracts",
        "gas"
      ],
      "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/etc/mainnet/contracts/gas');
    $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/etc/mainnet/contracts/gas")
    
    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,etc,mainnet,contracts,gas", 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/etc/mainnet/contracts/gas")
      .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/etc/mainnet/contracts/gas"
    
      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

    {
        "payload": {
            "gas_price": "22000000000",
            "gas_limit": "4300000"
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/contracts/gas

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    Deploy Smart Contract

    The Deploy Smart Contract Endpoint allows you to push your smart contract to the Ethereum Classic Blockchain. You have to provide the bytecode - compiled to binary solidity code. At this point you can validate and compile your smart contract to bytecode at the Ethereum official website - Solidity IDE. When you finish the solidity code go to Compile -> Choose the name of the contract -> Details and from there go to the part BYTECODE and copy the object propery. It should only be a hexadecimal number, for example:

    "object":"60806040523480156200001157600080fd5b50336000................"

    A private key (associated with a funded Ethereum external account), fromAddress, byteCode, gasPrice and gasLimit, to publish, Crypto APIs will embed the contract into the blockchain and return the transaction hash that created the contract, for example

    { "privateKey" : "4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1", "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded", "gasPrice" : 21000000000, "gasLimit" : 2100000, "byteCode": "608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553 .... 191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029" }

    The response will be date and hash of the transaction:

    { "payload": { "hex": "0x04d89dafdeefa6fddecbdbae56e8c4b6c838621f379a6d05839a9044e77c96b5" } }

    It is very important to provide enough gas in order the transaction to be successful!

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/contracts \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "privateKey" : "4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1",
            "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
            "gasPrice" : 21000000000,
            "gasLimit" : 2100000,
            "byteCode": "608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/contracts HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
    
      "privateKey" : "4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1",
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "gasPrice" : 21000000000,
      "gasLimit" : 2100000,
      "byteCode": "608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/contracts",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [https://api.cryptoapis.io],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "contracts"
      ],
      "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({ privateKey: '4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1',
      fromAddress: '0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded',
      gasPrice: 21000000000,
      gasLimit: 2100000,
      byteCode: '608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/contracts');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
    
      "privateKey" : "4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1",
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "gasPrice" : 21000000000,
      "gasLimit" : 2100000,
      "byteCode": "608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029"
    }');
    
    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/etc/mainnet/contracts")
    
    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\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,contracts", 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\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/contracts")
      .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/etc/mainnet/contracts"
    
      payload := strings.NewReader("{\n\t\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d.................c11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"608060408181019052600f81527f546f6b656e2046756c6c204e616d65000000000000000000000000000000000060208201908152905161004291600691610152565b5060408051808201909152600381527f544b4e000000000000000000000000000000000000000000000000000000000060208201908152905161008791600791610152565b506004600855600854600a0a633b9aca00026009557323cc32a2f2cf1477e7aa43774663f7f96e3b8f99600a60006101000a815481600160a060020a030219169083600160a060020a031602179055506377359400600b553   ....   191505b50935050505060405180910390a350600193925050505600a165627a7a723058208ecc61f8d5cfedb84148a946e7c6272eef17b89135c5b5b89cf833ead9d09b760029\"\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": "0x04d89dafdeefa6fddecbdbae56e8c4b6c838621f379a6d05839a9044e77c96b5"
        }
    }
    
    HTTP Request

    POST /v1/bc/etc/${NETWORK}/contracts

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

    Tokens

    Crypto APIs Token API allows you to get token balances of addressess, as well as to transfer tokens from one address to another.

    Get Token Balance

    In the request url you should provide the address you want to observe and the contract address that created the token. After sending the request you will receive a json object with the name of the token, the amount and its symbol.

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance 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/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "token",
        "0x737165b2913122aF76e05a3E6bbF2a6128484662",
        "0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0",
        "balance"
      ],
      "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/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance');
    $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/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance")
    
    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,etc,mainnet,token,0x737165b2913122aF76e05a3E6bbF2a6128484662,0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0,balance", 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/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance")
      .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/etc/mainnet/tokens/0x737165b2913122aF76e05a3E6bbF2a6128484662/0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0/balance"
    
      req, _ := http.NewRequest("GET", url, nil)
    
      res, _ := http.DefaultClient.Do(req)
    
      req.Header.Add("Content-Type", "application/json")
      req.Header.Add("X-API-Key", "my-api-key")
    
      defer res.Body.Close()
      body, _ := ioutil.ReadAll(res.Body)
    
      fmt.Println(res)
      fmt.Println(string(body))
    
    }
    

    Response body

    {
        "payload": {
            "name": "Bitcoin Classic Token",
            "token": "1900.30012946",
            "symbol": "BCT"
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/tokens/{address}/{contract}/balance

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    ADDRESS ------- address with tokens (e.g. "0x737165b2913122aF76e05a3E6bbF2a6128484662")
    CONTRACT ------- contract address (e.g. "0x1BE6D61B1103D91F7f86D47e6ca0429259A15ff0")
    Transfer Tokens

    In order to transfer tokens from one address to another you should provide the from address, the private key or password (if it is an account stored on our servers), the to address, the contract address that created the tokens and the amount of tokens you would like to transfer. It is also necessary to provide gas price and gas limit. By default these are set to: 21000000000 wei and 60000 wei, accordingly. The amount of token is per unit, for example: if you want to send 120 tokens you should specify:

    "token" : 120;

    and for 10.5 tokens:

    "token" : 10.5,

    etc...;

    There is one optional field: nonce. The nonce represents the transactions count for the specified from address. If not specified the system will automatically calculate the correct nonce.

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/transfer \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "contract" : "0x3d045fcf9d7009450ca6c504ac164adba42dbbd3",
            "password": "abc123456" or "privateKey" : "f8b938cab......................4841e65664f",
            "gasPrice" : 11500000000,
            "gasLimit" : 60000,
            "token" : 115.221,
            "nonce": 14
        }'
    
    
    POST /v1/bc/etc/mainnet/tokens/transfer HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "contract" : "0x3d045fcf9d7009450ca6c504ac164adba42dbbd3",
      "password": "abc123456" or "privateKey" : "f8b938cab......................4841e65664f",
      "gasPrice" : 11500000000,
      "gasLimit" : 60000,
      "token" : 115.221
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/transfer",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"contract\" : \"0x3d045fcf9d7009450ca6c504ac164adba42dbbd3\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"f8b938cab......................4841e65664f\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115.221\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "token",
        "transfer"
      ],
      "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({ fromAddress: '0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      contract: '0x3d045fcf9d7009450ca6c504ac164adba42dbbd3',
      password: 'abc123456' or privateKey: 'f8b938cab......................4841e65664f',
      gasPrice: 11500000000,
      gasLimit: 60000,
      token: 115.221 }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/transfer');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "contract" : "0x3d045fcf9d7009450ca6c504ac164adba42dbbd3",
      "password" : "abc123456" or "privateKey" : "f8b938cab......................4841e65664f",
      "gasPrice" : 11500000000,
      "gasLimit" : 60000,
      "token" : 115.221
    }');
    
    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/etc/mainnet/tokens/transfer")
    
    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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"contract\" : \"0x3d045fcf9d7009450ca6c504ac164adba42dbbd3\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"f8b938cab......................4841e65664f\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115.221\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"contract\" : \"0x3d045fcf9d7009450ca6c504ac164adba42dbbd3\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"f8b938cab......................4841e65664f\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115.221\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,token,transfer", 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\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"contract\" : \"0x3d045fcf9d7009450ca6c504ac164adba42dbbd3\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"f8b938cab......................4841e65664f\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115.221\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/transfer")
      .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/etc/mainnet/tokens/transfer"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0xcbb36e2019f03c7d6dc8536b0d32e31aef18bded\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"contract\" : \"0x3d045fcf9d7009450ca6c504ac164adba42dbbd3\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"f8b938cab......................4841e65664f\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115.221\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": "0xa67f56a7c184ae9b667d7d5401d1ee38378bc3f08751b131bf0be2dbac96102b"
        }
    }
    
    HTTP Request

    POST /v1/bc/etc/${NETWORK}/tokens/transfer

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    Get Token Total Supply And Decimals

    In the request url you should provide the contract you want to observe. After sending the request you will receive a json object with the total supply and the decimals of the token.

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db 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/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "tokens",
        "contract",
        "0x085fb4f24031EAedbC2B611AA528f22343eB52Db",
      ],
      "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/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db');
    $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/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db")
    
    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,etc,mainnet,tokens,contract,0x085fb4f24031EAedbC2B611AA528f22343eB52Db", 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/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db")
      .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/etc/mainnet/tokens/contract/0x085fb4f24031EAedbC2B611AA528f22343eB52Db"
    
      req, _ := http.NewRequest("GET", url, nil)
    
      res, _ := http.DefaultClient.Do(req)
    
      req.Header.Add("Content-Type", "application/json")
      req.Header.Add("X-API-Key", "my-api-key")
    
      defer res.Body.Close()
      body, _ := ioutil.ReadAll(res.Body)
    
      fmt.Println(res)
      fmt.Println(string(body))
    
    }
    
    

    Response body

    {
        "payload": {
            "decimals": 8,
            "totalSupply": 8904044
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/tokens/contract/{contract}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    CONTRACT ------- contract address (e.g. "0x085fb4f24031EAedbC2B611AA528f22343eB52Db")

    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. While there are many possible use cases, the two we hear most about are: 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. A method to easily fund a multisignature address from any wallet by providing a classic address that will automatically transfer to the multisignature/pay-to-script-hash address. We do not take a fee on payment forwarding, other than the required 21,000 units of wei for gas 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

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/payments \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
          "callback": "http://myaddress.com/paymet_forwarding_hook",
          "from": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
          "to": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
          "privateKey" : "1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e",
          "confirmations": 2,
          "gasPrice" : 21000000000,
          "gasLimit" : 21000
      }'
    
    
    POST /v1/bc/etc/mainnet/payments HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
        "to": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
        "privateKey" : "1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e",
        "confirmations": 2,
        "gasPrice" : 21000000000,
        "gasLimit" : 21000
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "http://localhost:9146/v1/etc/mainnet/payments",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "cache-control": "no-cache",
        "Postman-Token": "f2553799-4ae0-4a1e-841d-ad6f599ab402"
      },
      "processData": false,
      "data": "{\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n    \"to\": \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n    \"privateKey\" : \"1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e\",\n    \"confirmations\": 2,\n    \"gasPrice\" : 21000000000,\n    \"gasLimit\" : 21000\n}\n"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "localhost"
      ],
      "port": "9146",
      "path": [
        "v1",
        "etc",
        "mainnet",
        "payments"
      ],
      "headers": {
        "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({ callback: 'http://myaddress.com/paymet_forwarding_hook',
      from: '0x7857af2143cb06ddc1dab5d7844c9402e89717cb',
      to: '0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8',
      privateKey: '1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e',
      confirmations: 2,
      gasPrice: 21000000000,
      gasLimit: 21000 }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/payments');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
        "to": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
        "privateKey" : "1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e",
        "confirmations": 2,
        "gasPrice" : 21000000000,
        "gasLimit" : 21000
    }
    ');
    
    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/etc/mainnet/payments")
    
    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    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n    \"to\": \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n    \"privateKey\" : \"1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e\",\n    \"confirmations\": 2,\n    \"gasPrice\" : 21000000000,\n    \"gasLimit\" : 21000\n}\n"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n    \"to\": \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n    \"privateKey\" : \"1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e\",\n    \"confirmations\": 2,\n    \"gasPrice\" : 21000000000,\n    \"gasLimit\" : 21000\n}\n"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,payments", 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    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n    \"to\": \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n    \"privateKey\" : \"1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e\",\n    \"confirmations\": 2,\n    \"gasPrice\" : 21000000000,\n    \"gasLimit\" : 21000\n}\n");
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/payments")
      .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/etc/mainnet/payments"
    
        payload := strings.NewReader("{\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"0x7857af2143cb06ddc1dab5d7844c9402e89717cb\",\n    \"to\": \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n    \"privateKey\" : \"1ddb065abd61315dc8f7632ad4b1a2e136b2fa3b7ab27105e98b7739093a8f2e\",\n    \"confirmations\": 2,\n    \"gasPrice\" : 21000000000,\n    \"gasLimit\" : 21000\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": {
            "uuid": "7f0c4666-af1f-44a3-b5f5-1a3c2b904283",
            "from": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
            "to": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
            "confirmations": 2,
            "callback": "http://myaddress.com/paymet_forwarding_hook",
            "gasPrice": "21000000000",
            "gasLimit": "21000"
        }
    }
    

    There are two ways to create an automated payment forwarding:

    If you have a keystore file/account create on our servers you need to provide the following information: - from address - to address, - callback, - password, - confirmations - after how many confirmations to execute the payment forwarding - gasPrice (Optional) - gasLimit (Optional)

    Otherwise, in order to create an automated payment forwarding for an address that is not stored on our servers you should proved the following information: - from address, - to address, - callback, - private key - confirmations - after how many confirmations to execute the payment forwarding - gasPrice (Optional) - gasLimit (Optional)

    If gasPrice or gasLimit is not specified, the total gas fee will automatically be taken from the transaction that triggered the payment forwarding.

    When the from address receives ethers from a transaction the same amount (the gas fee of 21000 units of wei will be substracted) will be forwarded to the to address automatically. If you want to change the to address you have first to delete this payment forwarding and then add the new one for the same address. For more information how to delete payment forwaring view next section: Delete Payment Forwarding. The callback is the url to which a message will be sent after processing a payment forwarding.

    Confirmations can be any number between 1 and 20. Set to 1 means that webhooks will be sent immediately after the block that includes transactions with the specified address is mined. However, since there is the possibility of blockchain block re-write, we suggest that users set the confirmations at least to 6.

    HTTP Request

    POST /v1/bc/etc/${NETWORK}/payments

    Payment Forwarding Response

    After executing the forwarding payment a message will be sent to the specified callback(url), similar to the following:

    {
        "currency": "ETC",
        "network": "mainnet",
        "type": "PAYMENT_FORWARDING",
        "uuid": "238c883e-f560-4297-949d-b3f45f01dbee",
        "txHash": "0xc8019576c5b8140476d28217db711bb9bc642216071b7186d7abd7a97954cfcb",
        "url" : "http://myaddress.com/paymet_forwarding_hook",
        "status": "DONE",
        "message": "Payment forwarding was successful!"
    }
    

    There are total of four payment statuses: DONE, FAILED, PENDING and OUT_OF_BALANCE.

    For some reasons the payment forwarding may fail.

    {
        "payload": {
            "currency": "ETC",
            "network": "mainnet",
            "uuid": "238c883e-f560-4297-949d-b3f45f01dbee",
            "type": "PAYMENT_FORWARDING",
            "url" : "http://myaddress.com/paymet_forwarding_hook",
            "status": "FAILED",
        }
    }
    

    If status is FAILED it means that this forwarding will be executed when the next block is mined.

    Payments might be pending:

    {
        "payload": {
            "currency": "ETC",
            "network": "mainnet",
            "uuid": "238c883e-f560-4297-949d-b3f45f01dbee",
            "type": "PAYMENT_FORWARDING",
            "url" : "http://myaddress.com/paymet_forwarding_hook",
            "status": "PENDING",
        }
    }
    
    

    When next block is mined an attempt for executing this payment will be made.

    If the value from the transaction that triggers the payment forwarding is spent before the execution of the payment is done, a message will be sent to the specified url:

    {
        "currency": "ETC",
        "network": "mainnet",
        "uuid": "238c883e-f560-4297-949d-b3f45f01dbee",
        "type": "PAYMENT_FORWARDING",
        "url" : "http://myaddress.com/paymet_forwarding_hook",
        "status": "OUT_OF_BALANCE",
        "message": "Payment forwarding was not successful! Reason: Balance is not enough!"
    }
    

    When status is set to OUT_OF_BALANCE other attempts for executing the payment will not be made.

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. morden or mainnet)
    Delete Payment Forwarding

    Sample Data

    
    curl -X DELETE https://api.cryptoapis.io/v1/bc/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    DELETE /v1/bc/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba 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/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba",
      "method": "DELETE",
      "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": "DELETE",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "payments",
        "d2f41deb-3e13-4e19-b197-c2481f9d9eba"
      ],
      "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/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba');
    $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/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.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,etc,mainnet,payments,d2f41deb-3e13-4e19-b197-c2481f9d9eba", 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/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba")
      .delete(null)
      .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/etc/mainnet/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba"
    
      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))
    }
    

    Response body

    {
        "payload": {
          "message": "Payment forwarding with uuid: d2f41deb-3e13-4e19-b197-c2481f9d9eba was successfully deleted!"
        }
    }
    

    If you want to delete a payment forwarding just specify the uuid of the payment in the url request.

    HTTP Request

    DELETE /v1/bc/etc/${NETWORK}/payments/${UUID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    UUID ------- the uuid of the payment
    Get List Of My Payments Forwardings

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/payments \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    GET /v1/bc/etc/mainnet/payments 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/etc/mainnet/payments",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "payments"
      ],
      "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/etc/mainnet/payments');
    $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/etc/mainnet/payments")
    
    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,etc,mainnet,payments", 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/etc/mainnet/payments")
      .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/etc/mainnet/payments"
    
      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

    {
        "payload": [
            {
                "from": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
                "to": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "uuid": "7f0c4666-af1f-44a3-b5f5-1a3c2b904283",
                "callback": "http://myaddress.com/paymet_forwarding_hook",
                "confirmations": 2,
                "gasPrice": "21000000000",
                "gasLimit": "21000"
            }
        ],
        "meta": {
            "totalCount": 1,
            "results": 1
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/payments

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

    If the request is successful, you’ll receive a JSON (see the response body) and an HTTP Status Code 200.

    Get My Past Payments Forwardings

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/payments/history \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    GET /v1/bc/etc/mainnet/payments/history 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/etc/mainnet/payments/history",
      "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"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "payments",
        "history"
      ],
      "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/etc/mainnet/payments/history');
    $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/etc/mainnet/payments/history")
    
    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,etc,mainnet,payments,history", 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/etc/mainnet/payments/history")
      .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/etc/mainnet/payments/history"
    
      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

    {
        "payload": [
            {
                "uuid": "d597c387-1c1a-46e4-a7e3-a25bff67c1e0",
                "payment_uuid": "045f66c9-172b-479f-9e6f-54e5fe83facf",
                "status": "DONE",
                "block_height": 8545175,
                "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8"
            },
            {
                "uuid": "350c88d3-ed77-406a-aaae-557f9a63418a",
                "payment_uuid": "045f66c9-172b-479f-9e6f-54e5fe83facf",
                "status": "DONE",
                "block_height": 8544498,
                "transaction": "0x4f3931bd1f48a94c50f88b93af02ccb41944b16a9083fb0c5992c2879293adc3"
            },
            {
                "uuid": "4970a327-ef9f-402f-9074-a653a53437bd",
                "payment_uuid": "045f66c9-172b-479f-9e6f-54e5fe83facf",
                "status": "DONE",
                "block_height": 8544125,
                "transaction": "0x9d8a22afd76a6b57ac3a95c04be7ec40f498b8d63f8b7c8fd23e079149f6621c"
            }
        ],
        "meta": {
            "totalCount": 3,
            "results": 3
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/payments/history

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

    If the request is successful, you’ll receive a JSON (see the response body) and an HTTP Status Code 200.

    Webhook Notifications

    Ethereum is a highly transactional system. Many usage patterns require knowing when an event occurs: i.e., when a transaction is included into a block, when an address is updated, etc. Instead of requiring you to continuously poll resources, we provide push APIs to facilitate those use cases, and support Webhooks for that express purpose.

    Webhook Types

    We support a number of different event types, and you can filter your notification requests depending on how you structure your Event request object.

    Event Description
    CONFIRMED_TX Triggered for every new transaction making it into a new block; in other words, for every first transaction confirmation. This is equivalent to listening to the new-block event and fetching each transaction (or filtered transaction) in the new Block. The payload is a confirmed TX.
    NEW_BLOCK Triggered for every new block. The payload is a Block.
    ADDRESS Simplifies listening to confirmations on all transactions for a given address up to a provided threshold. The payload is a TX. If the transaction is not mined and is in the pending queue a webhook will be sent as well
    TXPOOL Similar to ADDRESS Webhook, differes in that it is for a given address found in the transactions in the txpool of the Ethereum Blockchain. The payload is a list with transactions from the txpool for the particular address.
    TRANSACTION_CONFIRMATIONS Receive confirmations for a specified address. The payload is a json object that includes the transaction hash, the address, the block number, and the current and max confirmations.
    Using Webhooks

    For Webhooks, the JSON Event should be sent using a POST request to the “create webhook endpoint” and include a url property to denote where payloads should be delivered. The TX or Block associated with the Event will be POSTed to the provided url. The POSTed payload will also include X-EventType and X-EventId metadata in the HTTP header specifying the event type and id of the Webhook which triggered the payload.

    We retry individual payloads to your url five times; if one fails, we wait exponentially between retries: 1 second, 2s, 4s, 8s, 16s. In order to protect against stale callback urls, your Event will be deleted if it reaches 50 aggregate callback_errors from failed payloads.

    A Webhook request expects a response with status code 200 (OK) or it will retry the request.

    Create a Webhook

    Using a partially filled out Event, you can create a Webhook using this resource. Check the Event object description and types of events to understand the available options.

    Sample Data

    
    curl -X POST https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{ 
            "event" : "CONFIRMED_TX",
            "url" : "http://myaddress.com",
            "confirmations": 12,
            "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8"
        }'
    
    
    
    POST /v1/bc/etc/mainnet/hooks HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    { 
      "event" : "CONFIRMED_TX",
      "url" : "http://myaddress.com",
      "confirmations": 12,
      "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{ \n\t\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\", \n\t\"confirmations\": 12, \n\t\"transaction\": \"0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8\"\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "hooks"
      ],
      "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({ event: 'CONFIRMED_TX',
      url: 'http://somepoint.point',
      confirmations: 12,
      transaction: '0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{ 
      "event" : "CONFIRMED_TX",
      "url" : "http://somepoint.point",
      "confirmations": 12,
      "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8"
    }');
    
    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/etc/mainnet/hooks")
    
    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\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\",\n\t\"confirmations\": 12, \n\t\"transaction\": \"0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{ \n\t\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\",\n\t\"confirmations\": 12, \n\t\"transaction\": \"0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,etc,mainnet,hooks", 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\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\",\n\t\"confirmations\": 12, \n\t\"transaction\": \"0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks")
      .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/etc/mainnet/hooks"
    
      payload := strings.NewReader("{ \n\t\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\",\n\t\"confirmations\": 12, \n\t\"transaction\": \"0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8\"\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))
    
    }
    
    
    HTTP Request

    POST /v1/bc/etc/${NETWORK}/hooks

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    Example: Event type Confirmed_tx:

    Requested data: { "event" : "CONFIRMED_TX", "url" : "http://myaddress.com", "confirmations": 12, "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8" }

    Response body:

    {
      "payload": {
          "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355",
          "event": "CONFIRMED_TX",
          "transaction": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8",
          "confirmations": 12,
          "url" : "http://myaddress.com",
          "active": true,
          "created": "2019-10-24 13:41:49 UTC"
      }
    }
    

    Confirmations can be any number between 1 and 100. Set to 1 means that webhooks will be sent immediately after the block that includes transactions with the specified address is mined. However, since there is the possibility of blockchain block re-write, we suggest that users set the confirmations at least to 6 (webhooks will be sent 6 blocks after the targeted block).

    The sent message will be similar to the following:

    { "blockHeight": 8545175, "blockHash": "0x51b00059789d257a93646854ff1156265e4e5847fac9243d621f6b2231d74395", "currency": "ETC", "network": "mainnet", "url" : "http://myaddress.com", "type": "CONFIRMED_TX", "txHash": "0x4f55dfea21302dda5f9675c9a4524803842c5ed54ab5fdcf5564bd8cbe033fb8", "confirmations": 6 }

    Example: Event type NEW_BLOCK:

    Requested data: { "event" : "NEW_BLOCK", "url" : "http://myaddress.com" }

    Response:

    {
        "payload": {
            "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355",
            "event": "NEW_BLOCK",
            "url": "http://myaddress.com"
        }
    }
    

    The sent message will be similar to the following:

    { "currency": "ETC", "network": "mainnet", "url": "http://myaddress.com", "type": "NEW_BLOCK", "blockHeight": 8550138, "blockHash": "0x6b2343ceff228b0773b92c3120ebfd6c21f837ba2fba7d49cce7e630c6d6f3c3" }

    Example: Event type ADDRESS:

    Requested data:

    { "event" : "ADDRESS", "address" : "0xe816c453a99b12bb65ea55db22a6fe70f63c2c7a" "url" : "http://somepoint.point", "confirmations" : 1, }

    Confirmations can be any number between 1 and 100. Set to 1 means that webhooks will be sent immediately after the block that includes transactions with the specified address is mined. However, since there is the possibility of blockchain block re-write, we suggest that users set the confirmations at least to 6 (webhooks will be sent 6 blocks after the targeted block).

    Response:

    {
        "payload": {
            "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355",
            "event": "ADDRESS",
            "confirmations" : 1,
            "address": "0xe816c453a99b12bb65ea55db22a6fe70f63c2c7a",
            "url": "http://myaddress.com"
        }
    }
    

    The sent message will be similar to the following:

    { "currency": "ETC", "network": "mainnet", "url": "http://myaddress.com", "type": "ADDRESS", "blockHeight": 8549821, "blockHash": "0x70bc385fca38bec382a49c0776a10c17dd95d7924dbb57f98e770c09a2cad0a4", "confirmations": 1, "address": "0xd6054746a43e3a5c47a18796dc47437574127561", "txHash": "0x70bc385fca38bec382a49c0776a10c17dd95d7924dbb57f98e770c09a2cad0a4" }

    If the address is included in a transaction in the unconfirmed queue waiting to be mined the following message will be sent:

    { "currency": "ETC", "network": "mainnet", "url": "http://somepoint.point", "type": "ADDRESS", "blockHeight": -1, "pending": true, "address": "0xd6054746a43e3a5c47a18796dc47437574127561", "txHash": "0x70bc385fca38bec382a49c0776a10c17dd95d7924dbb57f98e770c09a2cad0a4" }

    Example: Event type TXPOOL:

    Requested data:

    { "event": "TXPOOL", "url" : "http://somepoint.point", "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8", }

    Response:

    {
      "payload": {
          "uuid": "c63dee82-acbe-4c2c-95c4-020bc29c253f",
          "event": "TXPOOL",
          "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
          "url": "http://somepoint.point"
      }
    }
    

    The sent message will be similar to the following:

    { "type": "TXPOOL", "txs": { "hash": "0x70bc385fca38bec382a49c0776a10c17dd95d7924dbb57f98e770c09a2cad0a4", "nonce": 4321439, "blockHash": "0x35fdca2d0c08bbd73721996fe78118f6d92f353b9722ed6da997e6819ae5e7d9", "blockNumber": 8549821, "transactionIndex": 0, "from": "0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d", "to": "0xd6054746a43e3a5c47a18796dc47437574127561", "value": "103884721883799008", "gasPrice": "1100000000", "gas": "50000", "input": "0x" }, "currency": "ETC", "network": "mainnet", "address":"0xd6054746a43e3a5c47a18796dc47437574127561", "url": "http://somepoint.point", }

    Example: Event type TRANSACTION_CONFIRMATIONS:

    Requested data:

    { "event" : "TRANSACTION_CONFIRMATIONS", "url" : "https://blockchain.requestcatcher.com", "confirmations": 12, "address" : "0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d" }

    Confirmations can be any number between 1 and 100. Set to 1 means that webhooks will be sent immediately after the block that includes transactions with the specified address is mined. However, since there is the possibility of blockchain block re-write, we suggest that users set the confirmations at least to 6.

    Response:

    {
      "payload": {
          "uuid": "7c0eff39-957c-4f13-89e0-1d0743d68679",
          "event": "TRANSACTION_CONFIRMATIONS",
          "confirmations": 12,
          "address": "0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d",
          "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
          "created": "2019-10-25 08:15:30 UTC",
          "active": true
      }
    }
    

    The sent message will be similar to the following:

    { "currentConfirmations": 1, "address": "0x9eab4b0fc468a7f5d46228bf5a76cb52370d068d", "blockHeight": 8550127, "currency": "ETC", "type": "TRANSACTION_CONFIRMATIONS", "txHash": "0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb", "maxConfirmations": 3, "network": "mainnet" }

    Get My Webhooks

    List Webhook Endpoint provides a list with the webhooks for a given user id.

    Sample Data

    
    curl -X GET https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/etc/mainnet/hooks 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/etc/mainnet/hooks",
      "meosod": "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 = {
      "meosod": "GET",
      "hostname": [
        "api",
        "cryptoapis",
        "io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "hooks"
      ],
      "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();
    
    
    s
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks');
    $request->setMeosod(HTTP_Meos_GET);
    
    $request->seoseaders(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/etc/mainnet/hooks")
    
    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("api,cryptoapis,io")
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("GET", "v1,bc,etc,mainnet,hooks", 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/etc/mainnet/hooks")
      .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/etc/mainnet/hooks"
    
        req, _ := http.NewRequest("GET", urs
    
        req.Header.Add("Content-Type", "apps
        req.Header.Add("X-API-Key", "my-apis
    
        res, _ := http.DefaultClient.Do(reqs
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)s
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    
    

    Response body

    {
        "payload": [
            {
                "uuid": "0c87ba2d-ca7c-4542-a557-0e503c886e6e",
                "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
                "created": "2019-10-25 08:15:30 UTC",
                "active": true
                "event": "NEW_BLOCK",
    
            },
            {
                "uuid": "f6bce46e-ea60-4c13-b1c2-2e0fab511917",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "confirmations": 4,
                "event": "ADDRESS",
                "created": "2019-10-24 13:41:49 UTC",
                "active": true
            },
            {
                "uuid": "e6a8700b-605b-4b36-85f4-f805c3540afd",
                "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
                "height": 8550127,
                "transaction": "0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb",
                "confirmations": 12,
                "event": "CONFIRMED_TX",
                "created": "2019-10-24 13:41:49 UTC",
                "active": true
            },
            {
                "uuid": "31b418e7-0263-42b8-b2d8-095b4995f0d3",
                "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "event": "TXPOOL",
                "created": "2019-10-24 13:41:49 UTC",
                "active": true
            },
            {
                "uuid": "471c9d28-8f1e-4f8f-aa63-7a4925fd75f2",
                "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "confirmations": 1,
                "event": "ADDRESS",
                "created": "2019-10-24 13:41:49 UTC",
                "active": true
            },
            {
                "uuid": "0c3546aa-2e4f-4cfe-bcbb-c043b4090239",
                "webhookId": "12d45342-8ed9-4c4a-aab0-6f47218ab583",
                "height": -1, //height is -1 since this tx is not yet mined nor confirmed
                "transaction": "0xdbc71fd5d32e94e3e6cbedfc3e1e7c1d85852f0c8b8a64bdb4b1a50a350d40eb",
                "confirmations": 1,
                "event": "CONFIRMED_TX",
                "created": "2019-10-24 13:41:49 UTC",
                "active": true
            }
        ],
        "meta": {
            "totalCount": 6,
            "index": 0,
            "limit": 50,
            "results": 6
        }
    }
    
    HTTP Request

    GET /v1/bc/etc/${NETWORK}/hooks

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    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
    Delete a Webook

    Sample Data

    
    curl -X DELETE https://api.cryptoapis.io/v1/bc/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    DELETE /v1/bc/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0 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/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0",
      "meosod": "DELETE",
      "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 = {
      "meosod": "DELETE",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "mainnet",
        "hooks",
        "155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0"
      ],
      "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/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0');
    $request->setMeosod(HTTP_Meos_DELETE);
    
    $request->seoseaders(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/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.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,etc,mainnet,hooks,155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0", 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/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0")
      .delete(null)
      .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/etc/mainnet/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0"
    
      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))
    
    }
    
    

    Response body

    {
        "payload": {
            "message": "Webhook with id : 155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0 was successfully deleted!"
        }
    }
    

    If you want to delete a webhook just specify the id of the webhook (the one that was returned in the JSON when creating the webhook) in the url request.

    HTTP Request

    DELETE /v1/bc/etc/${NETWORK}/hooks/${WEBHOOK_UUID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. morden or mainnet)
    WEBHOOK_UUID ------- Webhook uuid
    Delete All My Webhooks

    Sample Data

    
    curl -X DELETE https://api.cryptoapis.io/v1/bc/etc/morden/hooks/all \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    DELETE /v1/bc/etc/ropsten/hooks/all 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/etc/ropsten/hooks/all",
      "meosod": "DELETE",
      "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 = {
      "meosod": "DELETE",
      "hostname": [
        "https://api.cryptoapis.io"
      ],
      "path": [
        "v1",
        "bc",
        "etc",
        "ropsten",
        "hooks",
        "all"
      ],
      "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/etc/ropsten/hooks/all');
    $request->setMeosod(HTTP_Meos_DELETE);
    
    $request->seoseaders(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/etc/ropsten/hooks/all")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.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,etc,ropsten,hooks,all", 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/etc/ropsten/hooks/all")
      .delete(null)
      .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/etc/ropsten/hooks/all"
    
      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))
    
    }
    
    

    Response body

    {
      "payload": {
          "message": "All Webhooks were successfully deleted!"
      },
      "meta": {
          "totalCount": 15,
          "results": 15
      }
    }
    

    TotalCount and results indicate how many Webhooks were deleted.

    HTTP Request

    DELETE /v1/bc/etc/${NETWORK}/hooks/all

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

    This endpoint deletes all Webhooks for the specified network.