NAV
Shell HTTP JavaScript Node.JS PHP Ruby Python Java GO
  • Getting started
  • REST APIs
  • WebSockets
  • Standards and Conventions
  • Errors and Rate Limits
  • Blockchain API

    Some of Ethereum’s main points:

    Chain Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/info \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/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/eth/rinkeby/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",
        "eth",
        "rinkeby",
        "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/eth/rinkeby/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/eth/rinkeby/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,eth,rinkeby,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/eth/rinkeby/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/eth/rinkeby/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": "rinkeby",
            "height": 4190581,
            "difficulty": "7713546",
            "bestBlockHash": "0x42e6e4c11bebf7343720aaf7bcc1f9edeae25f82e57efa2aca14db6ffe95a730",
            "txs_count": 31708815,
            "synced": true
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    Block Hash Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383 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/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383",
      "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",
        "eth",
        "mainnet",
        "blocks",
        "0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383"
      ],
      "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/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383');
    $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/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383")
    
    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,eth,mainnet,blocks,0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383", 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/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383")
      .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/eth/mainnet/blocks/0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383"
    
      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": "ETH.mainnet",
            "height": 523442,
            "hash": "0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383",
            "parent_hash": "0x3e3ad7b9a63de7a1f1f564ee5393876caf61eff04d7c330bfe6df9b942c606d6",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "21000",
            "size": "658 bytes",
            "timestamp": 1447237199,
            "date": "2015-11-11 10:19:59 +UTC",
            "transactions": 1,
            "difficulty": "7657563137253",
            "total_difficulty": "2874342750898990991",
            "gas_limit": "3141592",
            "nonce": "0x32dd2d75a55f1463",
            "mined_by": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069 in 7 secs",
            "uncles": [],
            "extra_data": "0xd983010203844765746887676f312e342e328777696e646f7773",
            "confirmations": 7023472,
            "total_fees": "1050000000000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

    0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383

    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.

    Block Height Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/blocks/523442 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/blocks/523442 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/eth/mainnet/blocks/523442",
      "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/eth/mainnet/blocks/523442",
      "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/eth/mainnet/blocks/523442');
    $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/eth/mainnet/blocks/523442")
    
    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,eth,mainnet,blocks,523442", 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/eth/mainnet/blocks/523442")
      .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/eth/mainnet/blocks/523442"
    
      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": "ETH.mainnet",
            "height": 523442,
            "hash": "0x79230d974f6cea8c11cc2f3a58c2b811313af17a2f7391de6665502910d4d383",
            "parent_hash": "0x3e3ad7b9a63de7a1f1f564ee5393876caf61eff04d7c330bfe6df9b942c606d6",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "21000",
            "size": "658 bytes",
            "timestamp": 1447237199,
            "date": "2015-11-11 10:19:59 +UTC",
            "transactions": 1,
            "difficulty": "7657563137253",
            "total_difficulty": "2874342750898990991",
            "gas_limit": "3141592",
            "nonce": "0x32dd2d75a55f1463",
            "mined_by": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069 in 7 secs",
            "uncles": [],
            "extra_data": "0xd983010203844765746887676f312e342e328777696e646f7773",
            "confirmations": 7023472,
            "total_fees": "1050000000000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

    523442

    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.

    Latest Block Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/blocks/latest \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/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/eth/rinkeby/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",
        "eth",
        "rinkeby",
        "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/eth/rinkeby/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/eth/rinkeby/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,eth,rinkeby,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/eth/rinkeby/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/eth/rinkeby/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": "ETH.rinkeby",
            "height": 4190586,
            "hash": "0x0e6dd17fd8796d2dd9b443a877f4f0d5a9ac96f178469a53eacfaf6fdf5e0a34",
            "parent_hash": "0x61980a93a927bb57e890d637f96997d0a30855cf19597c6adcea2f2789ee8d1e",
            "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
            "gas_used": "973938",
            "size": "2921 bytes",
            "timestamp": 1554988169,
            "date": "2019-04-11 13:09:29 +UTC",
            "transactions": 10,
            "difficulty": "2",
            "total_difficulty": "7713556",
            "gas_limit": "7019104",
            "nonce": "0x00",
            "mined_by": "0x0000000000000000000000000000000000000000 in 15 secs",
            "uncles": [],
            "extra_data": "0xd683010900846765746886676f312e3132856c696e7578000000000000000000b4e94cf8329db3b98d7fd1ed5087edbcfc176bdc3fd9b1f25f19299cb16599f27a047aa82eee5b49cfa53e411194d09c91cb295c0f131082fd9bd2a5e1f63cc601",
            "confirmations": 1,
            "total_fees": "2999609192498000"
        }
    }
    
    Info

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

    HTTP Request

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

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

    Address API

    Whereas the Bitcoin blockchain was purely a list of transactions, Ethereum’s basic unit is the account. The Ethereum 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 Ethereum addresses/accounts and generate your own low-value Ethereum 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:

    More about Ethereum Account Management can be found in the offical documents.

    Address Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987 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/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987",
      "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",
        "eth",
        "ropsten",
        "address",
        "0x9e44c54a4ccdade765d23bbbdb99e66003b5e987"
      ],
      "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/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987');
    $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/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987")
    
    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,eth,ropsten,address,0x9e44c54a4ccdade765d23bbbdb99e66003b5e987", 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/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987")
      .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/eth/ropsten/address/0x9e44c54a4ccdade765d23bbbdb99e66003b5e987"
    
      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": "ETH.ropsten",
            "address": "0x9e44c54a4ccdade765d23bbbdb99e66003b5e987",
            "balance": "0.116622817690596", //eth
            "txs_count": 18,
            "from": 17,
            "to": 1
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    0x9e44c54a4ccdade765d23bbbdb99e66003b5e987

    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.

    Transactions By Address Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/transactions?index=0&limit=15  \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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",
        "eth",
        "ropsten",
        "address",
        "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
        "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/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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,eth,ropsten,address,0x0cb1883c01377f45ee5d7448a32b5ac1709afc11,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/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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/eth/ropsten/address/0x0cb1883c01377f45ee5d7448a32b5ac1709afc11/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": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
                "to": "0xe7d553c3aab5943ec097d60535fd06f1b75db43e",
                "hash": "0x608de2c0c3a3795b95b2127a967860eb3a9137c91109f026634586faf2ee7ac5",
                "value": "0",
                "timestamp": "2019-04-11 12:06:35",
                "nonce": 176,
                "confirmations": 244
            },
            {
                "from": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
                "to": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
                "hash": "0x889d6c73465bfaf9164f967ac5f6afe2bee968099f45626abdb6ce37b68886a0",
                "value": "1300000000000",
                "timestamp": "2019-04-11 11:07:31",
                "nonce": 175,
                "confirmations": 490
            },
            {
                "from": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
                "to": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
                "hash": "0x8affaeef4c0582050345524ddd6bcfc332b782a2574026b3968fdce20b5744ab",
                "value": "1300000000000",
                "timestamp": "2019-04-11 11:03:06",
                "nonce": 174,
                "confirmations": 499
            },
            ...
            {
                "from": "0x1b85a43e2e7f52e766ddfdfa2b901c42cb1201be",
                "to": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
                "hash": "0x494840139d5f988569b19f4a71f076c4310a9c406e33b67fd61578ac68187d4d",
                "value": "12000000000000000",
                "timestamp": "2018-11-28 12:06:37",
                "nonce": 65,
                "confirmations": 863054
            }
        ],
        "meta": {
            "totalCount": 279,
            "index": 0,
            "limit": 15,
            "results": 15
        }
    }
    
    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/eth/${NETWORK}/address/${ADDRESS}/transactions?index=${INDEX}&limit=${LIMIT}

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

    0x0cb1883c01377f45ee5d7448a32b5ac1709afc11

    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 Endpoint

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/address \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    POST /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": "0xb8e51b75a8ab6995b2e11938fed3b05837ec5fa2",
          "privateKey": "5d06b11d276e169d2fa2ced94d327902ee954ff47e31bcbf0aa4957a829a0aed",
          "publicKey": "303727940fca8f9b1f580908246aa980f9ee2aa9ecc379cbaf6a80f0050c1a2cdd7a467c1e564a2e272fb5b1958320ca11ca79b9cdfaf2bd74e6decd2592daa8"
      }
    }
    
    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/eth/${NETWORK}/address

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

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

    Generate Account Endpoint

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/account \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "password":"yourpassword"
        }'
    
    
    
    POST /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": "0x14eefa06e6f617ba9df050d7f9415e5bd0f11d34"
        }
    }
    
    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/eth/${NETWORK}/account

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

    The returned object contains a public address.

    Nonce Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/nonce \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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",
        "eth",
        "rinkeby",
        "address",
        "0xbB9d3A371b6e1dd468161C0DF12492867CC594dB",
        "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/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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,eth,rinkeby,address,0xbB9d3A371b6e1dd468161C0DF12492867CC594dB,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/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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/eth/rinkeby/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/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": 108
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    0xbB9d3A371b6e1dd468161C0DF12492867CC594dB

    Transaction API

    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, Ethereum 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.

    Transaction Hash Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c 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/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c",
      "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",
        "eth",
        "bc",
        "mainnet",
        "txs",
        "hash",
        "0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c"
      ],
      "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/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c');
    $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/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c")
    
    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,eth,mainnet,txs,hash,0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c", 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/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c")
      .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/eth/mainnet/txs/hash/0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c"
    
      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": "ETH.mainnet",
            "status": "0x1",
            "index": 79,
            "hash": "0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c",
            "value": "0",              
            "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
            "to": "0x946048a75af11c300a274344887ec39452218b3d",
            "date": "2018-10-17 08:31:13 +UTC",
            "block_hash": "0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c",
            "block_number": 6530876,
            "gas": "340977",           
            "gas_price": "6000000000", 
            "gas_used": "227318",      
            "nonce": 61,
            "confirmations": 1016247,
            "token_transfers": {
                "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
                "to": "0x946048a75af11c300a274344887ec39452218b3d",
                "tokenName": "EtheremonToken",
                "symbol": "EMONT",
                "tokenType": "ERC-20",
                "tokenID": "30060053",
                "value": "11.10948334"
            },
            "input": "0x0396dcb00000000000000000000000000000000000000000000000000000000000000bbe0000000000000000000000000000000000000000000000000000000042e369c00000000000000000000000000000000000000000000000000000000000000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

    0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c

    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 Endpoint by Index, Limit and Block Number

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/block/4173655?index=0&limit=4 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": 14,
            "index": 0,
            "limit": 4,
            "results": 4
        },
        "payload": [
            {
                "chain": "ETH.ropsten",
                "status": "0x1",
                "index": 3,
                "hash": "0xf81f9d0091d8e424545f080a6cbd1b5167926371f90828292452ca9df90b551e",
                "value": "60000000000000",
                "from": "0x31d69f8cb2a0c33d43f6a1eac1b5940483d6c40a",
                "to": "0x33e5208b30dd58495bd0037ab2ba9a8762c0e757",
                "date": "2018-10-05 06:26:26 +UTC",
                "block_hash": "0x0114449f2f83df6947c12e91a9d44cf69cdb34eb1d4b169e373ed2ead785e568",
                "block_number": 4173655,
                "gas": "21000",
                "gas_price": "1000000000",
                "gas_used": "21000",
                "nonce": 752,
                "confirmations": 1210755,
                "token_transfers": {},
                "input": "0x"
            },
            {
                "chain": "ETH.ropsten",
                "status": "0x1",
                "index": 2,
                "hash": "0xd6f1f418515ee7694c31f99d85feea9dddc8081317f0f76c6781de9009787da2",
                "value": "60000000000000",
                "from": "0x31d69f8cb2a0c33d43f6a1eac1b5940483d6c40a",
                "to": "0x82de76c863d85c4e3a61a6ea8ae3b7eb452ec0cf",
                "date": "2018-10-05 06:26:26 +UTC",
                "block_hash": "0x0114449f2f83df6947c12e91a9d44cf69cdb34eb1d4b169e373ed2ead785e568",
                "block_number": 4173655,
                "gas": "21000",
                "gas_price": "1000000000",
                "gas_used": "21000",
                "nonce": 751,
                "confirmations": 1210755,
                "token_transfers": {},
                "input": "0x"
            },
            {
                "chain": "ETH.ropsten",
                "status": "0x1",
                "index": 1,
                "hash": "0xe53df98e05e68eff01afca62a9ab720cbbe60fee88813148bc33d931d1ead98b",
                "value": "60000000000000",
                "from": "0x31d69f8cb2a0c33d43f6a1eac1b5940483d6c40a",
                "to": "0x9d271c0005aafb722d177aa6d0a8145c7be80ed4",
                "date": "2018-10-05 06:26:26 +UTC",
                "block_hash": "0x0114449f2f83df6947c12e91a9d44cf69cdb34eb1d4b169e373ed2ead785e568",
                "block_number": 4173655,
                "gas": "21000",
                "gas_price": "1000000000",
                "gas_used": "21000",
                "nonce": 750,
                "confirmations": 1210755,
                "token_transfers": {},
                "input": "0x"
            },
            {
                "chain": "ETH.ropsten",
                "status": "0x1",
                "index": 0,
                "hash": "0x7fc78d0e9a386076cd216ea207f19997d281163aee30204b7ec0a84791c0021f",
                "value": "60000000000000",
                "from": "0x31d69f8cb2a0c33d43f6a1eac1b5940483d6c40a",
                "to": "0x4709ab0acdb83b382240122fe360810668efa728",
                "date": "2018-10-05 06:26:26 +UTC",
                "block_hash": "0x0114449f2f83df6947c12e91a9d44cf69cdb34eb1d4b169e373ed2ead785e568",
                "block_number": 4173655,
                "gas": "21000",
                "gas_price": "1000000000",
                "gas_used": "21000",
                "nonce": 749,
                "confirmations": 1210755,
                "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/eth/${NETWORK}/txs/block/${BLOCK_NUMBER}?index=${TX_INDEX}&limit=${LIMIT}

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

    Transactions Index Endpoint by Block Number

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/block/6530876/79 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/txs/block/6530876/79 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/eth/mainnet/txs/block/6530876/79",
      "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",
        "eth",
        "mainnet",
        "txs",
        "6530876",
        "79"
      ],
      "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/eth/mainnet/txs/block/6530876/79');
    $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/eth/mainnet/txs/block/6530876/79")
    
    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,eth,mainnet,txs,6530876,79", 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/eth/mainnet/txs/block/6530876/79")
      .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/eth/mainnet/txs/block/6530876/79"
    
      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": "ETH.mainnet",
          "status": "0x1",
          "index": 79,
          "hash": "0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c",
          "value": "0",
          "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
          "to": "0x946048a75af11c300a274344887ec39452218b3d",
          "date": "2018-10-17 08:31:13 +UTC",
          "block_hash": "0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c",
          "block_number": 6530876,
          "gas": "340977",
          "gas_price": "6000000000",
          "gas_used": "227318",
          "nonce": 61,
          "confirmations": 1016280,
          "token_transfers": [
              {
                  "from": "0x0000000000000000000000000000000000000000",
                  "to": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
                  "tokenName": "MyCryptoHeroes:Hero",
                  "symbol": "MCHH",
                  "tokenType": "ERC-721",
                  "tokenID": "30060053"
              },
              {
                  "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
                  "to": "0x946048a75af11c300a274344887ec39452218b3d",
                  "value": "11.10948334",
                  "tokenName": "EtheremonToken",
                  "symbol": "EMONT",
                  "tokenType": "ERC-20"
              }
          ],
          "input": "0x0396dcb00000000000000000000000000000000000000000000000000000000000000bbe0000000000000000000000000000000000000000000000000000000042e369c00000000000000000000000000000000000000000000000000000000000000000"
      }
    }
    
    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/eth/${NETWORK}/txs/block/${BLOCK_NUMBER}/${TX_INDEX}

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

    79

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

    6530876

    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 Endpoint by Block Hash

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79 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/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79",
      "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",
        "eth",
        "mainnet",
        "txs",
        "block",
        "0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c",
        "79"
      ],
      "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/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79');
    $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/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79")
    
    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,eth,mainnet,txs,block,0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c,79", 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/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79")
      .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/eth/mainnet/txs/block/0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c/79"
    
      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": "ETH.mainnet",
          "status": "0x1",
          "index": 79,
          "hash": "0x5d41df69ee87f712e76ee5f4dd6c0ccbec114b9d871340b7e2b34bf6d8d26c2c",
          "value": "0",
          "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
          "to": "0x946048a75af11c300a274344887ec39452218b3d",
          "date": "2018-10-17 08:31:13 +UTC",
          "block_hash": "0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c",
          "block_number": 6530876,
          "gas": "340977",
          "gas_price": "6000000000",
          "gas_used": "227318",
          "nonce": 61,
          "confirmations": 1016285,
          "token_transfers": [
              {
                  "from": "0x0000000000000000000000000000000000000000",
                  "to": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
                  "tokenName": "MyCryptoHeroes:Hero",
                  "symbol": "MCHH",
                  "tokenType": "ERC-721",
                  "tokenID": "30060053"
              },
              {
                  "from": "0xc071a1945cff872d30e7f3bdfcd17eca8f46ea19",
                  "to": "0x946048a75af11c300a274344887ec39452218b3d",
                  "value": "11.10948334",
                  "tokenName": "EtheremonToken",
                  "symbol": "EMONT",
                  "tokenType": "ERC-20"
              }
          ],
          "input": "0x0396dcb00000000000000000000000000000000000000000000000000000000000000bbe0000000000000000000000000000000000000000000000000000000042e369c00000000000000000000000000000000000000000000000000000000000000000"
      }
    }
    
    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/eth/${NETWORK}/txs/block/${BLOCK_HASH}/${TX_INDEX}

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

    79

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

    0x0d13e81c01de31060a2830bb53761ef29ac5c4e5c1d43e309ca9a101140e394c

    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 ETH 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/eth/${NETWORK}/txs/new

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress": "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
            "toAddress": "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "gasPrice": 21000000000,
            "gasLimit": 21000,
            "value": 1.12,
            "password": "123456ABCdef",
            "nonce": 0
        }'
    
    
    
    POST /v1/bc/eth/ropsten/txs/new HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "password" : "123456ABCdef",
      "nonce": 0
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"123456ABCdef\",\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",
        "eth",
        "ropsten",
        "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: '0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      gasPrice: 21000000000,
      gasLimit: 21000,
      value: 1.12,
      password: '123456ABCdef',
      nonce: 0 }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "gasPrice" : 21000000000,
      "gasLimit" : 21000,
      "value" : 1.12,
      "password" : "123456ABCdef",
      "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/eth/ropsten/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\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"123456ABCdef\",\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\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"gasPrice\" : 21000000000,\n  \"gasLimit\" : 21000,\n  \"value\" : 1.12,\n  \"password\" : \"123456ABCdef\",\n\t\"nonce\":0\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,ropsten,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\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"123456ABCdef\",\n\t\"nonce\":0\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/txs/new"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 21000,\n\t\"value\" : 1.12,\n\t\"password\" : \"123456ABCdef\",\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": "0xfebf0691cc92f67ace032897a83587c44c5b2ef437341c6cfd5dbf1f8f4c288d",
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, 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 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": "0xfebf0691cc92f67ace032897a83587c44c5b2ef437341c6cfd5dbf1f8f4c288d" } }

    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 ether 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/eth/${NETWORK}/txs/new/all

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new/all \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
            "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "password" : "123456ABCdef"
        }'
    
    
    
    POST /v1/bc/eth/ropsten/txs/new/all HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "password" : "123456ABCdef"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new/all",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"123456ABCdef\"\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",
        "eth",
        "ropsten",
        "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: '0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff',
      toAddress: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      password: '123456ABCdef' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/new/all');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff",
      "toAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "password" : "123456ABCdef"
    }');
    
    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/eth/ropsten/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\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"123456ABCdef\"\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n  \"fromAddress\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n  \"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n  \"password\" : \"123456ABCdef\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,ropsten,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\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"toAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"password\" : \"123456ABCdef\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/txs/new/all"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0xc438d912235ff5facc22c502e5bd6dc1ae14a7ff\",\n\t\"password\" : \"123456ABCdef\"\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": "0xfebf0691cc92f67ace032897a83587c44c5b2ef437341c6cfd5dbf1f8f4c288d",
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, rinkeby or mainnet)

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

    { "payload": { "hex": "0xfebf0691cc92f67ace032897a83587c44c5b2ef437341c6cfd5dbf1f8f4c288d" } }

    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/eth/${NETWORK}/txs/new-pvtkey

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": "0x300feeceb350a5e2e955d05bd31adde7f4e2c6d2390a16d9435c704525e61ea4"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, 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 ETH 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": "0x300feeceb350a5e2e955d05bd31adde7f4e2c6d2390a16d9435c704525e61ea4" } }

    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 eth 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/eth/${NETWORK}/txs/new-pvtkey/all

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": "0x300feeceb350a5e2e955d05bd31adde7f4e2c6d2390a16d9435c704525e61ea4"
        }
    }
    
    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, rinkeby or mainnet)

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

    { "payload": { "hex": "0x300feeceb350a5e2e955d05bd31adde7f4e2c6d2390a16d9435c704525e61ea4" } }

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

    Locally Sign Your Transaction Endpoint

    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/eth/${NETWORK}/txs/send

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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 json { "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. ropsten, rinkeby or mainnet)

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

    Push Raw Transaction Endpoint

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

    HTTP Request

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

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/txs/push \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "hex" : "0xf86a22827d00831e8480941b85a43e2e7f52e766ddfdfa2b901c42cb1201be8801b27f33b807c0008029a084ccbf02b27e0842fb1eda7a187a5589c3759be0e969e0ca989dc469a5e5e394a02e111e1156b197f1de4c1d9ba4af26e50665ea6d617d05b3e4047da12b915e69"
        }'
    
    
    
    POST /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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 json { "payload": { "hex" : "0x61710049f64c5187611ebc827d7a9f2479cd7c78e8bf6d66232e8dc57328b09c" } }

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, rinkeby 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" : "0x61710049f64c5187611ebc827d7a9f2479cd7c78e8bf6d66232e8dc57328b09c" } }

    Pending Transactions Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/pending \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/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/eth/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",
        "eth",
        "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/eth/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/eth/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,eth,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/eth/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/eth/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": 150,
            "limit": 50,
            "results": 50
        },
        "payload": [
            {
                "hash": "0xf730a960741612568f37fcfdc690cf3a0d64df47608cbd1ccb5b2cd0fd761d7c",
                "nonce": 67952,
                "blockHash": "0xd7a527f3b9e1955672e25b506985423e9643866a4e9c452f312b97772a620156",
                "blockNumber": 7547053,
                "transactionIndex": 0,
                "from": "0x99fe5d6383289cdd56e54fc0baf7f67c957a8888",
                "to": "0x9064c91e51d7021a85ad96817e1432abf6624470",
                "value": "0",
                "gasPrice": "66000000000",
                "gas": "77777",
                "input": "0xa9059cbb000000000000000000000000b0715ffbdbda3b1abf2fc66339412b6cde636728000000000000000000000000000000000000000000000546f85996e215c40000"
            },
            {
                "hash": "0x22c3f2e2314a715c54b551b935f95886cda901ad02db82aa3ea548e154e0a057",
                "nonce": 67953,
                "blockHash": "0xd7a527f3b9e1955672e25b506985423e9643866a4e9c452f312b97772a620156",
                "blockNumber": 7547053,
                "transactionIndex": 1,
                "from": "0x99fe5d6383289cdd56e54fc0baf7f67c957a8888",
                "to": "0x9064c91e51d7021a85ad96817e1432abf6624470",
                "value": "0",
                "gasPrice": "66000000000",
                "gas": "77777",
                "input": "0xa9059cbb000000000000000000000000b0715ffbdbda3b1abf2fc66339412b6cde6367280000000000000000000000000000000000000000000005466d9273dd8bdc0000"
            },
           ...
            {
                "hash": "0xfadc74ab6cb41172541faa6824caf40210ec4a945f7611a3853bf373b3cdaef1",
                "nonce": 7565,
                "blockHash": "0xd7a527f3b9e1955672e25b506985423e9643866a4e9c452f312b97772a620156",
                "blockNumber": 7547053,
                "transactionIndex": 49,
                "from": "0x726718b171c91e8ec0cd484e49aa943703f5be18",
                "to": "0x47ba0689fbd72936749b007d18dfb75d34bf241b",
                "value": "0",
                "gasPrice": "12000000000",
                "gas": "90000",
                "input": "0xa9059cbb000000000000000000000000741586d63e7f2b180f425ad322372fd33ee6321f000000000000000000000000000000000000000000000000000012020bf77000"
            }
        ]
    }
    
    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/eth/${NETWORK}/txs/pending

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

    Queued Transactions Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/queued \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/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/eth/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",
        "eth",
        "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/eth/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/eth/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,eth,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/eth/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/eth/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": 73,
            "limit": 3,
            "results": 3
        },
        "payload": [
            {
                "hash": "0x20872578e2f25a1ef7a234c2f7974c54e9c1a9c8ee70e95674750e394fc71dbb",
                "nonce": 67973,
                "blockHash": "0xefef5c28ca8360140aec3920de48ad27e98acc250173240fa16bdf63f9245de3",
                "blockNumber": 7547071,
                "transactionIndex": 0,
                "from": "0x99fe5d6383289cdd56e54fc0baf7f67c957a8888",
                "to": "0x9064c91e51d7021a85ad96817e1432abf6624470",
                "value": "0",
                "gasPrice": "66000000000",
                "gas": "77777",
                "input": "0xa9059cbb00000000000000000000000077c9b160a38e023fe90e50498f984ae0ead58db7000000000000000000000000000000000000000000000a94564788f48d6a8000"
            },
            {
                "hash": "0x7c30619b83063efd3c1c57b85630ea47ee4939b5735ea837de1a4222ef98fca8",
                "nonce": 67974,
                "blockHash": "0xefef5c28ca8360140aec3920de48ad27e98acc250173240fa16bdf63f9245de3",
                "blockNumber": 7547071,
                "transactionIndex": 1,
                "from": "0x99fe5d6383289cdd56e54fc0baf7f67c957a8888",
                "to": "0x9064c91e51d7021a85ad96817e1432abf6624470",
                "value": "0",
                "gasPrice": "66000000000",
                "gas": "77777",
                "input": "0xa9059cbb0000000000000000000000006fc83d6a36e79838f6ef8116627b21a5ef5c95be00000000000000000000000000000000000000000000054915956c4096000000"
            },
            {
                "hash": "0xea4b4e92ba783fd6fe0e1a15e502d2e807f23a806f68b99609ecf5206d97be20",
                "nonce": 15,
                "blockHash": "0xefef5c28ca8360140aec3920de48ad27e98acc250173240fa16bdf63f9245de3",
                "blockNumber": 7547071,
                "transactionIndex": 2,
                "from": "0xd6ad306af05fb9fc6d52025d3e7004a3b1390af2",
                "to": "0xfbb589251a5dcd955f51fc36e560b18fa8a5e974",
                "value": "1013000000000000000",
                "gasPrice": "60000000000",
                "gas": "1000000",
                "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/eth/${NETWORK}/txs/queued

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

    Estimate Transaction GasLimit Endpoint

    Crypto APIs provides an endpoint for estimating the gas needed for a successful transaction. This is very useful when sending ether 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/eth/${NETWORK}/txs/gas

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/ropsten/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/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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 json { "payload": { "gasLimit": "25148" } }

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

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

    { "gasLimit": "21040" }

    Transactions GasPrice Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/fee \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/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/eth/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",
        "eth",
        "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/eth/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/eth/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,eth,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/eth/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/eth/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.1",
            "max": "1500",
            "average": "11.4",
            "recommended": "5.7",
            "unit": "Gwei"
        }
    }
    
    Info

    Transactions Fee Endpoint gives information about the gas price for the successfull 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/eth/${NETWORK}/txs/fee

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    Internal Transactions Endpoint

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal 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/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal",
      "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",
        "eth",
        "bc",
        "mainnet",
        "txs",
        "hash",
        "0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e",
        "internal"
      ],
      "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/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal');
    $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/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal")
    
    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,eth,mainnet,txs,hash,0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e,internal", 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/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal")
      .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/eth/mainnet/txs/hash/0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e/internal"
    
      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": 8,
            "limit": 50,
            "results": 8
        },
        "payload": [
            {
                "fromAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "toAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "gas": "2300",
                "opcode": "CALL",
                "value": "2722674963795463528",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "SELFDESTRUCT",
                "failed": false,
                "depth": 2
            },
            {
                "fromAddress": "0x111112549cfedf7822eb11fbd8fd485d8a10f93f",
                "toAddress": "0x4fe95c36bb9b3a81f278569525162f91615e77d7",
                "opcode": "CALL",
                "value": "2722674963795463528",
                "failed": false,
                "depth": 1
            }
        ]
    }
    
    Info

    The Internal Transactions Endpoint returns information about the contract internal transactions for the given transaction.

    HTTP Request

    GET /v1/bc/eth/${NETWORK}/txs/hash/${TX_HASH}/internal

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. ropsten, rinkeby or mainnet)
    TX_HASH - Hash of the transaction in blockchain
    LIMIT 50 limit to 50 transactions

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

    0x8a26cd4d52706aeb645eed328242165f59c76bde93b46a74497057146e0aca1e

    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

    Contract API

    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 Endpoint

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

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

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

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/contracts/gas \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/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/eth/rinkeby/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",
        "eth",
        "rinkeby",
        "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/eth/rinkeby/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/eth/rinkeby/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,eth,rinkeby,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/eth/rinkeby/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/eth/rinkeby/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 json { "payload": { "gas_price": "22000000000", "gas_limit": "4300000" } }

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    Deploy Smart Contract Endpoint

    The Deploy Smart Contract Endpoint allows you to push your smart contract to the Ethereum 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" : "4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1", "fromAddress" : "0xe7cc96ba0562dfba61a55c8dd2e162a30942f402", "gasPrice" : 21000000000, "gasLimit" : 2100000, "byteCode": "0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b5400000000000000000000000000000000000000000000000000000000815250600290805190602001906200009f92919062000128565b506040805190810160405280600d81526020017f6d616166616b6120546f6b656e0000000000000000000000000000000000000081525060039080519060200190620000ed92919062000128565b506012600460006101000a81548160ff021916908360ff16021790555062093a804201600781905550624099804201600881905550620001d7565b828054600181600116 .... ffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029" }

    The response will be date and hash of the transaction:

    { "payload": { "hex": "0xf24889df3b88f8bfe2898a41ecab8ec62b60839a22eec606afe3dff9025b86f6" }

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

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/rinkeby/contracts \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "privateKey" : "4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1",
            "fromAddress" : "0xe7cc96ba0562dfba61a55c8dd2e162a30942f402",
            "gasPrice" : 21000000000,
            "gasLimit" : 2100000,
            "byteCode": "0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029"
        }'
    
    
    
    POST /v1/bc/eth/rinkeby/contracts HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
    
      "privateKey" : "4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1",
      "fromAddress" : "0xe7cc96ba0562dfba61a55c8dd2e162a30942f402",
      "gasPrice" : 21000000000,
      "gasLimit" : 2100000,
      "byteCode": "0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/eth/rinkeby/contracts",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xe7cc96ba0562dfba61a55c8dd2e162a30942f402\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029\"\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",
        "eth",
        "rinkeby",
        "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: '4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1',
      fromAddress: '0xe7cc96ba0562dfba61a55c8dd2e162a30942f402',
      gasPrice: 21000000000,
      gasLimit: 2100000,
      byteCode: '0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/rinkeby/contracts');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
    
      "privateKey" : "4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1",
      "fromAddress" : "0xe7cc96ba0562dfba61a55c8dd2e162a30942f402",
      "gasPrice" : 21000000000,
      "gasLimit" : 2100000,
      "byteCode": "0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029"
    }');
    
    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/eth/rinkeby/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\" : \"4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xe7cc96ba0562dfba61a55c8dd2e162a30942f402\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029\"\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\" : \"4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xe7cc96ba0562dfba61a55c8dd2e162a30942f402\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,rinkeby,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\" : \"4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xe7cc96ba0562dfba61a55c8dd2e162a30942f402\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/rinkeby/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/eth/rinkeby/contracts"
    
      payload := strings.NewReader("{\n\t\n\t\"privateKey\" : \"4f75aff19dd7acbf7c4d5d6f736176a3fe2db1ec9b60cc11d30dc3c343520ed1\",\n\t\"fromAddress\" : \"0xe7cc96ba0562dfba61a55c8dd2e162a30942f402\",\n\t\"gasPrice\" : 21000000000,\n\t\"gasLimit\" : 2100000,\n\t\"byteCode\": \"0x60806040523480156200001157600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040805190810160405280600481526020017f4d464b54000000000000000000000000000000000000000000000000000000008fffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116b457600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373fffff...ffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561170957600080fd5b8183039050929150505600a165627a7a72305820d5c331e320cecd2d4312d2652403d5e25028a60929540b4a8ededb52575622a40029\"\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 json { "payload": { "hex": "0xf24889df3b88f8bfe2898a41ecab8ec62b60839a22eec606afe3dff9025b86f6" } }

    HTTP Request

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

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

    Token API

    Crypto APIs Token API allows you to get token balances of adressess, 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.

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/balance \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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",
        "eth",
        "rinkeby",
        "token",
        "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
        "0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014",
        "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/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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,eth,rinkeby,token,0x7857af2143cb06ddc1dab5d7844c9402e89717cb,0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014,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/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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/eth/rinkeby/tokens/0x7857af2143cb06ddc1dab5d7844c9402e89717cb/0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014/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 json { "payload": { "name": "Elly Token", "token": "0.70429514041990424", "symbol": "ELT" } }

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    ADDRESS ------- address with tokens (e.g. "0x7857af2143cb06ddc1dab5d7844c9402e89717cb")
    CONTRACT ------- contract address (e.g. "0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014")
    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 adress 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...;

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/transfer \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{
            "fromAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
            "toAddress" : "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
            "contract" : "0xe7d553c3aab5943ec097d60535fd06f1b75db43e",
            "password": "abc123456" or "privateKey" : "0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed",
            "gasPrice" : 11500000000,
            "gasLimit" : 60000,
            "token" : 115
        }'
    
    
    POST /v1/bc/eth/rinkeby/tokens/transfer HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
      "fromAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "toAddress" : "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
      "contract" : "0xe7d553c3aab5943ec097d60535fd06f1b75db43e",
      "password": "abc123456" or "privateKey" : "0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed",
      "gasPrice" : 11500000000,
      "gasLimit" : 60000,
      "token" : 115
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/transfer",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"fromAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"toAddress\" : \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n\t\"contract\" : \"0xe7d553c3aab5943ec097d60535fd06f1b75db43e\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115\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",
        "eth",
        "rinkeby",
        "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: '0x0cb1883c01377f45ee5d7448a32b5ac1709afc11',
      toAddress: '0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8',
      contract: '0xe7d553c3aab5943ec097d60535fd06f1b75db43e',
      password: 'abc123456' or privateKey: '0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed',
      gasPrice: 11500000000,
      gasLimit: 60000,
      token: 115 }));
    req.end();
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/transfer');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
      "fromAddress" : "0x0cb1883c01377f45ee5d7448a32b5ac1709afc11",
      "toAddress" : "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
      "contract" : "0xe7d553c3aab5943ec097d60535fd06f1b75db43e",
      "password" : "abc123456" or "privateKey" : "0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed",
      "gasPrice" : 11500000000,
      "gasLimit" : 60000,
      "token" : 115
    }');
    
    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/eth/rinkeby/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\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"toAddress\" : \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n\t\"contract\" : \"0xe7d553c3aab5943ec097d60535fd06f1b75db43e\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n\t\"fromAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"toAddress\" : \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n\t\"contract\" : \"0xe7d553c3aab5943ec097d60535fd06f1b75db43e\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,rinkeby,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\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"toAddress\" : \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n\t\"contract\" : \"0xe7d553c3aab5943ec097d60535fd06f1b75db43e\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/rinkeby/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/eth/rinkeby/tokens/transfer"
    
      payload := strings.NewReader("{\n\t\"fromAddress\" : \"0x0cb1883c01377f45ee5d7448a32b5ac1709afc11\",\n\t\"toAddress\" : \"0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8\",\n\t\"contract\" : \"0xe7d553c3aab5943ec097d60535fd06f1b75db43e\",\n\t \"password\": \"abc123456\" or \n\t\"privateKey\" : \"0xeb38783ad75d8081fb9105baee6ac9413c4abd732ef889116714f271cde6aed\",\n\t\"gasPrice\" : 11500000000,\n\t\"gasLimit\" : 60000,\n\t\"token\" : 115\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 json { "payload": { "hex": "0xeca1b4ad7b3df4fb65b0e3c1e079f2f6878bd5bd6185fe23319f7dec6a2fc203" } }

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    Token Transactions By Address

    In the request url you should provide the address you want to observe. The response will be a json object with a list of all token transactions for the specified address (in DESC order).

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers 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/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers",
      "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",
        "eth",
        "rinkeby",
        "token",
        "address",
        "0xbB9d3A371b6e1dd468161C0DF12492867CC594dB",
        "transfers"
      ],
      "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/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers');
    $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/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers")
    
    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,eth,rinkeby,token,address,0xbB9d3A371b6e1dd468161C0DF12492867CC594dB,transfers", 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/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers")
      .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/eth/rinkeby/tokens/address/0xbB9d3A371b6e1dd468161C0DF12492867CC594dB/transfers"
    
      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 json { "meta": { "totalCount": 2, "limit": 50, "results": 2 }, "payload": [ { "txHash": "0xa2615b47e192dbf245d40995baf4b98886276ac0d4875ca5f7a9e00b2dc35aaa", "from": "0xb7df5ba8e9c749ad620887cb3933beb09938b99d", "to": "0xbb9d3a371b6e1dd468161c0df12492867cc594db", "name": "YniToken", "symbol": "YT", "type": "ERC-721", "tokenID": "174876e800" }, { "txHash": "0x638b0ed498191d8f2c0027f6753fe6f4f9ce401ee5960e2e4e9e2b2d2b72d3ea", "from": "0xbb9d3a371b6e1dd468161c0df12492867cc594db", "to": "0x5063198b4fdec0b2eea682d3fb456de79e002b40", "value": "5", "name": "DAO Token", "symbol": "DAO", "type": "ERC-20" } ] }

    HTTP Request

    GET /v1/bc/eth/${NETWORK}/tokens/address/{address}/transfers

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    ADDRESS ------- address with tokens (e.g. "0xbb9d3a371b6e1dd468161c0df12492867cc594db")
    LIMIT ------- limit to n results
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria
    Get Address Token Transfers

    In the request url you should provide the address you want to observe. After sending the request you will receive a json object with a list of each transfer for the specified address that includes the following infromation: the contract, the name, symbol and type of the token.

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258 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/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258",
      "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",
        "eth",
        "rinkeby",
        "token",
        "address",
        "0x2b5634c42055806a59e9107ed44d43c426e58258"
      ],
      "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/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258');
    $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/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258")
    
    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,eth,rinkeby,token,address,0x2b5634c42055806a59e9107ed44d43c426e58258", 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/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258")
      .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/eth/rinkeby/tokens/address/0x2b5634c42055806a59e9107ed44d43c426e58258"
    
      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 json { "meta": { "totalCount": 37, "limit": 50, "results": 37 }, "payload": [ { "contract": "0xa4ba9e023a4f8d695e16d3f3050f96aea0001c98", "symbol": "ePRX", "name": "eProxy", "type": "ERC-20" }, { "contract": "0xdc888b47268a704eea6e57d9d6ff455cc7332afc", "symbol": "ePRX", "name": "eProxy", "type": "ERC-20" }, { "contract": "0x24fd4d057e131623429878270836607e43d89c10", "symbol": "ePRX", "name": "eProxy", "type": "ERC-20" }, ... { "contract": "0x74f46ca46a49015c7677c9ee237479b17cf7d8e7", "symbol": "COSM", "name": "CosmoCoin", "type": "ERC-20" } ] }

    HTTP Request

    GET /v1/bc/eth/${NETWORK}/tokens/address/{address}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    ADDRESS ------- address with tokens (e.g. "0x2b5634c42055806a59e9107ed44d43c426e58258")
    LIMIT ------- limit to n results
    Meta Response
    Variable Type Description
    totalCount int Total count of the items in the listing for the given criteria
    index int Sequential index number of the items list start position (depends on the skip parameter) for the given criteria
    limit int Limit number of the items list (depends on the limit parameter) for the given criteria.
    results int Count of the items listed in the current response for the given criteria

    Payment Forwarding

    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

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/rinkeby/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" : 5000000000,
          "gasLimit" : 21000
      }'
    
    
    POST /v1/bc/eth/rinkeby/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" : 5000000000,
        "gasLimit" : 21000
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "http://localhost:9146/v1/eth/rinkeby/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\" : 5000000000,\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",
        "eth",
        "rinkeby",
        "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: 5000000000,
      gasLimit: 21000 }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/rinkeby/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" : 5000000000,
        "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/eth/rinkeby/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\" : 5000000000,\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\" : 5000000000,\n    \"gasLimit\" : 21000\n}\n"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,rinkeby,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\" : 5000000000,\n    \"gasLimit\" : 21000\n}\n");
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/rinkeby/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/eth/rinkeby/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\" : 5000000000,\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": "5000000000",
            "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/eth/${NETWORK}/payments

    Payment Forwarding Response

    After executing the forwarding payment a message will be sent to the specified callback(url), similar to the following: json { "currency": "ETH", "network": "rinkeby", "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 OUTOFBALANCE.

    For some reasons the payment forwarding may fail. json { "payload": { "currency": "ETH", "network": "rinkeby", "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: json { "payload": { "currency": "ETH", "network": "rinkeby", "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: json { "currency": "ETH", "network": "rinkeby", "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 OUTOFBALANCE other attempts for executing the payment will not be made.

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

    Code samples

    
    curl -X DELETE https://api.cryptoapis.io/v1/bc/eth/ropsten/payments/d2f41deb-3e13-4e19-b197-c2481f9d9eba \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    DELETE /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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/eth/${NETWORK}/payments/${UUID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    UUID ------- the uuid of the payment
    List of Forward Payments By Users

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/payments \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    GET /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": "5000000000",
                "gasLimit": "21000"
            }
        ],
        "meta": {
            "totalCount": 1,
            "results": 1
        }
    }
    
    HTTP Request

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

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

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

    List of Past Forward Payments By Users

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/payments/history \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key' 
    
    
    GET /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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": 4137376,
                "transaction": "0xfe7f1d262ef8fa1510c220a6d2841a4713b8c2938967eefb503f88f33ab62dc4"
            },
            {
                "uuid": "350c88d3-ed77-406a-aaae-557f9a63418a",
                "payment_uuid": "045f66c9-172b-479f-9e6f-54e5fe83facf",
                "status": "DONE",
                "block_height": 4137496,
                "transaction": "0x743b4bf1a42857f98cf5d3ede7820358f7582118116ddf486478a86708b86fb6"
            },
            {
                "uuid": "4970a327-ef9f-402f-9074-a653a53437bd",
                "payment_uuid": "045f66c9-172b-479f-9e6f-54e5fe83facf",
                "status": "DONE",
                "block_height": 4137497,
                "transaction": "0x8078c99ff7e793752a8941cbfcbee3b8bc7b6c974bf9a40767d4d9c0906bae81"
            }
        ],
        "meta": {
            "totalCount": 3,
            "results": 3
        }
    }
    
    HTTP Request

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

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

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

    Webhook Notification

    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.

    Types of Events

    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
    TOKEN Simplifies listening to confirmations on all token transfers for a given address up to a provided threshold. The payload is a json object with the token transfer information.
    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 addresss, 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 Webhook Endpoint

    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.

    Code samples

    
    curl -X POST https://api.cryptoapis.io/v1/bc/eth/rinkeby/hooks \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
        -d '{ 
            "event" : "CONFIRMED_TX",
            "url" : "http://somepoint.point",
            "confirmations": 12,
            "transaction": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36"
        }'
    
    
    
    POST /v1/bc/eth/rinkeby/hooks HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    { 
      "event" : "CONFIRMED_TX",
      "url" : "http://somepoint.point",
      "confirmations": 12,
      "transaction": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36"
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/eth/rinkeby/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\": \"0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36\"\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",
        "eth",
        "rinkeby",
        "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: '0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36' }));
    req.end();
    
    
    
    <?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/eth/rinkeby/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": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36"
    }');
    
    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/eth/rinkeby/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\": \"0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36\"\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\": \"0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36\"\n}"
    
    headers = {
      'Content-Type': "application/json",
      'X-API-Key': "my-api-key"
    }
    
    conn.request("POST", "v1,bc,eth,rinkeby,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\": \"0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36\"\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/eth/rinkeby/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/eth/rinkeby/hooks"
    
      payload := strings.NewReader("{ \n\t\"event\" : \"CONFIRMED_TX\",\n\t\"url\" : \"http://somepoint.point\",\n\t\"confirmations\": 12, \n\t\"transaction\": \"0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36\"\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": "e0b599b2-1cf9-47a1-b462-908a67bc062a",
            "event": "CONFIRMED_TX",
            "transaction": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36",
            "confirmations": 12, 
            "url": "http://somepoint.point"
        }
    }
    
    HTTP Request

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

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

    Requested data: { "event" : "CONFIRMED_TX", "url" : "http://somepoint.point", "confirmations": 12, "transaction": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36" }

    Response: { "payload": { "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355", "event": "CONFIRMED_TX", "transaction": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36", "confirmations": 12, "url": "http://somepoint.point" } } Confirmations can be any number between 0 and 100. Set to 0 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 message to be sent to the specified url will be similar to the following:

    {
        "blockHeight": 3245227,
        "blockHash": "0x51b00059789d257a93646854ff1156265e4e5847fac9243d621f6b2231d74395",
        "currency": "ETH",
        "network": "rinkeby",
        "url": "http://somepoint.point",
        "type": "CONFIRMED_TX",
        "txHash": "0x87da27245076441baf7bcc6e93d328d80d11297a3a247a1ce3019168be3b7a36",
        "confirmations": 6
    }
    
    Example: Event type NEW_BLOCK:

    Requested data: { "event" : "NEW_BLOCK", "url" : "http://somepoint.point" }

    Response: { "payload": { "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355", "event": "NEW_BLOCK", "url": "http://somepoint.point" } } The message to be sent to the specified url will be similar to the following: json { "currency": "ETH", "network": "mainnet", "url": "http://somepoint.point", "type": "NEW_BLOCK", "blockHeight": 7495204, "blockHash": "0xbddc1497998143703378fd6f507c94a71b86ec659d1d05fc45cfe364ea56eb9c" }

    Example: Event type ADDRESS:

    Requested data:

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

    Confirmations can be any number between 0 and 10. Set to 0 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://somepoint.point" } } The message to be sent to the specified url will be similar to the following:

    {
       "currency": "ETH",
       "network": "mainnet",
       "url": "http://somepoint.point",
       "type": "ADDRESS",
       "blockHeight": 7495211,
       "blockHash": "0x708a4a34058d5c0f48837d1ea3ab13a5410941cd5c6b21ca4abe1f5100f003f2",
       "confirmations": 1,
       "address": "0x40e45890dff79e7d533797d964e64a2c0121f49a",
       "txHash": "0x31e7044ac355bf260164eb8b07eb0192d7c86f1c4780bae6c5bebf37770fc6e6"
    }
    

    If the address is included in a transaction in the unconfirmed queue waiting to be mined the following message will be sent: json { "currency": "ETH", "network": "mainnet", "url": "http://somepoint.point", "type": "ADDRESS", "blockHeight": -1, "pending": true, "address": "0x40e45890dff79e7d533797d964e64a2c0121f49a", "txHash": "0xc07012fcb595b4a0a078eaf66cf8959f7986d4c61d3690d831bc876ab101e9ce" }

    Example: Event type TOKEN:

    Requested data:

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

    Response: { "payload": { "uuid": "b1b60a3b-a224-4f20-aaa5-5500d2d8d355", "event": "TOKEN", "address": "0xe816c453a99b12bb65ea55db22a6fe70f63c2c7a", "url": "http://somepoint.point", "confirmations" : 6, } } If the address is included in a transaction in the unconfirmed queue waiting to be mined the following message will be sent:

    {
        "address": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
        "token_name": "Elly Token",
        "block": 3689370,
        "currency": "ETH",
        "token_symbol": "ELT",
        "type": "TOKEN",
      "token_type": "ERC-20",
      "contract": "0x40f9405587B284f737Ef5c4c2ecEA1Fa8bfAE014",
        "value": "3.000",
        "url": "https://webhook.site/1696a336-3aa0-4f89-b892-1daf47e34db5",
        "network": "rinkeby",
        "direction": "recipient",
      "confirmations": 6,
    }
    
    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 message to be sent to the specified url will be similar to the following:

    {
        "type": "TXPOOL",
        "txs": {
                "hash": "0xc07012fcb595b4a0a078eaf66cf8959f7986d4c61d3690d831bc876ab101e9ce",
                "nonce": 8323,
                "blockHash": "0x3f73cd5d2dc8c734df1b98fb768a9ba5be7e960947694cc7b446a0cde88eab33",
                "blockNumber": 7495207,
                "transactionIndex": 0,
                "from": "0x68de764c2429f5d84af0ebfbbffbdd934f20ff8e",
                "to": "0x40e45890dff79e7d533797d964e64a2c0121f49a",
                "value": "0",
                "gasPrice": "41000000000",
                "gas": "55000",
                "input": "0xa9059cbb00000000000000000000000072d30117bc238c6493b145c1c63510907df44bbe000000000000000000000000000000000000000000000000000000001f972880"
        },
        "currency": "ETH",
        "network": "mainnet",
        "address":"0x40e45890dff79e7d533797d964e64a2c0121f49a",   
        "url": "http://somepoint.point",
    }
    
    Example: Event type TRANSACTION_CONFIRMATIONS:

    Requested data:

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

    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.

    Response: { "payload": { "uuid": "7c0eff39-957c-4f13-89e0-1d0743d68679", "event": "TRANSACTION_CONFIRMATIONS", "confirmations": 12, "address": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb", "url": "https://blockchain.requestcatcher.com" } } The message to be sent to the specified url will be similar to the following:

    {
        "currentConfirmations": 1,
        "address": "0x7857af2143cb06ddc1dab5d7844c9402e89717cb",
        "blockHeight": 4495439,
        "currency": "ETH",
        "type": "TRANSACTION_CONFIRMATIONS",
        "txHash": "0xd95ab72c274c47a047a48e174decda15c7ea102ca3f899cbb948631c93fa3bad",
        "maxConfirmations": 3,
        "network": "rinkeby"
    }
    
    List Webhook Endpoint

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

    Code samples

    
    curl -X GET https://api.cryptoapis.io/v1/bc/eth/ropsten/hooks \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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",
                "url": "https://eth.requestcatcher.com/",
                "event": "NEW_BLOCK"
            },
            {
                "uuid": "f6bce46e-ea60-4c13-b1c2-2e0fab511917",
                "url": "http://somepoint.point",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "confirmations": 4,
                "event": "ADDRESS"
            },
            {
                "uuid": "e6a8700b-605b-4b36-85f4-f805c3540afd",
                "url": "http://somepoint.point",
                "height": 4132488,
                "transaction": "0x657c75cbc7b734200691d66f211429fa997d357b00bb969dae570dd3c5cf9cc7",
                "confirmations": 12,
                "event": "CONFIRMED_TX"
            },
            {
                "uuid": "31b418e7-0263-42b8-b2d8-095b4995f0d3",
                "url": "http://somepoint.point",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "event": "TXPOOL"
            },
            {
                "uuid": "ed5a7491-5df1-4af2-87c7-c502af1a41e2",
                "url": "http://somepoint.point",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "confirmations": 3,
                "event": "TOKEN"
            },
            {
                "uuid": "471c9d28-8f1e-4f8f-aa63-7a4925fd75f2",
                "url": "http://somepoint.point",
                "address": "0x4ab47e7b0204d6b3bf0e956db14e63142b9b5ab8",
                "confirmations": 1,
                "event": "ADDRESS"
            },
            {
                "uuid": "0c3546aa-2e4f-4cfe-bcbb-c043b4090239",
                "url": "http://somepoint.point",
                "height": -1, //height is -1 since this tx is not yet mined nor confirmed
                "transaction": "a70f2333677a73c6b2dc7f4f651f421590aebed7c3e494b67fafba36caec4eb6",
                "confirmations": 1,
                "event": "CONFIRMED_TX"
            }
        ],
        "meta": {
            "totalCount": 7,
            "results": 7
        }
    }
    
    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    Delete Webhook Endpoints

    Code samples

    
    curl -X DELETE https://api.cryptoapis.io/v1/bc/eth/ropsten/hooks/155b5e3e-36e8-4b4d-a2dc-0f3566cdfda0 \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    DELETE /v1/bc/eth/ropsten/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/eth/ropsten/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",
        "eth",
        "ropsten",
        "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/eth/ropsten/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/eth/ropsten/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,eth,ropsten,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/eth/ropsten/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/eth/ropsten/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/eth/${NETWORK}/hooks/${WEBHOOK_UUID}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. ropsten, rinkeby or mainnet)
    WEBHOOK_UUID ------- Webhook uuid