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

    General Information

    Get Node Information

    Sample Data

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

    Response Body

    {
      "payload": {
          "difficulty": 8955364.288821014,
          "headers": 1596016,
          "chain": "main",
          "chainWork": "0000000000000000000000000000000000000000000001e5e6d6e4537a4c7686",
          "mediantime": 1552571703,
          "blocks": 1596016,
          "bestBlockHash": "fd21eca2ec2c403c6eda75664218b9d4100b1fb6ab7335bc6d9646f3645dc457",
          "currency": "LTC",
          "transactions": 31847446,
          "verificationProgress": 0.9999999606601259
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    Get Block By Hash

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493",
      "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/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493');
    $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/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493")
    }
    
    

    Response Body

    {
      "payload": {
          "hash": "a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493",
          "strippedsize": 54571,
          "size": 56673,
          "weight": 220386,
          "height": 1591723,
          "version": 536870912,
          "versionHex": "20000000",
          "merkleroot": "e9878af1d156299a93bbb866b6f7763fd7f3c17f2af6e4f4a847d54debdf8254",
          "time": "2019-03-07 03:53:34 UTC", //deprecated
          "datetime": "2019-03-07 03:53:34 UTC",
          "mediantime": "2019-03-07 03:46:49 UTC",
          "nonce": 4071532595,
          "bits": "1a01f4d3",
          "difficulty": 8575667.068816248,
          "chainwork": "0000000000000000000000000000000000000000000001dd2cbecc524836fd24",
          "previousblockhash": "e56533cb16e258f85a342701224e2d880b095cc57a3edf87f8a87ef452e76ffc",
          "nextblockhash": "0b3382a1cfe00030937c26e8aee6c5b61ec557368c1e8fdb173141f83ce52412",
          "transactions": 30,
          "tx": [
              "ee5c02395f31dd4bdb9c3ece311897ddc2ecd2c911691e2b91b6bd0e298797ed",
              "e3554fae6985b5b8e3de1a65e8a076c34836ec12659f05541eccabf5920688dc",
              "61a9206a3c8d4850cf94cbe3ab7d4c2b0c707dbb6b32de636474f4bc942aab4d",
              "df5414029d85fa95b00f41c79461b077ecf32dc92d12f7f155be7c4c18df71bf",
              "374447dda9ae5b1f1033224b43b583aec4ef5c36778f25e0ed606d5d00dbc652",
              "9806271a72909209ca0e2b0402ee2601f352b42e69209bf5cc14ffe85d9755b0",
              "f82730c73a8f7f32e2ef70592859429e62a53cdb484cd95ec608c1d33fc3eb94",
              "e357a22a29b752221a718d75c51f52d0fa21f1e3a986179b814346a146019860",
              "4feda9a19a0a9da33e9b835c040b1b6f8cc64232d5c25def1184115cb666ce3c",
              "aa63151534c1bc0026ee183403626d1079ef989683e0c8d3624b5a417a2d7b04",
              "fb754fb7b5cf10a1403a5120999c4670b13ee8886be0a1fdc9bd004d6b25e459",
              "c48f4643465d8d71c02367e2cc8a121809e39d830c1fadc54eb332ec3bbe2fee",
              "4387ff64edf6177b78e60e81b32301e18e8fcc1b5cd4dec6926384d17a24b1c3",
              "044680dffdd3c6ed02543498cab4d50c0d4f1c78e74294dd5952b9951f9d6501",
              "070028592bb2a34651edbd0dc849ecddf40ba81ab21813e80bfbda5304ce598a",
              "d6945594b1555e7ef1c475e817c72b52ec0db9422c2673ce597206e139fe1f26",
              "f0c862954fc69fd37610b2b245827a0b4da113d2fd060fb6010392caed3a556d",
              "ad0f5494be92e4c05513f27609fc46bc7d6e6f53a0b46d2ac728a609d3c75a97",
              "5d61daaa4406cb29207e01f19130c87e41ade9f736fe57a0a3aa16a7442465f9",
              "b83ac83eef63de9d0b07ca092eb9fb75c1cd1ee8fe3dff4b698b91b12767b48a",
              "b460e47fe3e5bef4c347071b08dc2d8da1e2cf9c39edd3e41dda9f16a101d41b",
              "1454ac50710c1184a2b6c71cbc463c6dcaa5b21562c4879e1097449f14a9e524",
              "5acf3cc3919866b98803dae289d3ca5a66882443eed0bad93906533c5ec2d130",
              "2afd82730f4fc4210b8fcb525b757284a3f2dce2f9129fd47f37f9b3d58c2638",
              "6fdb499872aa789517e8d70dca29dd102481b53d0877833f2cb50e084c8f2155",
              "6f81e1da54131bfb9dd65e57de5b6b51bdf8421cbb26f6537807068f651a1d8a",
              "c5fa34f1d582045af7dcd228d8c16c50202dd191d13c548731430a5ee3fa3eee",
              "ead879a81e14df38101403ff36362669cd76c4f70ec0a50778754116ad4aff79",
              "f637245afeef1ab84a3ec610302fc3277dd32f1f41641db34b7ca99155350dc0",
              "f010841818ce557d93960fd1acaa72a707f4304633ca4ec14c5a18f50aff28b5"
          ],
          "confirmations": 78,
          "timestamp": 1551930814
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493

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

    Get Block by Height

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/1591723' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/mainnet/blocks/1591723 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/1591723').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/blocks/1591723",
      "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/ltc/mainnet/blocks/1591723');
    $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/ltc/mainnet/blocks/1591723")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/1591723'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/1591723")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/mainnet/blocks/1591723")
    }
    
    

    Response Body

    {
      "payload": {
        "hash": "a470e55552f39609406518da1d1a517ccbd9d4c55d4c3996a64301fa5b72a493",
        "strippedsize": 54571,
        "size": 56673,
        "weight": 220386,
        "height": 1591723,
        "version": 536870912,
        "versionHex": "20000000",
        "merkleroot": "e9878af1d156299a93bbb866b6f7763fd7f3c17f2af6e4f4a847d54debdf8254",
        "time": "2019-03-07 03:53:34 UTC", //deprecated
        "datetime": "2019-03-07 03:53:34 UTC",
        "mediantime": "2019-03-07 03:46:49 UTC",
        "nonce": 4071532595,
        "bits": "1a01f4d3",
        "difficulty": 8575667.068816248,
        "chainwork": "0000000000000000000000000000000000000000000001dd2cbecc524836fd24",
        "previousblockhash": "e56533cb16e258f85a342701224e2d880b095cc57a3edf87f8a87ef452e76ffc",
        "nextblockhash": "0b3382a1cfe00030937c26e8aee6c5b61ec557368c1e8fdb173141f83ce52412",
        "transactions": 30,
        "tx": [
            "ee5c02395f31dd4bdb9c3ece311897ddc2ecd2c911691e2b91b6bd0e298797ed",
            "e3554fae6985b5b8e3de1a65e8a076c34836ec12659f05541eccabf5920688dc",
            "61a9206a3c8d4850cf94cbe3ab7d4c2b0c707dbb6b32de636474f4bc942aab4d",
            "df5414029d85fa95b00f41c79461b077ecf32dc92d12f7f155be7c4c18df71bf",
            "374447dda9ae5b1f1033224b43b583aec4ef5c36778f25e0ed606d5d00dbc652",
            "9806271a72909209ca0e2b0402ee2601f352b42e69209bf5cc14ffe85d9755b0",
            "f82730c73a8f7f32e2ef70592859429e62a53cdb484cd95ec608c1d33fc3eb94",
            "e357a22a29b752221a718d75c51f52d0fa21f1e3a986179b814346a146019860",
            "4feda9a19a0a9da33e9b835c040b1b6f8cc64232d5c25def1184115cb666ce3c",
            "aa63151534c1bc0026ee183403626d1079ef989683e0c8d3624b5a417a2d7b04",
            "fb754fb7b5cf10a1403a5120999c4670b13ee8886be0a1fdc9bd004d6b25e459",
            "c48f4643465d8d71c02367e2cc8a121809e39d830c1fadc54eb332ec3bbe2fee",
            "4387ff64edf6177b78e60e81b32301e18e8fcc1b5cd4dec6926384d17a24b1c3",
            "044680dffdd3c6ed02543498cab4d50c0d4f1c78e74294dd5952b9951f9d6501",
            "070028592bb2a34651edbd0dc849ecddf40ba81ab21813e80bfbda5304ce598a",
            "d6945594b1555e7ef1c475e817c72b52ec0db9422c2673ce597206e139fe1f26",
            "f0c862954fc69fd37610b2b245827a0b4da113d2fd060fb6010392caed3a556d",
            "ad0f5494be92e4c05513f27609fc46bc7d6e6f53a0b46d2ac728a609d3c75a97",
            "5d61daaa4406cb29207e01f19130c87e41ade9f736fe57a0a3aa16a7442465f9",
            "b83ac83eef63de9d0b07ca092eb9fb75c1cd1ee8fe3dff4b698b91b12767b48a",
            "b460e47fe3e5bef4c347071b08dc2d8da1e2cf9c39edd3e41dda9f16a101d41b",
            "1454ac50710c1184a2b6c71cbc463c6dcaa5b21562c4879e1097449f14a9e524",
            "5acf3cc3919866b98803dae289d3ca5a66882443eed0bad93906533c5ec2d130",
            "2afd82730f4fc4210b8fcb525b757284a3f2dce2f9129fd47f37f9b3d58c2638",
            "6fdb499872aa789517e8d70dca29dd102481b53d0877833f2cb50e084c8f2155",
            "6f81e1da54131bfb9dd65e57de5b6b51bdf8421cbb26f6537807068f651a1d8a",
            "c5fa34f1d582045af7dcd228d8c16c50202dd191d13c548731430a5ee3fa3eee",
            "ead879a81e14df38101403ff36362669cd76c4f70ec0a50778754116ad4aff79",
            "f637245afeef1ab84a3ec610302fc3277dd32f1f41641db34b7ca99155350dc0",
            "f010841818ce557d93960fd1acaa72a707f4304633ca4ec14c5a18f50aff28b5"
        ],
        "confirmations": 78,
        "timestamp": 1551930814
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    1591723

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

    Get Latest Block

    Sample Data

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

    Response Body

    {
      "payload": {
          "hash": "75729678655e093069f68b9b1fab289e93156ef0e612dd35d1183c7b9e656f6c",
          "strippedsize": 994324,
          "size": 994904,
          "weight": 3977876,
          "height": 1591803,
          "version": 536870912,
          "versionHex": "20000000",
          "merkleroot": "237009d26571d1ebbb2d04e76a23ffa2d857fa8dd091d35e85d22fadac424941",
          "time": "2019-03-07 07:17:31 UTC", //deprecated
          "datetime": "2019-03-07 07:17:31 UTC",
          "mediantime": "2019-03-07 07:07:04 UTC",
          "nonce": 3837412485,
          "bits": "1a01f4d3",
          "difficulty": 8575667.068816248,
          "chainwork": "0000000000000000000000000000000000000000000001dd55a34d2c4a6c5414",
          "previousblockhash": "32e8641755ba4565b9cb92686e2375f483b4bd725ce05e0c4acfb7fe30627e41",
          "nextblockhash": "c90e659702b43fccfb6eb1f6ff7076cda909bf91e5f09534aec10e5b24a1bce7",
          "transactions": 46,
          "tx": [
              "76d1db3c45492d0bb92f27668fe945c97f7ae0a33833721b7401e2466b26f801",
              "b20392d17cba3a954ae5bb1eac9963e57db0ce1efb2de143b15c724a0bbbf0e7",
              "fceeb3163dfbc8dc04a7af5329b86e1fbf66b50dbb155381e95972074e1f370e",
              "117bf69b08f0c06feccc79442655104e1a8868ecc34fb651f05788b323106d3c",
              "67b7fc1aa8a3563bd7416a5b277fce10e2002d2239926855679b7394c723d464",
              "e5b3b05fa8da744ea6b1fbac61b9c73fa63998d36f6ca7d8ddf0c3ffdd6b8893",
              "a80ef9d8d7d2aa8a53b3c618edc1143125be02fc1d6f9dfd8fcb5db1f53221ca",
              "abea025906a5b265e4f4c031ee3eab4601c59d400bd2dc7c37748bae6840878f",
              "8404c8b33d31705633d3aeecb5d2cfbebfc65c4acd648eb90e6fb7bd9d3e71e9",
              "41440e416d8ba33ab04eaa75f0e06b1ca383c192e3b10ceb518ccebb62cfcfe0",
              "8e81378273ad1f8af1a8e51b3ad1503711334329b520968c983894757f0b8505",
              "f230914be565938de6bd56ceb2cf688597f3d9b8ed9cb5b6f9f8060caf1a3c45",
              "7005e93643ed1b55a85ce4415cd936240af71dda4632810f349c8c1c03db3865",
              "845a5b1c6a5e725d4e0e51715008401ad7c7b2dee5e2e8031b1ba0a4577d196d",
              "150095491c7d65ae737901efb335eaf9243a0edf215d592e9158ae0261801581",
              "58727d4da87698c84886a33c9dc2ed2e3d97adbb8e409223b074468565c3ca87",
              "a647802ab73f18d636d231c023d1a1220611abb6d242e7994fdd9a259d157a9c",
              "efba5258f16a6feb87ddf683aa46ef45a4694cb6b67d9c038d41bedad8254ca8",
              "0566fc7160ddd25d5fea4c3909626aeb4ab6ddd09e07de3a341c7c1dd4e7b7c7",
              "45554386946c540b0779a9958f8b2e1d915524cf3e7d82743f22f6ee9b015ade",
              "e548ed80481a7bbe06c7aed3406c586393213f0e0da2870a8e82c5c8b1b889e0",
              "01b5c25c73272efdd6d47e3e647cde423e36cea68bccb4f4f0a0bd59356119f7",
              "fee16ff4dcd9ecfbee1215215116e49240f7a2824435cb4b0cc97444e4d81c07",
              "56ec817e4ab4240f67f7d5d8a9ef3c70c86567061e1f734618b36ba9928e5232",
              "62496291ecd5f5c289b4dedba8923984f041aa034943383b11c675c5abef5039",
              "48eb4a42392d3046ab2d5efc0c604a8262c30ec3cbf5074e8e12ffcf7476fc7c",
              "62a90f18631a25f03b1504921a6ce81c1cdaa36bc7d05bdc20383435fd54a794",
              "b7be6e51094c112771606623f23fe3e3745f9770360d705a8d9bbb2dae2e80a8",
              "6c43cb0372c8249d2639ffb03dc216014624e550391b382aaec2295b954b78c9",
              "5661a00e6b031e063826cf53470d7a6825999ba3ed6d05903221d08b91c8f3e4",
              "fa57206323306e0904ddae14f76e04cc263500f5890a7a0271cdde87151f810d",
              "a2608b8ae869799105c0c5a60dac2f3745f330a78942e966c128740341815910",
              "0c0627209fb009329f403cb94c8bbbe58ef90e20f7743ff3bb9ec14eb6f57d14",
              "b63671d0b90ad26ff41bd5f82cba06147b9cfa51b40c796013d36b6e78aa7917",
              "ab6d632ed86fb0e3874aa479b8937476fc8b1cd27ff25a4c49f727431d285c29",
              "2b9663e015e9692abcfb993a383a27a457efb08ec08803a70452fece8786942a",
              "334b55e1dc20d8702d482f7b662122d5ab293dc9ed8be7110c809f6bd540d32e",
              "f1fb117ec68c7fa72289677c94e13e1b2abee8ffddc0e1078074eaa1e2a2a242",
              "d9aa89fc1a80ae80f980de79b3dead7c98c40b0536fd2b84bb338a33edd5e24d",
              "24e8318f2298f1a677ac776cfd9fa0eada67efbb13ab5a271e02d3f1340cf46e",
              "e9830dd315bc2c65302fb28cc66efb829d6cdc20ced56bef9d599079ff97c279",
              "ac2b00831cb7f9a663220877088e1c1df0eefdf61592100e7d175030782a0a7e",
              "f43c00e072c09824547ed7c8b11ea31f37f553f08bb1162f0b06fab99f6d3e8c",
              "f48794218c154fd5827b20a69566d5d9f7c7cb66b191c56bb23b8816fac722c8",
              "bd4ca6f9ba15ececc9d6a3f3ec2d146bb88d67aaebf7a5d20df160c058715399",
              "2503a25d3b25fa579da4549e7d79dffb040a612dcb19856f6a211a588bd814e2"
          ],
          "confirmations": 1,
          "timestamp": 1551943051
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    Addresses

    Crypto APIs Address API allows you to look up information about public addresses on the blockchain, generate single-use, low-value key pairs with corresponding addresses, help generate multisig addresses, and collect multiple addresses into a single shortcut for address viewing, all based on the coin/chain resource you’ve selected for your endpoints.

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

    Get Address Details

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc' \
        -H 'Content-Type: application/json' \
        -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc",
      "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/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc');
    $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/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/mainnet/address/MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc")
    }
    
    

    Response Body

    {
      "payload": {
          "address": "MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc",
          "totalSpent": "0",
          "totalReceived": "0.0745512",
          "balance": "0.0745512",
          "txi": 0,
          "txo": 1,
          "txsCount": 1,
          "addresses": [
              "MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc"
          ]
      }
    }
    
    Info

    The default Address Endpoint strikes a general information about addresses.

    HTTP Request

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

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

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

    MKZKZzkJoesBBEYFfcfyTPhKA1FL1d3pZc

    or

    mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9,mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq,mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B

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

    GET /v1/bc/ltc/testnet/address/mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9,mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq,mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B

    {
      "payload": {
          "address": "mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9,mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq,mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B",
          "totalSpent": "0",
          "totalReceived": "0.00007799",
          "balance": "0.00007799",
          "txi": 0,
          "txo": 1,
          "txsCount": 1,
          "addresses": [
              "mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9",
              "mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq",
              "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
          ]
      }
    }
    

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

    Get Multisig Address Details

    Sample Data

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

    Response Body

    {
        "payload": [
            {
                "address": "mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9,mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq,mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B",
                "totalSpent": "0",
                "totalReceived": "0.00007799",
                "balance": "0.00007799",
                "txi": 0,
                "txo": 1,
                "txsCount": 1,
                "addresses": [
                    "mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9",
                    "mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq",
                    "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
                ]
            }
        ],
        "meta": {
            "totalCount": 1,
            "limit": 50,
            "results": 1
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9

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

    Generate Address

    Sample Data

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

    Response Body

    {
      "payload": {
          "privateKey": "7ed6b5da58d2ae1458c4af4aa790b6de9432445b54f9df3164e5a78eafd4cc5f",
          "publicKey": "03c4d8524f0c477d883ac59e7c79af4993007e17a9d85d51b40356ebf5e772dc1d",
          "address": "Lhhsy17saQ5QiZD41wmVkiJP7qwhzNCEwB",
          "wif": "T7JXz7wgFhQEHHsssQqyrVpMk2SfjZrLrrFFLxyCwUfB9oa71Kgq"
      }
    }
    
    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/ltc/${NETWORK}/address

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

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

    Get Basic Transactions By Address

    Sample Data

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

    Response Body

    {
      "payload": [
        {
          "txid": "79e983ff661b84801f2d4e9283e8fa4df678714a7a4ec435b4c7e7720a0c1374",
          "amount": 25,
          "fee": 0,
          "unit": "ltc",
          "datetime": "2020-03-06 08:44:28 UTC",
          "timestamp": 1583484268,
          "confirmations": 1,
          "sent": {
            "coinbase": 25
          },
          "received": {
            "mvymY6wswVHDh9iW3bSg7zRgJgcvwPdV9F": 25
          }
        },
        {
          "txid": "4a37bdccac863f4afc0ea46cdfb524c3763443ebe9aa8fcc04817d579e356b5c",
          "amount": 25.00007051,
          "fee": 0,
          "unit": "ltc",
          "datetime": "2020-03-06 02:59:45 UTC",
          "timestamp": 1583463585,
          "confirmations": 90,
          "sent": {
            "coinbase": 25.00007051
          },
          "received": {
            "mvymY6wswVHDh9iW3bSg7zRgJgcvwPdV9F": 25.00007051
          }
        }
      ],
      "meta": {
        "totalCount": 937,
        "index": 0,
        "limit": 50,
        "results": 50
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    mvymY6wswVHDh9iW3bSg7zRgJgcvwPdV9F

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

    Get Confirmed Transactions By Address

    Sample Data

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

    Response Body

    {
        "payload": [
            {
                "txid": "2710b750dccaeb9a11b01bf7043983e6ba0d4beb33b8d58c310b85e926632727",
                "hash": "2710b750dccaeb9a11b01bf7043983e6ba0d4beb33b8d58c310b85e926632727",
                "index": 1,
                "version": 1,
                "size": 534,
                "vsize": 534,
                "locktime": 0,
                "time": "2018-04-10 13:02:24 UTC", //deprecated
                "datetime": "2018-04-10 13:02:24 UTC",
                "blockhash": "b01ac562ab69d01f99b6928b4d43eb1d8e6724279689f622669cd4d899877b30",
                "blockheight": 485622,
                "blocktime": "2018-04-10 13:02:24 UTC",
                "timestamp": 1523365344,
                "confirmations": 535059,
                "txins": [
                    {
                        "txout": "f920d49b7e536e7e19eb49dc53ca63102a53b9a776e2a697d6ace0347eeb33f1",
                        "vout": 3,
                        "amount": "26.46261528",
                        "addresses": [
                            "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
                        ],
                        "script": {
                            "asm": "3045022100d0ff43fc9ae6ff83229d138a63303cbe5626886e86a277360dc248778ede4e0002204fe2c74686296f5ecd201120ab1cfd88a5bf70c2d65f4ee2c4243153797ada21[ALL] 03004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e",
                            "hex": "483045022100d0ff43fc9ae6ff83229d138a63303cbe5626886e86a277360dc248778ede4e0002204fe2c74686296f5ecd201120ab1cfd88a5bf70c2d65f4ee2c4243153797ada21012103004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e"
                        },
                        "votype": "pubkeyhash"
                    }
                ],
                "txouts": [
                    {
                        "amount": "0.00007799",
                        "type": "multisig",
                        "spent": false,
                        "addresses": [
                            "mmLSLhwsZ2ysp6E6vR8HywTr7w5awX84jD",
                            "mqHHCDrZDhEEmwEmeVpoCz1ffW5PUygEqQ",
                            "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
                        ],
                        "script": {
                            "asm": "1 038846fb68c4175cd77364e3ac32d3e6ddbab1a5d29b5be4930a778da2df7bb461 03eddddc8d7d716f39de10b801583f0337be3b94e2fe11aa8d96c7f81f1abba426 03004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e 3 OP_CHECKMULTISIG",
                            "hex": "5121038846fb68c4175cd77364e3ac32d3e6ddbab1a5d29b5be4930a778da2df7bb4612103eddddc8d7d716f39de10b801583f0337be3b94e2fe11aa8d96c7f81f1abba4262103004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e53ae",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.00007799",
                        "type": "multisig",
                        "spent": false,
                        "addresses": [
                            "mfX9XpSGvUSJQSL3UMgW3kqER52KWhAYM9",
                            "mj4Kj5VkDnVXMwjLPPFeg8VuA2GjzThctq",
                            "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
                        ],
                        "script": {
                            "asm": "1 028846fb68c463df690632817e83d3e6dcbab1a5d2915be494657e56dd2a3f352a 031e65e9e7b2dcfcdc906ec108d9be821060ebbb9fcc1e75857240f81f1abba414 03004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e 3 OP_CHECKMULTISIG",
                            "hex": "5121028846fb68c463df690632817e83d3e6dcbab1a5d2915be494657e56dd2a3f352a21031e65e9e7b2dcfcdc906ec108d9be821060ebbb9fcc1e75857240f81f1abba4142103004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e53ae",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "0.00007799",
                        "type": "multisig",
                        "spent": false,
                        "addresses": [
                            "mqVcSL24ryG33M1RaVRJMZ7mhsr8TYxncx",
                            "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B",
                            "n1ceqPHEbtGWzkahzaDCkewmx69cvJYc7z"
                        ],
                        "script": {
                            "asm": "1 028146fb68db552c33cd925ce68d4064de9bb140b926d5d65a2b618c4fef391169 035b84a9c3dd65b24e08b2a74b48451132ffcf3034a4b40f71224bf81f1abba447 03004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e 3 OP_CHECKMULTISIG",
                            "hex": "5121028146fb68db552c33cd925ce68d4064de9bb140b926d5d65a2b618c4fef39116921035b84a9c3dd65b24e08b2a74b48451132ffcf3034a4b40f71224bf81f1abba4472103004b0df4813e97cf3820b6288eb3c2192110eefb985aef67a210c03af77b673e53ae",
                            "reqsigs": 1
                        }
                    },
                    {
                        "amount": "26.44238131",
                        "type": "pubkeyhash",
                        "spent": true,
                        "addresses": [
                            "mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B"
                        ],
                        "script": {
                            "asm": "OP_DUP OP_HASH160 7b2bbf39d65aa5a5fcb48c00748394755662d2b1 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a9147b2bbf39d65aa5a5fcb48c00748394755662d2b188ac",
                            "reqsigs": 1
                        }
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 1,
            "index": 0,
            "limit": 50,
            "results": 1
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    mrkDpF1ZQTGwrbug8eCCHACYTPe2RQSJ3B

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

    Get Unconfirmed Transactions By Address

    Sample Data

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

    Response Body

    
    {
      "payload": [
        {
          "txid": "a0fe0d1568a441dc7872a4ea5f3382dfb7d59d5f2b771a35e06a2a9a578bf36a",
          "hash": "dd34dc2d4197eaa3f9f660252a7c310b7d48c4ea8ceb1297454ea6b5bd1f4485",
          "version": 2,
          "size": 248,
          "vsize": 166,
          "locktime": 0,
          "time": "2020-01-31 10:28:18 UTC",
          "datetime": "2020-01-31 10:28:18 UTC",
          "timestamp": 1580466498,
          "txins": [
            {
              "txout": "08e8329347cf7f2d73363bac8bf0a36ffae3478c769d4ab9662de08c41dad4fe",
              "vout": 1,
              "amount": "2.07867922",
              "addresses": [
                "M893qmrU3PSwTrDVU7Cn3K4zxUWPKBmZkr"
              ],
              "script": {
                "asm": "0014798f98b4c3f82c7753b113d0752f89f764500fbc",
                "hex": "160014798f98b4c3f82c7753b113d0752f89f764500fbc"
              },
              "votype": "scripthash"
            }
          ],
          "txouts": [
            {
              "amount": "0.00062591",
              "type": "scripthash",
              "spent": false,
              "addresses": [
                "MKWFjaryEDF48iNcifq7XZBMnTm8n5ASKN"
              ],
              "script": {
                "asm": "OP_HASH160 7f4c89220d67910b9d2d1a87758b4370bc1fb306 OP_EQUAL",
                "hex": "a9147f4c89220d67910b9d2d1a87758b4370bc1fb30687",
                "reqsigs": 1
              }
            },
            {
              "amount": "2.07805097",
              "type": "scripthash",
              "spent": true,
              "addresses": [
                "M893qmrU3PSwTrDVU7Cn3K4zxUWPKBmZkr"
              ],
              "script": {
                "asm": "OP_HASH160 02a07d24ceaaf0019fa5c4a3e062653825f45194 OP_EQUAL",
                "hex": "a91402a07d24ceaaf0019fa5c4a3e062653825f4519487",
                "reqsigs": 1
              }
            }
          ]
        },
        ...
        {
          "txid": "c78b5b047b27b5c02c5b91251eef9e2550fa8f08c0b8e2e8263f1f78b205df18",
          "hash": "6e971bebe3a7f40137955ff3570bc98a1534e9e531c8521d0098bfa72773bcb2",
          "version": 2,
          "size": 247,
          "vsize": 166,
          "locktime": 0,
          "time": "2020-01-31 10:22:13 UTC",
          "datetime": "2020-01-31 10:22:13 UTC",
          "timestamp": 1580466133,
          "txins": [
            {
              "txout": "106498de088ee2261936f8984e5ac052279b51a840b20c5f28d957f23a7c9931",
              "vout": 1,
              "amount": "2.10969748",
              "addresses": [
                "M893qmrU3PSwTrDVU7Cn3K4zxUWPKBmZkr"
              ],
              "script": {
                "asm": "0014798f98b4c3f82c7753b113d0752f89f764500fbc",
                "hex": "160014798f98b4c3f82c7753b113d0752f89f764500fbc"
              },
              "votype": "scripthash"
            }
          ],
          "txouts": [
            {
              "amount": "0.00040056",
              "type": "scripthash",
              "spent": false,
              "addresses": [
                "MQL3MhBkTbbExwsALFjpiZJes6xH21eYio"
              ],
              "script": {
                "asm": "OP_HASH160 b436ac3dcfff707bd72557fc1904ebd89746bcb8 OP_EQUAL",
                "hex": "a914b436ac3dcfff707bd72557fc1904ebd89746bcb887",
                "reqsigs": 1
              }
            },
            {
              "amount": "2.10929458",
              "type": "scripthash",
              "spent": false,
              "addresses": [
                "M893qmrU3PSwTrDVU7Cn3K4zxUWPKBmZkr"
              ],
              "script": {
                "asm": "OP_HASH160 02a07d24ceaaf0019fa5c4a3e062653825f45194 OP_EQUAL",
                "hex": "a91402a07d24ceaaf0019fa5c4a3e062653825f4519487",
                "reqsigs": 1
              }
            }
          ]
        }
      ],
      "meta": {
        "totalCount": 8,
        "index": 0,
        "limit": 50,
        "results": 8
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    M893qmrU3PSwTrDVU7Cn3K4zxUWPKBmZkr

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

    Multiple Addresses Info Endpoint

    Code samples

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

    Response Body

    {
      "payload": [
        {
          "address": "LgyfFzHnz729wxHQpNt5chgNQAQJgzq4iy",
          "totalSpent": "0",
          "totalReceived": "0",
          "balance": "0",
          "txi": 0,
          "txo": 0,
          "txsCount": 0,
          "addresses": [
            "LgyfFzHnz729wxHQpNt5chgNQAQJgzq4iy"
          ]
        },
        {
          "address": "LPSXDiHaGvamWffo9PEmfSHR9Uywsj89RB",
          "totalSpent": "0",
          "totalReceived": "0",
          "balance": "0",
          "txi": 0,
          "txo": 0,
          "txsCount": 0,
          "addresses": [
            "LPSXDiHaGvamWffo9PEmfSHR9Uywsj89RB"
          ]
        },
        {
          "address": "LXevopzhVgPWtAci7umTR4f6L7jusFpJfH",
          "totalSpent": "0",
          "totalReceived": "0",
          "balance": "0",
          "txi": 0,
          "txo": 0,
          "txsCount": 0,
          "addresses": [
            "LXevopzhVgPWtAci7umTR4f6L7jusFpJfH"
          ]
        }
      ],
      "meta": {
        "totalCount": 3,
        "limit": 3,
        "results": 3
      }
    }
    
    Info

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

    HTTP Request

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

    Query Parameters
    Requested Object

    {
    "addresses": [
    "LgyfFzHnz729wxHQpNt5chgNQAQJgzq4iy",
    "LPSXDiHaGvamWffo9PEmfSHR9Uywsj89RB",
    "LXevopzhVgPWtAci7umTR4f6L7jusFpJfH"
    ]
    }

    Max length of the array is 10 elements

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

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

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

    Wallets

    Hierarchical Deterministic (HD) Wallets

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

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

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

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

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

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

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

    Using Wallets

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

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

    alice

    As you’ll see in the examples, if you’re using HD Wallets, take care to use the appropriate resource (e.g. /wallets/hd instead of /wallets ).

    Create Wallet

    Sample Data

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

    Response Body

    // normal wallet
    {
      "payload": {
          "addresses": [
            "LLrxRzrNVxyVQ2DjuMoCNEMN2YM2nkwr1K", 
            "LiLGYuVLV4HExGYizwZEjTpTG2apN4or8M", 
            "LP3LrpZDjCDhysQarq4STG97sH8a8Yf748"],
          "walletName": "demowallet"
      }
    }
    
    // hd wallet
    {
      "payload": {
          "addresses": [
            {
                "address": "LU1XyUdC9Zkw79WDQP3XEGwtCQt6w3xBPv",
                "path": "M/0H/0/0"
            },
            {
                "address": "LbUAGNNWPetHh5R8qC9rsxcWgZyQMa5qqk",
                "path": "M/0H/0/1"
            },
            {
                "address": "LYEgz3xivXX3BPj7QcBXJVKB5jVFYVeZGq",
                "path": "M/0H/0/2"
            },
            {
                "address": "La7yXGo9qacmpf8m2gmf3Jsqr5k8JN9Z68",
                "path": "M/0H/0/3"
            },
            {
                "address": "LfJBVzpV8NbHtGDz2a13eSvm1p1K1vd59z",
                "path": "M/0H/0/4"
            }
          ],
          "walletName": "demohdwallet"
      }
    }
    
    HTTP Request

    normal wallet

    POST /v1/bc/ltc/${NETWORK}/wallets

    hd wallet

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

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

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

    Request HD Wallet Object

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

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

    For normal wallets, you must include WALLET_NAME attribute and at least one public address in the ADDRESSES array.

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

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

    List My Wallets

    Sample Data

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

    Response Body

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

    normal wallet

    GET /v1/bc/ltc/${NETWORK}/wallets

    hd wallet

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

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

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

    Get Wallet Details

    Sample Data

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

    Response Body

    // normal wallet
    {
        "payload": {
            "walletName": "demowallet",
            "addresses": [
                {
                    "address": "LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n",
                    "balance": "0.00000000"
                },
                {
                    "address": "LUc2pToUCLLGh3PdfMQonHQhFrQmFDwRwM",
                    "balance": "0.000114"
                },
            ],
            "totalBalance": "0.000114"
        },
        "meta": {
            "totalCount": 5,
            "limit": 50,
            "results": 5
        }
    }
    
    // hd wallet
    {
        "payload": {
            "walletName": "demohdwallet",
            "addresses": [
                {
                    "address": "mpzD7NBo1RFgLFEMRGpt2iWXk8n3gndBN8",
                    "path": "M/0H/0/0",
                    "balance": "0.00000000"
                },
                {
                    "address": "n46cEg2XAMfmTdraEaUiTWsn4TTZMVkDRa",
                    "path": "M/0H/0/1",
                    "balance": "0.00021"
                },
                {
                    "address": "n3UgRYNgBB7veAUKugiGtV5Ugsu3zAArxW",
                    "path": "M/0H/0/2",
                    "balance": "0.00041404"
                },
                {
                    "address": "mkZg2uqHchJ5ZmsRXgkrcSdEvzaA1Bb3SW",
                    "path": "M/0H/0/3",
                    "balance": "0.00319718"
                },
                {
                    "address": "mn9GQFDR9YmqAiMC5exvvFzDQZqqcBPoKc",
                    "path": "M/0H/0/4",
                    "balance": "0.00000000"
                },
                {
                    "address": "mo3UNZDAwpmczi2UFowRWydezbmLN4yMuZ",
                    "path": "M/0H/0/5",
                    "balance": "0.00000000"
                },
                {
                    "address": "mwmyQ419DDbagToXP8HufpgLg6ihyGU84Y",
                    "path": "M/0H/0/6",
                    "balance": "0.00000000"
                },
                {
                    "address": "mgZP9emxHmGr4Ecq1JiTbHP93hBmbPGqhC",
                    "path": "M/0H/0/7",
                    "balance": "0.00000000"
                }
            ],
            "totalBalance": "0.00382122"
        }
    }
    
    HTTP Request

    normal wallet

    GET /v1/bc/ltc/${NETWORK}/wallets/${WALLET_NAME}

    hd wallet

    GET /v1/bc/ltc/${NETWORK}/wallets/hd/${WALLET_NAME}

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

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

    Add Addresses to Wallet

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/addresses \
      -H 'authorization: my-api-key' \
      -H 'content-type: application/json' \
      -d '{
        "addresses" : ["LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T", "LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS"]
    }'
    
    
    
    POST /v1/bc/ltc/mainnet/wallets/demowallet/addresses HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "addresses" : ["LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T", "LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS"]
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/addresses",
      "method": "POST",
      "headers": {
        "content-type": "application/json",
        "authorization": "my-api-key"
      },
      "processData": false,
      "data": "{\n\t\"addresses\" : [\"LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T\", \"LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS\"]\n}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "port": null,
      "path": "/v1/bc/ltc/mainnet/wallets/demowallet/addresses",
      "headers": {
        "content-type": "application/json",
        "authorization": "my-api-key"
      }
    };
    
    var req = http.request(options, function (res) {
      var chunks = [];
    
      res.on("data", function (chunk) {
        chunks.push(chunk);
      });
    
      res.on("end", function () {
        var body = Buffer.concat(chunks);
        console.log(body.toString());
      });
    });
    
    req.write(JSON.stringify({ addresses: 
       [ 'LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T',
         'LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS' ] }));
    req.end();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/addresses');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'authorization' => 'my-api-key',
      'content-type' => 'application/json'
    ));
    
    $request->setBody('{
        "addresses" : ["LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T", "LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS"]
    }');
    
    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/ltc/mainnet/wallets/demowallet/addresses")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["content-type"] = 'application/json'
    request["authorization"] = 'my-api-key'
    request.body = "{\n\t\"addresses\" : [\"LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T\", \"LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS\"]\n}"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("api.cryptoapis.io")
    
    payload = "{\n\t\"addresses\" : [\"LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T\", \"LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS\"]\n}"
    
    headers = {
        'content-type': "application/json",
        'authorization': "my-api-key"
        }
    
    conn.request("POST", "/v1/bc/ltc/mainnet/wallets/demowallet/addresses", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    MediaType mediaType = MediaType.parse("application/json");
    RequestBody body = RequestBody.create(mediaType, "{\n\t\"addresses\" : [\"LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T\", \"LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS\"]\n}");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/addresses")
      .post(body)
      .addHeader("content-type", "application/json")
      .addHeader("authorization", "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/ltc/mainnet/wallets/demowallet/addresses"
    
        payload := strings.NewReader("{\n\t\"addresses\" : [\"LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T\", \"LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS\"]\n}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("content-type", "application/json")
        req.Header.Add("authorization", "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": {
          "walletName": "demowallet",
          "addresses": [
              "LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n",
              "LUc2pToUCLLGh3PdfMQonHQhFrQmFDwRwM",
              "LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T",
              "LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS"
          ]
      }
    }
    
    HTTP Request

    POST /v1/bc/ltc/${NETWORK}/wallets/${WALLET_NAME}/addresses

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

    { "addresses" : ${ADDRESSES} }

    This endpoint allows you to add public addresses to the $WALLET_NAME wallet, by POSTing a partially filled out Wallet object. You only need to include the additional addresses in a new addresses array in the object. If successful, it will return the newly modified Wallet, including an up-to-date, complete listing of addresses.

    Generate Address in Wallet

    Sample Data

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

    Response Body

    // normal wallet
    {
      "payload": {
          "wallet_info": {
              "walletName": "demowallet",
              "addresses": [
                  "LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n",
                  "LUc2pToUCLLGh3PdfMQonHQhFrQmFDwRwM",
                  "LRY1XCdGr1E3cd8ZAC9MzJprx7V6rKj14T",
                  "LX31F8ijcoVvgT9pUAy8KV5qHzm1ajtnTS",
                  "LYWHCkAVvqSHuT5x5Mzq5jELm9wssAbLTQ"
              ]
          },
          "address_info": {
              "privateKey": "cf307a286145413337f4b7cea5d150486af91f3629aadfa4bd1a2a7ccd9bac6b",
              "publicKey": "02610388c2acd99c1fdd04f6d16063403d1e34e346145115d68169157c91309a0b",
              "address": "LYWHCkAVvqSHuT5x5Mzq5jELm9wssAbLTQ",
              "wif": "T9zj5CvB2Mwbp4QwNkaGonGL36QCWkh1DN9c3fnQZjGrAKTJe56v"
          }
      }
    }
    
    // hd wallet
    {
      "payload": {
          "walletName": "demohdwallet",
          "addresses": [
              {
                  "address": "LKMrXZdwCs3cRuHeB9df4G2eDtzotRLWEq",
                  "path": "M/0H/0/5"
              },
              {
                  "address": "LRBJJgwfJ89pJXJWCEPYoKM9j6c9itGvfn",
                  "path": "M/0H/0/6"
              },
              {
                  "address": "LVHzvHjc3eP6Vh6H6Yq3CFRd3f39GvHC4Z",
                  "path": "M/0H/0/7"
              }
          ]
      }
    }
    
    HTTP Request

    normal wallet

    POST /v1/bc/ltc/${NETWORK}/wallets/${WALLET_NAME}/addresses/generate

    hd wallet

    POST /v1/bc/ltc/${NETWORK}/wallets/hd/${WALLET_NAME}/addresses/generate

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

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

    Remove Addresses from Wallet
    
    curl -X DELETE \
      https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    DELETE /v1/bc/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n 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/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n",
      "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": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n",
      "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();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n');
    $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/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n")
    
    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/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n", 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/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n")
      .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/ltc/mainnet/wallets/demowallet/address/LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n"
    
        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": "address LdYmBLEYNHs4XDomUwCHAQi2RNZ61dvu9n was successfully deleted!"
      }
    }
    
    HTTP Request

    DELETE /v1/bc/ltc/${NETWORK}/wallets/${WALLET_NAME}/address/${ADDRESS}

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    WALLET_NAME ------- Wallet name
    ADDRESS ------- Address which should be deleted

    This endpoint allows you to delete an $ADDRESS associated with the WALLET_NAME wallet.

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

    Response Body

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

    normal wallet

    DELETE /v1/bc/ltc/${NETWORK}/wallets/${WALLET_NAME}

    hd wallet

    DELETE /v1/bc/ltc/${NETWORK}/wallets/hd/${WALLET_NAME}

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

    This endpoint deletes the Wallet or HD Wallet with WALLET_NAME.

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

    Sample Data

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

    Response Body

    {
        "payload": {
            "xpriv":"11113Vt2FcUKhzdURMWRDTm4faAiK6hoRk6bL4KmbxLzZef358Qah8UiJxsWcDY7Qq2VEK3NC31yKTst9McHKBNzUhAzM33FeUiwLuVXXAiDoC",
            "xpub": "11113Vt2FcUKhzdURMWRDTm4faAiK6hoRk6bL4KmbxLzZef358Qah8UiJxsWicrsQwVBWMjzYB9v6m8xjBWMsACopjsiNbZWq9iKjn7WbFg4oQ",
            "wif": "T5MKQSZUe8v8XvrfXXBgWjmT8khDe9ATaXMdySadbnLTU5kWmFnf"
        }
    }
    
    Info

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

    HTTP Request

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

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

    Sample Data

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

    Response Body

    {
        "payload": [
            "LUWPbpM43E2p7ZSh8cyTBEkvpHmr3cB8Ez",
            "Ldatw8ZjgMGNUo5HMN6RgCrjmh7q494Si3",
            "LX4YojYdeBk3TtUcryCcgAqYxjicKfK7AD",
            "LgbbqoBcNc8voAvrrk3ZyqCU3Y4H24aauc",
            "LiNDwbwBhX9djY7tb3gWvrXjuWQNerLjnP"
        ],
        "meta": {
            "totalCount": 5,
            "index": 0,
            "limit": 5,
            "results": 5
        }
    }
    
    Info

    Get Pub Addresses Endpoint allows you to get addresses associated with the specified extended public key. Supported BIP formats are: bip39 and bip44. Since addresses are hierarchically ordered we provide the query params index and limit, in order to be able to get the addresses in specific positions. Default values are: 0 and 100, accordingly. The default values will return the first one hundred receive addresses. If you want to get the change addresses of the extended public key you should set type to be equal to "change" as a query parameter. If the addresses you are looking for are scrpit addresses(e.g. Coinomi, Ledger), then set script to true as a query parameter.

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    index 0 starting point (integer)
    limit 100 result count (integer)
    type receive address type (string)
    script false script address (boolean)
    Get Public Extended Key Transactions (xPub, yPub, zPub)

    Sample Data

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

    Response Body

    {
        "payload": [
            {
                "address": "LUWPbpM43E2p7ZSh8cyTBEkvpHmr3cB8Ez",
                "transactions": [
                    {
                        "txid": "e351691649c3273c0220be9cab337b1c17f104e6ecfd9645099ba796290fd6ec",
                        "hash": "e351691649c3273c0220be9cab337b1c17f104e6ecfd9645099ba796290fd6ec",
                        "index": 40,
                        "version": 1,
                        "size": 191,
                        "vsize": 191,
                        "locktime": 1506944,
                        "datetime": "2018-10-10 18:33:08 UTC",
                        "time": "2018-10-10 18:33:08 UTC",
                        "blockhash": "9b92bbd1030455dac2e81ec9ac251af4ee6f47dfb7233b279e99df6ecaccac90",
                        "blockheight": 1506945,
                        "blocktime": "2018-10-10 18:33:08 UTC",
                        "timestamp": 1539196388,
                        "txins": [
                            {
                                "txout": "db3c1550c2e99896f89063ca1f9ca29d2811ea67014e50b92511d55c2edec46e",
                                "vout": 0,
                                "amount": "0.00001704",
                                "addresses": [
                                    "LUWPbpM43E2p7ZSh8cyTBEkvpHmr3cB8Ez"
                                ],
                                "script": {
                                    "asm": "304402206665264973f45cb028de882d0cdcae3468ee337efbdb96ceb5986257c7131e060220182cd611c6bb02b052db099ca13ee519676e77163bcbb4343502e1ce48098b18[ALL] 030fe9d8d0e15d432d1ae9b3c52f4cb6e37e3c7a41af0139783da09eab85a182dc",
                                    "hex": "47304402206665264973f45cb028de882d0cdcae3468ee337efbdb96ceb5986257c7131e060220182cd611c6bb02b052db099ca13ee519676e77163bcbb4343502e1ce48098b180121030fe9d8d0e15d432d1ae9b3c52f4cb6e37e3c7a41af0139783da09eab85a182dc"
                                },
                                "votype": "pubkeyhash"
                            }
                        ],
                        "txouts": [
                            {
                                "amount": "0.000015",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "LYKFXztrcBxS4b1ZHhhbxKqgr6hKxCUq1Y"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 8f9a22119b712a73e7cb7acb6b9390550cc7ccdf OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a9148f9a22119b712a73e7cb7acb6b9390550cc7ccdf88ac",
                                    "reqsigs": 1
                                }
                            }
                        ]
                    },
                    ...
                    {
                        "txid": "4e5474e8dcfa551979cc25c799554d1a122ea6789cf8c51c1696b59c80e74c13",
                        "hash": "4e5474e8dcfa551979cc25c799554d1a122ea6789cf8c51c1696b59c80e74c13",
                        "index": 70,
                        "version": 1,
                        "size": 226,
                        "vsize": 226,
                        "locktime": 0,
                        "datetime": "2018-08-17 20:52:27 UTC",
                        "time": "2018-08-17 20:52:27 UTC",
                        "blockhash": "eb75cbb20bbbd3d50ad7d4d85186786529743c1c1e992aedf7aa2de6743956ae",
                        "blockheight": 1475812,
                        "blocktime": "2018-08-17 20:52:27 UTC",
                        "timestamp": 1534539147,
                        "txins": [
                            {
                                "txout": "c78934608285ea5a34c81976935e8ac42e3a796c9e3300dcb4e68fd85534dcb2",
                                "vout": 0,
                                "amount": "0.06473467",
                                "addresses": [
                                    "LgewCPgecebZpuuFSBNEmnP31xoUawZzyc"
                                ],
                                "script": {
                                    "asm": "3045022100b74be1f2402c7ddcf85a293ce341115a8b0b5a0632a984efaef3a19e7fd892b30220541be5fbb65c51f6734610f17ca49606b1c1b391453fdf83d800ecc0326902f4[ALL] 039889073fc7c8a291788e2b3ead50f68b52636305aa1df4dbc6fddceaf7b95503",
                                    "hex": "483045022100b74be1f2402c7ddcf85a293ce341115a8b0b5a0632a984efaef3a19e7fd892b30220541be5fbb65c51f6734610f17ca49606b1c1b391453fdf83d800ecc0326902f40121039889073fc7c8a291788e2b3ead50f68b52636305aa1df4dbc6fddceaf7b95503"
                                },
                                "votype": "pubkeyhash"
                            }
                        ],
                        "txouts": [
                            {
                                "amount": "0.000017",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "LUWPbpM43E2p7ZSh8cyTBEkvpHmr3cB8Ez"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 65d4f0444069f3881221e24bb6a99b1d53e008cf OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a91465d4f0444069f3881221e24bb6a99b1d53e008cf88ac",
                                    "reqsigs": 1
                                }
                            },
                            {
                                "amount": "0.06449619",
                                "type": "pubkeyhash",
                                "spent": true,
                                "addresses": [
                                    "LgewCPgecebZpuuFSBNEmnP31xoUawZzyc"
                                ],
                                "script": {
                                    "asm": "OP_DUP OP_HASH160 eb142697a47dc0be96ec7e01a7a24494232649f5 OP_EQUALVERIFY OP_CHECKSIG",
                                    "hex": "76a914eb142697a47dc0be96ec7e01a7a24494232649f588ac",
                                    "reqsigs": 1
                                }
                            }
                        ]
                    }
                ]
            }
        ],
        "meta": {
            "totalCount": 1,
            "index": 0,
            "limit": 100,
            "results": 1
        }
    }
    
    Info

    Get Pub Addresses Endpoint allows you to get transactions associated with the specified extended public key. Supported BIP formats are: bip39, and bip44. Since addresses are hierarchically ordered we provide the query params index and limit, in order to be able to get the addresses and their transactions in specific positions. Default values are: 0 and 100, accordingly. The default values will return the transactions for the first one hundred receive addresses. If you want to get the change addresses of the extended public key you should set type to be equal to "change" as a query parameter. If the transactions you are looking for are transactions from scrpit addresses(e.g. Coinomi, Ledger), then set script to true as a query parameter.

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

    HTTP Request

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. mainnet or testnet)
    index 0 starting point (integer)
    limit 100 result count (integer)
    type receive address type (string)
    Import Address as a Wallet

    Sample Data

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

    Response Body

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

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

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

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

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

    Transactions

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

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

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

    Get Basic Transaction Details By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067",
      "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/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067');
    $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/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/basic/txid/8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067")
    }
    

    Response Body

    {
        "payload": {
            "amount": 952623,
            "fee": 1648,
            "unit": "satoshis",
            "datetime": "2020-03-04 11:25:57 UTC",
            "timestamp": 1583321157,
            "confirmations": 9,
            "sent": {
                "2N2QvYKC9EShfRvo1YP9A7cZhRSNcQTxWfH": 954271
            },
            "received": {
                "2N7kT5pwbxUbUiY5Lvz9WowYrXkzeFNchQL": 13650,
                "2N2QvYKC9EShfRvo1YP9A7cZhRSNcQTxWfH": 938973
            }
        }
    }
    
    Info

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

    HTTP Request

    GET /v1/bc/ltc/${NETWORK}/txs/basic/txid/${TXID}

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

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

    8882b4420afae95a49f429950db73467d4f1fe99fcf97c689fd7818d6e0ae067

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

    Get Transaction Details By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e",
      "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();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e');
    $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/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/txid/924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e")
    }
    

    Response Body

    {
      "payload": {
          "txid": "924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e",
          "hash": "924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e",
          "index": 6,
          "version": 1,
          "size": 373,
          "vsize": 373,
          "locktime": 0,
          "time": "2019-03-10 17:13:29 UTC", //deprecated
          "datetime": "2019-03-10 17:13:29 UTC",
          "blockhash": "b543f8ee258538af9dc73b9f2f1f05dc7842cd43f7ca37d17b0f9a0f3016490f",
          "blockheight": 1593758,
          "blocktime": "2019-03-10 17:13:29 UTC",
          "timestamp": 1552238009,
          "confirmations": 3,
          "txins": [
              {
                  "txout": "4527642278a1052eb61ffae3464e56011673bc46d7c57c946fba6126990f0981",
                  "vout": 1,
                  "amount": "0.05335574",
                  "addresses": [
                      "LhbzreXdSQyz8v6HesYKDocwyemyVNrrif"
                  ],
                  "script": {
                      "asm": "30450221009c4c5c9f5bb4a65013df14322a6060252347755ecf90c037fafca5aa07ad62cc02201329465bfc38bc6aa8e2ae274a87c7ccedd1f2d3d03d23c5e8d0654fd81d23d4[ALL] 0369c64d97702550b6ae7423da95028b8c089da5b4de8d520dfb204ea187e9efc9",
                      "hex": "4830450221009c4c5c9f5bb4a65013df14322a6060252347755ecf90c037fafca5aa07ad62cc02201329465bfc38bc6aa8e2ae274a87c7ccedd1f2d3d03d23c5e8d0654fd81d23d401210369c64d97702550b6ae7423da95028b8c089da5b4de8d520dfb204ea187e9efc9"
                  },
                  "votype": "pubkeyhash"
              },
              {
                  "txout": "e20befecf6b76025ec36c12ff20b7bed2a386408549bb876aa8ba7d4d6f0cb91",
                  "vout": 0,
                  "amount": "0.559508",
                  "addresses": [
                      "LhbzreXdSQyz8v6HesYKDocwyemyVNrrif"
                  ],
                  "script": {
                      "asm": "304402204790c9cdde8c704fefb9a0e3c57199c1853f3bfb10c7dc35c21601cf061436ab022014d22c12c60897899c0c421d67c56620118fc0be0acf7cf1b30eb859b340a00e[ALL] 0369c64d97702550b6ae7423da95028b8c089da5b4de8d520dfb204ea187e9efc9",
                      "hex": "47304402204790c9cdde8c704fefb9a0e3c57199c1853f3bfb10c7dc35c21601cf061436ab022014d22c12c60897899c0c421d67c56620118fc0be0acf7cf1b30eb859b340a00e01210369c64d97702550b6ae7423da95028b8c089da5b4de8d520dfb204ea187e9efc9"
                  },
                  "votype": "pubkeyhash"
              }
          ],
          "txouts": [
              {
                  "amount": "0.25",
                  "type": "pubkeyhash",
                  "spent": true,
                  "addresses": [
                      "LfdMJ6cbKj5fCysPpTvLAGyM2Pd5Xw63Tw"
                  ],
                  "script": {
                      "asm": "OP_DUP OP_HASH160 dfcf4f31cbac4f7699c0da44446f6745567c631b OP_EQUALVERIFY OP_CHECKSIG",
                      "hex": "76a914dfcf4f31cbac4f7699c0da44446f6745567c631b88ac",
                      "reqsigs": 1
                  }
              },
              {
                  "amount": "0.36186374",
                  "type": "pubkeyhash",
                  "spent": true,
                  "addresses": [
                      "LhbzreXdSQyz8v6HesYKDocwyemyVNrrif"
                  ],
                  "script": {
                      "asm": "OP_DUP OP_HASH160 f57e1561697feac9a3d03ffdf366b694c97771f4 OP_EQUALVERIFY OP_CHECKSIG",
                      "hex": "76a914f57e1561697feac9a3d03ffdf366b694c97771f488ac",
                      "reqsigs": 1
                  }
              }
          ]
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    924e34052a093da9c9bb74ff1802034be5c98df811333a5da31437116ab81b5e

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

    Get Transactions By Block Number

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f",
      "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();
    
    
    
    &lt;?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f');
    $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/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/mainnet/txs/block/08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f")
    }
    
    

    Response Body

    {
      "payload": [
              {
                  "txid": "9fe6b924349a28d127292411800e6cd4cf17f7ae41ce89bcf7c14d66da82aa18",
                  "hash": "1104b374be4efc6234caf30f0866746d8193a9bf6f8c3ff5cc157c4904556c70",
                  "index": 0,
                  "version": 2,
                  "size": 234,
                  "vsize": 207,
                  "locktime": 0,
                  "time": "2019-03-10 02:05:20 UTC",
                  "blockhash": "08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f",
                  "blockheight": 1593401,
                  "blocktime": "2019-03-10 02:05:20 UTC",
                  "timestamp": 1552183520,
                  "confirmations": 115,
                  "txins": [
                      {
                          "coinbase": "0339501804e270845c2ffabe6d6d3b7b8544e5f8f94b20451723631c5a4c673ae4ca5cef4387bdc392ba5b4765f701000000000000002d59f10d000000f80b000000",
                          "addresses": []
                      }
                  ],
                  "txouts": [
                      {
                          "amount": "25.00680596",
                          "type": "pubkeyhash",
                          "spent": true,
                          "addresses": [
                              "LZo1qx6S5JEVh43KahTFBdvnkVFeQCz9Ze"
                          ],
                          "script": {
                              "asm": "OP_DUP OP_HASH160 9fd27a40d07821d04e608402f6ed526279d35408 OP_EQUALVERIFY OP_CHECKSIG",
                              "hex": "76a9149fd27a40d07821d04e608402f6ed526279d3540888ac",
                              "reqsigs": 1
                          }
                      },
                      {
                          "amount": "0",
                          "type": "nulldata",
                          "spent": true,
                          "addresses": [],
                          "script": {
                              "asm": "OP_RETURN aa21a9ed10a0ff719e35ec6e52a29bed3fc5b66e1a48e9f081423a2a5f22504d16fe2348",
                              "hex": "6a24aa21a9ed10a0ff719e35ec6e52a29bed3fc5b66e1a48e9f081423a2a5f22504d16fe2348"
                          }
                      }
                  ]
              },
              ...,
              {
                  "txid": "af85a00662bb3ed6296f1a7127d08e122e437ddd1e897fd440fa5e64da3268fb",
                  "hash": "ddde54c008ec12c134abd5a2a29bd338634fe2cfaab4986cffe76182cbfddfc1",
                  "index": 11,
                  "version": 1,
                  "size": 248,
                  "vsize": 167,
                  "locktime": 0,
                  "time": "2019-03-10 02:05:20 UTC",
                  "blockhash": "08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f",
                  "blockheight": 1593401,
                  "blocktime": "2019-03-10 02:05:20 UTC",
                  "timestamp": 1552183520,
                  "confirmations": 115,
                  "txins": [
                      {
                          "txout": "2178c55f9dde151201551b703f33afcb5c248368face61aa0f28ede6dc376d62",
                          "vout": 69,
                          "amount": "0.015652",
                          "addresses": [
                              "MRHffHoonHYFfQtaw5MuamfMHpvsZYgdt2"
                          ],
                          "script": {
                              "asm": "00149894eea250f34ef5baa580d20c13749a438d7d25",
                              "hex": "1600149894eea250f34ef5baa580d20c13749a438d7d25"
                          },
                          "votype": "scripthash"
                      }
                  ],
                  "txouts": [
                      {
                          "amount": "0.00001441",
                          "type": "witness_v0_keyhash",
                          "spent": false,
                          "addresses": [
                              "ltc1q875uhqaqys8dtxwytluyv80garxp8mkh4wh2tv"
                          ],
                          "script": {
                              "asm": "0 3fa9cb83a0240ed599c45ff8461de8e8cc13eed7",
                              "hex": "00143fa9cb83a0240ed599c45ff8461de8e8cc13eed7",
                              "reqsigs": 1
                          }
                      },
                      {
                          "amount": "0.01563258",
                          "type": "pubkeyhash",
                          "spent": false,
                          "addresses": [
                              "Lb4GSbQLTWA1zwy2jG4pSDs37ejcjucEjA"
                          ],
                          "script": {
                              "asm": "OP_DUP OP_HASH160 adad072932c5231ea1bfb3df7286b6e1c19e431f OP_EQUALVERIFY OP_CHECKSIG",
                              "hex": "76a914adad072932c5231ea1bfb3df7286b6e1c19e431f88ac",
                              "reqsigs": 1
                          }
                      }
                  ]
              }
      ],
      "meta": {
          "totalCount": 12,
          "index": 0,
          "limit": 50,
          "results": 12
      }
    }
    
    Info

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

    HTTP Request

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

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

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

    08362fd156d3076ac883cca5715b25dbd5576730de0863cf0cce50602d8dae0f

    or

    1593401

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

    Get Unconfirmed Transactions

    Sample Data

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

    Response Body

    {
        "payload": [
                    {
                    "txid": "8d01781762eecf45d02bf124e5cd0be981d668a11ac0cf1b0c9fc5d3fee126b9",
                    "hash": "8d01781762eecf45d02bf124e5cd0be981d668a11ac0cf1b0c9fc5d3fee126b9",
                    "version": 1,
                    "size": 220,
                    "vsize": 220,
                    "locktime": 0,
                    "time": "2019-03-14 15:29:25 UTC", //deprecated
                    "datetime": "2019-03-14 15:29:25 UTC",
                    "timestamp": 1552577365,
                    "txins": [
                        {
                            "txout": "7e8ba2eedff99b4039337e3be11892188b5cfcef7c7475fbd609bbe9328e4651",
                            "vout": 1,
                            "amount": "5.593",
                            "addresses": [
                                "Laj4SBJGpbpBooJ4bQGMJ4QNsJJw3eFpUW"
                            ],
                            "script": {
                                "asm": "3044022073af5b5e673fddcb18f33a5fabf7c38bac07278a16fdb5ec2446ac55258d965b02202659e46cab619ad0807bb0367cee728697963e71296ce8f00308850466ad43f9[ALL] 03e921be40ff571db7a2f50a9045ada08ab99eb8525b7daf3b7261017dd329bd35",
                                "hex": "473044022073af5b5e673fddcb18f33a5fabf7c38bac07278a16fdb5ec2446ac55258d965b02202659e46cab619ad0807bb0367cee728697963e71296ce8f00308850466ad43f9012103e921be40ff571db7a2f50a9045ada08ab99eb8525b7daf3b7261017dd329bd35"
                            },
                            "votype": "pubkeyhash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "4.59299336",
                            "type": "witness_v0_keyhash",
                            "spent": false,
                            "addresses": [
                                "ltc1qzw6m4p309j68fc2yzd78cgxcgj7xey52tkanrl"
                            ],
                            "script": {
                                "asm": "0 13b5ba862f2cb474e144137c7c20d844bc6c928a",
                                "hex": "001413b5ba862f2cb474e144137c7c20d844bc6c928a",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "1",
                            "type": "scripthash",
                            "spent": false,
                            "addresses": [
                                "MX2bBY34c44YXQWkhBhAsRiFsRvGJaVTDg"
                            ],
                            "script": {
                                "asm": "OP_HASH160 fdb2a1ce38d1a3a9697a86c7d3e169a032e93dcd OP_EQUAL",
                                "hex": "a914fdb2a1ce38d1a3a9697a86c7d3e169a032e93dcd87",
                                "reqsigs": 1
                            }
                        }
                    ]
                },
                {
                    "txid": "f58dde2fa97075de737db537fb30cac5f19efd52ebe915c0e1f079a2a4d4b3c6",
                    "hash": "c8ca02f64697b270c16052daf2dc4de178df864c4a81cdc7c2aaeb88975e65af",
                    "version": 2,
                    "size": 249,
                    "vsize": 168,
                    "locktime": 1596065,
                    "time": "2019-03-14 15:29:19 UTC", //deprecated
                    "datetime": "2019-03-14 15:29:19 UTC",
                    "timestamp": 1552577359,
                    "txins": [
                        {
                            "txout": "8879e54d2b4e52503fb8110310a90c657424774b0642e7ac813d91d82755ed49",
                            "vout": 1,
                            "amount": "5.48938369",
                            "addresses": [
                                "MFdU5uzPBrYFPKsaf3gEa3FXMcUtS3Z9MJ"
                            ],
                            "script": {
                                "asm": "0014c7e7394e0a510576755b8e95a836bed944407bdc",
                                "hex": "160014c7e7394e0a510576755b8e95a836bed944407bdc"
                            },
                            "votype": "scripthash"
                        }
                    ],
                    "txouts": [
                        {
                            "amount": "0.2334267",
                            "type": "pubkeyhash",
                            "spent": false,
                            "addresses": [
                                "LaixFTPEw7vNRunN1mx83fan9Czhcx8tD8"
                            ],
                            "script": {
                                "asm": "OP_DUP OP_HASH160 aa05f051dbe9d728e4eaea3aab5dce9936773201 OP_EQUALVERIFY OP_CHECKSIG",
                                "hex": "76a914aa05f051dbe9d728e4eaea3aab5dce993677320188ac",
                                "reqsigs": 1
                            }
                        },
                        {
                            "amount": "5.25578899",
                            "type": "scripthash",
                            "spent": false,
                            "addresses": [
                                "MXChmqnzH7vZSeCH3x67pugz5CAoLayofw"
                            ],
                            "script": {
                                "asm": "OP_HASH160 ff9c4b4158e424ccd2760c11cc1e048f7633069f OP_EQUAL",
                                "hex": "a914ff9c4b4158e424ccd2760c11cc1e048f7633069f87",
                                "reqsigs": 1
                            }
                        }
                    ]
                },
                ...
        ],
        "meta": {
            "totalCount": 7,
            "index": 0,
            "limit": 50,
            "results": 7
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    Decode Raw Transactions

    Sample Data

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

    Response Body

    {
      "payload": {
          "txid": "81967594db2a5a7766fbfa9f32d641c670c89f8149ddd9b78ab2b74cee478d8a",
          "hash": "81967594db2a5a7766fbfa9f32d641c670c89f8149ddd9b78ab2b74cee478d8a",
          "size": 486,
          "vsize": 486,
          "version": 1,
          "locktime": 1593192,
          "blockhash": "e451edc8dfdebc1db09534311693dd3093418ce49605bacdb0fded1d82c1e607",
          "blockNumber": 1593193,
          "confirmations": 78,
          "time": "2019-03-09 17:42:21 UTC",
          "vin": [
              {
                  "txid": "1b0dc670a458c023dfc4ed687d219d2391cdad8fa574c28ceffc8e410e1ffc40",
                  "sequence": 4294967293,
                  "vout": 1,
                  "scriptSig": {
                      "asm": "3045022100b8e7b4fb9fc24176265557c817215b60285bd34b3e2d4946a3a157fdbaa44aa502201520a32c4b875b182b36320c6dd60093077f09178deabe80b6e21d5af14a9ef3[ALL] 0335345eb3d44ed0f7f6e138d76914676aa607e138ad8591937f687888ae389725",
                      "hex": "483045022100b8e7b4fb9fc24176265557c817215b60285bd34b3e2d4946a3a157fdbaa44aa502201520a32c4b875b182b36320c6dd60093077f09178deabe80b6e21d5af14a9ef301210335345eb3d44ed0f7f6e138d76914676aa607e138ad8591937f687888ae389725"
                  },
                  "addresses": [
                      "LZiVm3BqBwTozwDT28bTb3x2GzhjTFa7UC"
                  ],
                  "value": "22.619"
              },
              {
                  "txid": "355f8df9e6beddedd06e4f2108164373215fa8d44d0a00bc9df788632ad6246d",
                  "sequence": 4294967293,
                  "vout": 1,
                  "scriptSig": {
                      "asm": "304402205b64f8cd27bab62f3a3bc0927ebca0414ae246d791abc1f9f87666044307d2c302203ca9956ec71776b2d2a1d1373b7ded2a0ad3fb9b1eb0754a823094d839cd0543[ALL] 02ff2a3c891af0351430fff638abbac9371bd9d832e103611da30f561d88edff3b",
                      "hex": "47304402205b64f8cd27bab62f3a3bc0927ebca0414ae246d791abc1f9f87666044307d2c302203ca9956ec71776b2d2a1d1373b7ded2a0ad3fb9b1eb0754a823094d839cd0543012102ff2a3c891af0351430fff638abbac9371bd9d832e103611da30f561d88edff3b"
                  },
                  "addresses": [
                      "LNAbRs47dknVewqHL8QjoLK4EAxtMx6bLr"
                  ],
                  "value": "28.79"
              },
              {
                  "txid": "7dc174405b9003d1f1d2a2925a190f80b25baf3c12c789fbbec21cb7b6654d1b",
                  "sequence": 4294967293,
                  "vout": 1,
                  "scriptSig": {
                      "asm": "3044022042feb715ddc79571fdc215bc7317c1445081e3063b5e71326bf5bc4277b329f30220447a6cc7bb0b221e5fa3dfb67b7e918ec48370fdb7ca17182acb138767c8e2c2[ALL] 021eeda6ca2673635dcaafd2c99575e3f0219c0d1a888c76d0867eac51a59d4cc8",
                      "hex": "473044022042feb715ddc79571fdc215bc7317c1445081e3063b5e71326bf5bc4277b329f30220447a6cc7bb0b221e5fa3dfb67b7e918ec48370fdb7ca17182acb138767c8e2c20121021eeda6ca2673635dcaafd2c99575e3f0219c0d1a888c76d0867eac51a59d4cc8"
                  },
                  "addresses": [
                      "LVpGKvaV6SBygFGtdrD3HKJr78rZ1g5fr4"
                  ],
                  "value": "28.375"
              }
          ],
          "vout": [
              {
                  "value": "79.77912",
                  "n": 0,
                  "scriptPubKey": {
                      "asm": "OP_DUP OP_HASH160 702088f8d9e8d449c9ccfe1bfe334a9f05554675 OP_EQUALVERIFY OP_CHECKSIG",
                      "hex": "76a914702088f8d9e8d449c9ccfe1bfe334a9f0555467588ac",
                      "reqSigs": 1,
                      "type": "pubkeyhash",
                      "addresses": [
                          "LVSpvGmi9gZcqQbqiw77txYpKVnZq8iJdf"
                      ]
                  }
              }
          ],
          "vin_sz": 3,
          "vout_sz": 1
      }
    }
    
    Info

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

    HTTP Request

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

    Request Object

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

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

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

    010000000340fc1f0e418efcef8cc274a58fadcd91239d217d68edc4df23c058a470c60d1b010000006b483045022100b8e7b4fb9fc24176265557c817215b60285bd34b3e2d4946a3a157fdbaa44aa502201520a32c4b875b182b36320c6dd60093077f09178deabe80b6e21d5af14a9ef301210335345eb3d44ed0f7f6e138d76914676aa607e138ad8591937f687888ae389725fdffffff6d24d62a6388f79dbc000a4dd4a85f2173431608214f6ed0edddbee6f98d5f35010000006a47304402205b64f8cd27bab62f3a3bc0927ebca0414ae246d791abc1f9f87666044307d2c302203ca9956ec71776b2d2a1d1373b7ded2a0ad3fb9b1eb0754a823094d839cd0543012102ff2a3c891af0351430fff638abbac9371bd9d832e103611da30f561d88edff3bfdffffff1b4d65b6b71cc2befb89c7123caf5bb2800f195a92a2d2f1d103905b4074c17d010000006a473044022042feb715ddc79571fdc215bc7317c1445081e3063b5e71326bf5bc4277b329f30220447a6cc7bb0b221e5fa3dfb67b7e918ec48370fdb7ca17182acb138767c8e2c20121021eeda6ca2673635dcaafd2c99575e3f0219c0d1a888c76d0867eac51a59d4cc8fdffffff01c04685db010000001976a914702088f8d9e8d449c9ccfe1bfe334a9f0555467588ac684f1800

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

    Creating Transactions
    Info

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

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

    New Transaction Endpoint

    Sample Data

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

    Response Body

    {
      "payload": {
          "hex": "0200000001c23eb3952f521c15a429ece05b815464dff5f47b5e9d56c53049a314dad0224f0000000000ffffffff022060cd07000000001976a9141eea2f620c6ab7d6f1b9c18aa42b1f0cef46eddb88ac7be8130a000000001976a914ccb83dc9e4acdf15fc16d5c5af6a09d988baef3088ac00000000"
      }
    }
    

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

    HTTP Request

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

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

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

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

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

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

    Validating the Data to Sign

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

    Sign Transactions

    Sample Data

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

    Response Body

    {
        "payload": {
            "hex": "020000000393d3ba1a02fd978b494e79ed199247079eb4f766fadc0b807c0734d4b18bd981000000006a47304402202769801183cd50eb2bd6c316a55add49fa4c0fd7216b523f394b97fe410b582d02205c76f4009b38b82a20f88b5f6af45f09220ba43d7e1c2064fa74807ddb299d7f012102275753690ab58df3c923001e94d407e30b03e60b1f2461729a1dd4f37ebe2469ffffffff7dbd03383a240f27c7735af707e823da894e11732c5fe5919adff1672b817be0010000006a47304402204a24a1de4b4e552d1f53121825d139b1d1739d149df5a01d2ead760b865635c2022047a9b8f4d29dac29e9eacff6aea67249dcf716d576a00dbe24cf92c34a272909012102275753690ab58df3c923001e94d407e30b03e60b1f2461729a1dd4f37ebe2469ffffffff7dbd03383a240f27c7735af707e823da894e11732c5fe5919adff1672b817be0020000006a473044022057a3fa58744fffebcb8a1bea4a99bd61049678d4ee9250c5f66ea17198ebd97a022078abef9098838d06e9a51099ce010f0dc74c6b1284de03a929bcdabab8fd4cd40121039299b5f32a4834e27662397b7ade9cacdd9cd7243b83c039c22da3c6dc0b28c7ffffffff0320bf0200000000001976a9147b9a627a184897f10d31d73d87c2eea191d8f50188ac08c60000000000001976a9148bafc8dad0c87025278b4cc1c80ac8d402cb59eb88ac0c8c0000000000001976a914481e003d23566c1789dc9362085c3a0876570c7c88ac00000000",
            "complete": true
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    Send Transactions

    Sample Data

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

    Response Body

    {
      "payload": {
          "txid": "3678972ab768b8158fcde1e48294e95d9c616d9947cd685e8d0aeb871693e52f"
      }
    }
    

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

    HTTP Request

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

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

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

    New Transaction

    Sample Data

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

    Response Body

    {
      "payload": {
          "txid":"81967594db2a5a7766fbfa9f32d641c670c89f8149ddd9b78ab2b74cee478d8a"
      }
    }
    

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

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

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

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

    HTTP Request

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

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

    Sample Data

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

    Response Body

    {
        "payload": {
            "txid": "69269de3f6016550b973e20ee93d5446c6abb0e8710f2f26a491a7d6c73b1fa7"
        }
    }
    

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

    Two optional fields are available:

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

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

    HTTP Request

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

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

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

    The complete JSON object request:

    {
        "walletName*": "walletName",
        "password*" : "passowrd",
        "inputs":[{
            "address":"n...",
            "value":0.1
        },{
            "address":"n...",
            "value":0.3
        }],
        "outputs*": [{
            "address": "m...",
            "value": 0.4
        }],
    
        "fee":  {
            "address": "n...",
            "value*": 0.0002314
        },
        "locktime": 0,
      "data": "CRYPTOAPISROCKS"
    }
    
    Get Transactions Fee

    Sample Data

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

    Response Body

    {
        "payload": {
            "min": "0.0000011",
            "max": "0.1",
            "average": "0.00043943",
            "min_fee_per_byte": "0.00000001",
            "average_fee_per_byte": "0.00000103",
            "max_fee_per_byte": "0.000059",
            "average_bytes": "425", // deprecated
            "recommended": "0.00037209", // deprecated
            "unit": "ltc"
        }
    }
    
    Info

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

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

    All fees are in ltc!

    HTTP Request

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

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

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

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

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

    Sample Data

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

    Response Body

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

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

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

    Sample Data

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

    Response Body

    {
      "payload": {
          "txid":"229e32935ea11e3d143c2af64256b3d4d2786dbd3d0497398157be3119fc2ecc"
      }
    }
    

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

    HTTP Request

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

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

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

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

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

    Sample Data

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

    Response Body

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

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

    Query Parameters
    Parameter Default Description
    NETWORK ------- Network name (e.g. testnet or mainnet)
    Get Raw Transaction Hex By Transaction ID (Txid)

    Sample Data

    
    curl -X GET 'https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875' \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875 HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    
    
    $.ajaxSetup({
      headers:{
        "Content-Type": "application/json" ,
        "X-API-Key": "my-api-key"
      }
    });
    
    $.get('https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875').then(function(d) {console.log(d)});
    
    
    
    const https = require('https');
    
    var options = {
      "method": "GET",
      "hostname": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875",
      "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/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875');
    $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/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["Content-Type"] = 'application/json'
    request["X-API-Key"] = 'my-api-key'
    response = http.request(request)
    puts response.read_body
    
    
    
    import requests
    url = 'https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875'
    headers = {
      "Content-Type": "application/json",
      "X-API-Key": "my-api-key"
    }
    response = requests.get(url, headers=headers)
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    
    
    import (
      "gopkg.in/resty.v0"
    )
    
    func main()
    {
        resp, err := resty.R().
          SetHeader("Content-Type", "application/json").
          SetHeader("X-API-Key", "my-api-key").
          Get("https://api.cryptoapis.io/v1/bc/ltc/testnet/txs/raw/txid/3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875")
    }
    

    Response Body

    {
        "payload": {
            "hex": "0200000001c27b2fc0b6b9e99fa779f2c9b9aa2ddd59c6d3d809d692c618f673920a81c2c7000000006a47304402206f9bf76f48d3644472e307e399a064f90cd85a52ea3d3600fbee40d56e4dc58d02205c09663d7623bc790d2513bfbfd7405f86a765b03a061912ce7367b3ac14f384012103348f790df366425b70fe56f1c6f5120db5f8cbb0846342ade6784b187aedaeafffffffff0204000000000000001976a914ccb83dc9e4acdf15fc16d5c5af6a09d988baef3088ac60d02800000000001976a914c06fa3357499eb2d7b7f0b01824b5847727e02d288ac00000000"
        }
    }
    
    Info

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

    HTTP Request

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

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

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

    3b491daa63d3aebb775020fb704b34366378b7422b1a916f6f06cd7fac946875

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

    Payment Forwarding

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

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

    Create Payment

    Sample Data

    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/ltc/testnet/payments \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "wallet": "demohdwallet",
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "password": "SECRET123456",
        "confirmations": 2,
        "fee": 0.00022827
    }'
    
    curl -X POST \
      https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key' \
      -d '{
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "wif": "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs",
        "confirmations": 2,
        "fee": 0.00022827
    }'
    
    
    
    POST /v1/bc/ltc/testnet/payments HTTP/1.1
    Host: api.cryptoapis.io
    Content-Type: application/json
    X-API-Key: my-api-key
    
    {
        "wallet": "demohdwallet",
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "password" : "SECRET123456",
        "confirmations": 2,
        "fee": 0.00022827
    }
    
    POST /v1/bc/ltc/testnet/payments/wif 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": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "wif" : "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs",
        "confirmations": 2,
        "fee": 0.00022827
    }
    
    
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/ltc/testnet/payments",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n    \"wallet\": \"demohdwallet\",\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"password\" : \"SECRET123456\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif",
      "method": "POST",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Key": "my-api-key"
      },
      "processData": false,
      "data": "{\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"wif\" : \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "https://api.cryptoapis.io/v1/bc/ltc/testnet/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.write(JSON.stringify({ wallet: 'demohdwallet',
      callback: 'http://myaddress.com/paymet_forwarding_hook',
      from: 'mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX',
      to: 'mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H',
      password: 'SECRET123456',
      confirmations: 2,
      fee: 0.00022827 }));
    req.end();
    
    var http = require("http");
    
    var options = {
      "method": "POST",
      "hostname": "api.cryptoapis.io",
      "path": "https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif",
      "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({ 
      callback: 'http://myaddress.com/paymet_forwarding_hook',
      from: 'my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE',
      to: 'mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H',
      wif: 'cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs',
      confirmations: 2,
      fee: 0.00022827 }));
    req.end();
    
    
    
    &lt?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/testnet/payments');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "wallet": "demohdwallet",
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "password" : "SECRET123456",
        "confirmations": 2,
        "fee": 0.00022827
    }
    ');
    
    try {
      $response = $request->send();
    
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    &lt?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif');
    $request->setMethod(HTTP_METH_POST);
    
    $request->setHeaders(array(
      'Content-Type' => 'application/json',
      'X-API-Key' => 'my-api-key'
    ));
    
    $request->setBody('{
        "wallet": "demohdwallet",
        "callback": "http://myaddress.com/paymet_forwarding_hook",
        "from": "my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE",
        "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
        "wif" : "cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs",
        "confirmations": 2,
        "fee": 0.00022827
    }
    ');
    
    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/ltc/testnet/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    \"wallet\": \"demohdwallet\",\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"password\" : \"SECRET123456\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    
    response = http.request(request)
    puts response.read_body
    
    require 'uri'
    require 'net/http'
    
    url = URI("https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif")
    
    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\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"wif\" : \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    
    response = http.request(request)
    puts response.read_body
    
    
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n    \"wallet\": \"demohdwallet\",\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"password\" : \"SECRET123456\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    
    headers = {
        'Content-Type': "application/json",
        'X-API-Key': 'my-api-key'
        }
    
    conn.request("POST", "/v1/bc/ltc/testnet/payments", payload, headers)
    
    res = conn.getresponse()
    data = res.read()
    
    print(data.decode("utf-8"))
    
    import http.client
    
    conn = http.client.HTTPConnection("https://api.cryptoapis.io")
    
    payload = "{\n     \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"wif\" : \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n"
    
    headers = {
        'Content-Type': "application/json",
        'X-API-Key': 'my-api-key'
        }
    
    conn.request("POST", "/v1/bc/ltc/testnet/payments/wif", 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    \"wallet\": \"demohdwallet\",\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"password\" : \"SECRET123456\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/testnet/payments")
      .post(body)
      .addHeader("Content-Type", "application/json")
      .addHeader("X-API-Key", "my-api-key")
      .build();
    
    Response response = client.newCall(request).execute();
    
    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\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"wif\" : \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\n}\n");
    Request request = new Request.Builder()
      .url("https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif")
      .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/ltc/testnet/payments"
    
          payload := strings.NewReader("{\n    \"wallet\": \"demohdwallet\",\n    \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"password\" : \"SECRET123456\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\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))
    
    }
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.cryptoapis.io/v1/bc/ltc/testnet/payments/wif"
    
          payload := strings.NewReader("{\n     \"callback\": \"http://myaddress.com/paymet_forwarding_hook\",\n    \"from\": \"my4TmbbhJCLJB9q1eHUHQWJfbbJoYdLwtE\",\n    \"to\": \"mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H\",\n    \"wif\" : \"cSKbuySxbKm4uQK9SQQRjpsZfENNBrFxKm3rmoMER9ua6XR79Shs\",\n    \"confirmations\": 2,\n \"fee\": 0.00022827\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": {
          "from": "mnJguqCdvU9VeF9L2NaEFKHsL6aoEB22RX",
          "to": "mzBQrW3t9XKx9x1Wh7mkxagVo3Kc6U7Z2H",
          "callback": "http://myaddress.com/paymet_forwarding_hook",
          "wallet": "demohdwallet",
          "uuid": "8930fdf4-5664-49c4-a51e-15c5edf5eb8f",
          "confirmations": 2,
          "fee": "0.00022827"
      }
    }
    
    Info

    In order to create a payment forwarding with address from HD Wallet you need to include the following data (POST request):
    - wallet - from - to - callback (url) - wallet password - confirmations - fee (optional)

    In order to create a payment forwarding with address and wif you need to include the following data (POST request):
    - from - to - callback (url) - from address wif - confirmations - fee (optional)

    If field fee is not set, the payment forwarding will be executed with the recommended fee from the Transactions Fee Endpoint.

    When payment forwarding is triggered you will receive a notification on the callback(url) you've specified when the payment forwarding was created.

    HTTP Request

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

    Request Object

    {
    "from": "${FROM_ADDRESS}",
    "to": "${TO_ADDRESS}",
    "callback": "${CALLBACK_URL}",
    "wallet": ${HD_WALLET_NAME},
    "password": ${WALLET_PASSWORD}
    "confirmations": ${CONFIRMATIONS}
    "fee": ${FEE}
    }

    HTTP Request

    POST /v1/bc/btc/${NETWORK}/payments/wif

    Request Object

    {
    "from": "${FROM_ADDRESS}",
    "to": "${TO_ADDRESS}",
    "callback": "${CALLBACK_URL}",
    "wif": ${FROM_ADDRESS_WIF}
    "confirmations": ${CONFIRMATIONS}
    "fee": ${FEE}
    }

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

    {
        "currency": "LTC",
        "network": "testnet",
        "type": "PAYMENT_FORWARDING",
        "uuid": "8930fdf4-5664-49c4-a51e-15c5edf5eb8f",
        "txid": "cb998347582f7b461adc07ba6499ac81b549a072e9d1aa5f298ecb58df6c50a5",
        "url" : "http://myaddress.com/paymet_forwarding_hook",
        "status": "DONE",
        "message": "Payment forwarding was successful!"
    }
    

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

    For some reasons the payment forwarding may fail.

    {
      "payload": {
          "currency": "LTC",
          "network": "testnet",
          "uuid": "8930fdf4-5664-49c4-a51e-15c5edf5eb8f",
          "type": "PAYMENT_FORWARDING",
          "url" : "http://myaddress.com/paymet_forwarding_hook",
          "status": "FAILED",
      }
    }
    

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

    Payments might be pending:

    {
      "payload": {
          "currency": "LTC",
          "network": "testnet",
          "uuid": "8930fdf4-5664-49c4-a51e-15c5edf5eb8f",
          "type": "PAYMENT_FORWARDING",
          "url" : "http://myaddress.com/paymet_forwarding_hook",
          "status": "PENDING",
      }
    }
    

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

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

    {
        "currency": "LTC",
        "network": "testnet",
        "uuid": "8930fdf4-5664-49c4-a51e-15c5edf5eb8f",
        "type": "PAYMENT_FORWARDING",
        "url" : "http://myaddress.com/paymet_forwarding_hook",
        "status": "OUT_OF_BALANCE",
        "message": "Payment forwarding was not successful! Reason: Balance is not enough!"
    }
    

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

    Query Parameters
    Parameter Default Description
    NETWORK - Network name (e.g. testnet or mainnet)
    FROM_ADDRESS - destination bitcoin address
    TO_ADDRESS - target bitcoin address
    CALLBACK_URL - callback url addres that will be called after forwarding is processed
    WALLET_NAME - wallet created by current USER_ID
    WALLET_PASSWORD - wallet password
    CONFIRMATIONS - after how many confirmations to execute the payment forwarding
    FEE (Optional) - what fee should be paid for the transaction (in LTC)
    FROM_ADDRESS_WIF - the wif of the FROM_ADDRESS when you create payment forwarding with address
    List Payment

    Sample Data

    
    curl -X GET \
      https://api.cryptoapis.io/v1/bc/ltc/testnet/payments \
      -H 'Content-Type: application/json' \
      -H 'X-API-Key: my-api-key'
    
    
    
    GET /v1/bc/ltc/testnet/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/ltc/testnet/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": "api.cryptoapis.io",
      "path": "/v1/bc/ltc/testnet/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();
    
    
    
    &lt?php
    
    $request = new HttpRequest();
    $request->setUrl('https://api.cryptoapis.io/v1/bc/ltc/testnet/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/ltc/testnet/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/ltc/testnet/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/ltc/testnet/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/ltc/testnet/payments"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("Content-Type", "application/json")
        req.Header.Add("X-API-Key", "my-api-key")
    
        res, _ <