> For the complete documentation index, see [llms.txt](https://blockchen.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blockchen.gitbook.io/api/litecoin.md).

# Litecoin

## Create Litecoin Client

{% tabs %}
{% tab title="PHP" %}

```php
use BlockSDK;

$blockSDK = new BlockSDK("YOU_TOKEN");
$ltcClient = $blockSDK->createLitecoin();

or

$ltcClient = BlockSDK::createLitecoin("YOU_TOKEN");
```

{% endtab %}
{% endtabs %}

## Object

### TX

| Name          | Type                                 | Content                                                      |
| ------------- | ------------------------------------ | ------------------------------------------------------------ |
| txid          | string                               | hash of the transaction.                                     |
| hash          | string                               | hash of the transaction.                                     |
| size          | int                                  | size of the transaction.                                     |
| version       | char                                 | version of the transaction.                                  |
| vin           | array\[[vin](/api/bitcoin.md#vin)]   | List of inputs into transaction                              |
| total\_in     | double                               | Total balance of transaction input                           |
| vout          | array\[[vout](/api/bitcoin.md#vout)] | List of outputs into transaction                             |
| total\_out    | double                               | Total balance of transaction output                          |
| in\_count     | int                                  | Transaction input count                                      |
| out\_count    | int                                  | Transaction output count                                     |
| fee           | double                               | Transaction fee                                              |
| fee\_per\_kb  | double                               | Transaction fee per kb                                       |
| locktime      | int                                  | If not 0, this tells when a transaction output is spendable. |
| block\_hash   | string                               | block hash including the transaction                         |
| block\_height | int                                  | block height including the transaction                       |
| time          | int                                  | The time contained in the block                              |
| confirmations | int                                  | Transaction Confirmation Count                               |

### VIN

| Name      | Type           | Content                                                            |
| --------- | -------------- | ------------------------------------------------------------------ |
| txid      | string         | hash of the transaction                                            |
| vout      | int            | the index of the output being redeemed from the origin transaction |
| scriptSig | object         | signature script                                                   |
| addresses | array\[string] | Litecoin Address                                                   |
| value     | double         | Amount used                                                        |

### VOUT

| Name         | Type           | Content                                 |
| ------------ | -------------- | --------------------------------------- |
| value        | double         | Amount received                         |
| n            | int            | Output index                            |
| scriptPubKey | object         | the public key script used to pay coins |
| addresses    | array\[string] | Litecoin Address                        |

## &#x20;GetBlockChain

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/block`

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```javascript
{
    "height":1753980,
    "bestblockhash":"6aac236365fce199d43d0bed02acd3e7ac08c5154fa5b5c81670114c16b9995d",
    "prev_hash":"34ad79ddcc5ef9f0f460334e8d9c8141a6d53238347b967a2f4bbecf22a08616",
    "unconfirmed_count":55,
    "low_fee_per_kb":0.00033,
    "medium_fee_per_kb":0.00054,
    "high_fee_per_kb":0.00058
}
```

{% endtab %}
{% endtabs %}

### Response

| Name                 | Type   | Content                                      |
| -------------------- | ------ | -------------------------------------------- |
| height               | int    | number of most recent block.                 |
| bestblockhash        | string | hash of most recent block.                   |
| prev\_hash           | string | Previous block hash of the most recent block |
| unconfirmed\_count   | int    | Unconfirmed Transaction Count                |
| low\_fee\_per\_kb    | double | Low Priority (7+ blocks)                     |
| medium\_fee\_per\_kb | double | Medium Priority (3-6 blocks)                 |
| high\_fee\_per\_kb   | double | High Priority (1-2 blocks)                   |

{% tabs %}
{% tab title="PHP" %}

```php
$blockChain = $ltcClient->getBlockChain();
```

{% endtab %}
{% endtabs %}

## GetBlock

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/block/{block}`

#### Path Parameters

| Name  | Type   | Description          |
| ----- | ------ | -------------------- |
| block | string | Block number or hash |

#### Query Parameters

| Name   | Type    | Description                      |
| ------ | ------- | -------------------------------- |
| rawtx  | boolean | Get transaction details          |
| limit  | number  | Number of transactions to import |
| offset | number  | Transaction List Offset          |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "hash":"6aac236365fce199d43d0bed02acd3e7ac08c5154fa5b5c81670114c16b9995d",
    "confirmations":2,
    "height":1753980,
    "time":1576472888,
    "tx":[...],
    "tx_count":14,
    "input_total":1250.5024938,
    "input_count":24,
    "out_total":1250.49999113,
    "out_count":27,
    "fee_per_kb":0.00041251,
    "fee_total":0.00250267,
    "generation":12.5,
    "reward":12.50250267,
    "size":6067,
    "prev_hash":"34ad79ddcc5ef9f0f460334e8d9c8141a6d53238347b967a2f4bbecf22a08616",
    "next_hash":"59866f9b33b91cf726df5ed9eed514b33a0bedd40f7b981788633379c34d7c7f"
}
```

{% endtab %}
{% endtabs %}

### Response

| Name          | Type   | Content                                                     |
| ------------- | ------ | ----------------------------------------------------------- |
| hash          | string | hash of the block                                           |
| confirmations | int    | Block Confirmation Count                                    |
| height        | int    | the block number                                            |
| time          | int    | The date and time at which a block is mined.                |
| tx            | array  | Transaction contained in the block                          |
| tx\_count     | int    | The number of transactions contained in the block           |
| input\_total  | double | Total input balance of transactions contained in the block  |
| input\_count  | int    | The number of inputs for all transactions in the block      |
| out\_total    | double | Total output balance of transactions contained in the block |
| out\_count    | int    | The number of outputs for all transactions in the block     |
| fee\_per\_kb  | double | Kb unit fee for all transactions in a block                 |
| fee\_total    | double | Total transaction fee                                       |
| generation    | double | Mining Compensation Including Fees                          |
| reward        | double | Block Mining Reward                                         |
| size          | int    | integer the size of this block in bytes.                    |
| prev\_hash    | string | Previous block hash                                         |
| next\_hash    | string | Next block hash                                             |

{% tabs %}
{% tab title="PHP" %}

```php
$block = $ltcClient->getBlock([
    "block" => 1520000,
    "rawtx" => true,
    "offset" => 0,
    "limit" => 10
]);
```

{% endtab %}
{% endtabs %}

## GetMemPool

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/mempool`

#### Query Parameters

| Name   | Type    | Description                      |
| ------ | ------- | -------------------------------- |
| rawtx  | boolean | Get transaction details          |
| offset | number  | Transaction List Offset          |
| limit  | number  | Number of transactions to import |

{% tabs %}
{% tab title="200 " %}

```
{
    "unconfirmed_count" : 10,
    "tx" : {...}
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}

```php
$pool = $ltcClient->getMemPool([
    "rawtx" => true,
    "offset" => 0,
    "limit" => 10
]);
```

{% endtab %}
{% endtabs %}

## GetAddressInfo

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/address/{address}`

#### Path Parameters

| Name    | Type   | Description      |
| ------- | ------ | ---------------- |
| address | string | Litecoin Address |

#### Query Parameters

| Name    | Type    | Description                     |
| ------- | ------- | ------------------------------- |
| reverse | boolean | Reverse transaction information |
| rawtx   | boolean | Get transaction details         |
| offset  | number  | Transaction List Offset         |
| limit   | number  | Number of Transaction to import |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "address":"MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
    "tx":[...],
    "tx_count":2,
    "received_count":1,
    "received_total":22.05992851,
    "received_unconfirmed":0,
    "spent_count":1,
    "spent_total":22.05992851,
    "spent_unconfirmed":0,
    "balance":0,
    "unconfirmed_count":0,
    "first_time":1576266405,
    "last_time":1576473461
}
```

{% endtab %}
{% endtabs %}

### Response

| Name                  | Type   | Content                                                                |
| --------------------- | ------ | ---------------------------------------------------------------------- |
| address               | string | Litecoin Address                                                       |
| tx                    | array  | Transaction originated from address                                    |
| tx\_count             | int    | The number of transactions that occurred at the address                |
| received\_count       | int    | The number of transactions received from the address                   |
| received\_total       | double | Transaction amount received from the address                           |
| received\_unconfirmed | double | Transaction amount not included in the block received from the address |
| spent\_count          | int    | The number of transactions spent from the address                      |
| spent\_total          | double | Transaction amount spent from the address                              |
| spent\_unconfirmed    | double | Transaction amount not included in the block spent from the address    |
| balance               | double | Remaining balance                                                      |
| unconfirmed\_count    | int    | Transaction count not included in address block                        |
| first\_time           | int    | First Deal Creation Time at Address                                    |
| last\_time            | int    | Last transaction creation time from address                            |

{% tabs %}
{% tab title="PHP" %}

```php
$addressInfo = $ltcClient->getAddressInfo([
    "address" => "MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
    "rawtx" => true,
    "reverse" => true,
    "offset" => 0,
    "limit" => 10
]);
```

{% endtab %}
{% endtabs %}

## GetAddressBalance

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/address/{address}/balance`

#### Path Parameters

| Name    | Type   | Description      |
| ------- | ------ | ---------------- |
| address | string | Litecoin Address |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "address":"MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
    "balance":0,
    "unconfirmed_balance":0
}
```

{% endtab %}
{% endtabs %}

### Response

| Name                 | Type   | Content                                                        |
| -------------------- | ------ | -------------------------------------------------------------- |
| address              | string | Litecoin Address                                               |
| balance              | double | Balance of the address                                         |
| unconfirmed\_balance | double | Balance of transactions not included in the block of addresses |

{% tabs %}
{% tab title="PHP" %}

```php
$balance = $ltcClient->getAddressBalance([
    "address" => "MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3"
]);
```

{% endtab %}
{% endtabs %}

## ListWallet&#x20;

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/wallet`

#### Query Parameters

| Name   | Type   | Description                 |
| ------ | ------ | --------------------------- |
| offset | number | Number of Address to import |
| limit  | number | Address List offset         |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "items" : [
        {
        "id":31,
        "name":"PLum6KG5bbbLqPovFT5vTCTtPME4Zaaaaaa",
        "created_at":"2019-07-16 08:14:21"
        },
        {
        "id":32,
        "name":"2ypjOjJhbbb3qBiyPhEHpDouyKDt8bbbbb",
        "created_at":"2019-07-16 08:15:56"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### Response

| Name        | Type     | Content                             |
| ----------- | -------- | ----------------------------------- |
| id          | int      | Unique ID of the wallet             |
| name        | string   | Name specified when creating wallet |
| created\_at | datetime | Date Wallet Was Created             |

{% tabs %}
{% tab title="PHP" %}

```php
$listWallet = $ltcClient->listWallet([
    "offset" => 0,
    "limit" => 10
])
```

{% endtab %}
{% endtabs %}

## CreateWallet

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet`

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
| name | string | Wallet Name |

{% tabs %}
{% tab title="201 " %}

```javascript
{
    "id": 38,
    "name": "test",
    "seed_wif": "abcdefg"
}
```

{% endtab %}
{% endtabs %}

### Response

| Name      | Type   | Content                                                                   |
| --------- | ------ | ------------------------------------------------------------------------- |
| id        | id     | Unique ID of the wallet                                                   |
| name      | string | Wallet name                                                               |
| seed\_wif | string | Seed private key of wallet(This key is not stored on the blocksdk server) |

{% tabs %}
{% tab title="PHP" %}

```php
$wallet = $ltcClient->createWallet([
    "name" => "test"
]);
```

{% endtab %}
{% endtabs %}

## LoadWallet

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/load`

Load your wallet.\
The loaded wallet does not require seed\_wif when using CreateAddress,SendToAddress,SendMany\
\
※It is not recommended to use

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | number | Wallet Unique ID |

#### Request Body

| Name      | Type   | Description                                          |
| --------- | ------ | ---------------------------------------------------- |
| password  | string | Password to use when creating transaction or address |
| seed\_wif | string | Wallet seed private key                              |

{% tabs %}
{% tab title="201 " %}

```
[]
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}

```php
$load = $ltcClient->loadWallet([
    "wallet_id" => 999,
    "seed_wif" => "abcdefg",
    "password" => "abcdefg"
]);
```

{% endtab %}
{% endtabs %}

## UnloadWallet

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/unload`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | number | Wallet Unique ID |

{% tabs %}
{% tab title="201 " %}

```
[]
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="PHP" %}

```php
$unload = $ltcClient->unloadWallet([
    "wallet_id" => 999
]);
```

{% endtab %}
{% endtabs %}

## GetWalletBalance

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/{wallet_id}/balance`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | number | Wallet Unique ID |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "balance":0,
    "unconfirmed_balance":0
}
```

{% endtab %}
{% endtabs %}

### Response

| Name                 | Type   | Content                                                     |
| -------------------- | ------ | ----------------------------------------------------------- |
| balance              | double | Wallet Balance                                              |
| unconfirmed\_balance | double | Balance of transactions not included in the block of wallet |

{% tabs %}
{% tab title="PHP" %}

```php
$walletBalance = $ltcClient->getWalletBalance([
    "wallet_id" => 999
]);
```

{% endtab %}
{% endtabs %}

## ListWalletAddress

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_td}/address`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | string | Wallet Unique ID |

#### Query Parameters

| Name      | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| offset    | string | Number of Address to import      |
| limit     | string | Number of transactions to import |
| address   | string | Search by this address           |
| hdkeypath | string | Search by this hdkeypath         |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "items" : {
        {
            "address":"MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
            "hdkeypath":"m\/0'\/0'\/0'"
        },
        {
            "address":"LKRF1c1hGUvcJpQxLBSVK7YGkNBZnGbWSf",
            "hdkeypath":"m\/0'\/0'\/1'"
        }
    }
}
```

{% endtab %}
{% endtabs %}

### Response

| Name      | Type   | Content                                       |
| --------- | ------ | --------------------------------------------- |
| address   | string | Litecoin Address                              |
| hdkeypath | string | The HD keypath if the key is HD and available |

{% tabs %}
{% tab title="PHP" %}

```php
$listAddress = $ltcClient->listWalletAddress([
    "wallet_id" => 999,
    "offset" => 0,
    "limit" => 10
]);
```

{% endtab %}
{% endtabs %}

## CreateWalletAddress

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/address`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | string | Wallet Unique ID |

#### Request Body

| Name      | Type   | Description                                                                        |
| --------- | ------ | ---------------------------------------------------------------------------------- |
| password  | string | Only available if the wallet is loaded.                                            |
| seed\_wif | string | Seed private key issued at wallet creation(Not necessary if your wallet is loaded) |

{% tabs %}
{% tab title="201 " %}

```javascript
{
    "address": "MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
    "hdkeypath": "m/0'/0'/0'"
}
```

{% endtab %}
{% endtabs %}

### Response

| Name      | Type   | Content                                       |
| --------- | ------ | --------------------------------------------- |
| address   | string | Litecoin Address                              |
| hdkeypath | string | The HD keypath if the key is HD and available |

{% tabs %}
{% tab title="PHP" %}

```php
$address = $ltcClient->createWalletAddress([
    "wallet_id" => 999,
    "seed_wif" => "abcdefg"
]);

or

$address = $ltcClient->createWalletAddress([
    "wallet_id" => 999,
    "password" => "abcdefg"
]);
```

{% endtab %}
{% endtabs %}

## GetWalletTx

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/transaction`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | string | Wallet Unique ID |

#### Request Body

| Name     | Type   | Description                                           |
| -------- | ------ | ----------------------------------------------------- |
| category | string | Transaction type to import(all,receive,spent,unspent) |
| order    | string | Sort deals to import(desc,asc)                        |
| offset   | number | Number of Address to import                           |
| limit    | number | Address List offset                                   |

{% tabs %}
{% tab title="200 " %}

```javascript
{
   "items" : { 
       {
            "txid":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
            "category":"spent",
            "address":"MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
            "amount":22.05992851,
            "confirmations":0
        },
        {
            "txid":"4181c8c93ddb4e3175e97ac8499111a61c48f2355257cc7741bd85281aa9efe5",
            "category":"receive",
            "address":"MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3",
            "amount":22.05992851,
            "confirmations":0
        }
    }
}
```

{% endtab %}
{% endtabs %}

### Response

| Name          | Type   | Content                                |
| ------------- | ------ | -------------------------------------- |
| txid          | string | Transaction hash                       |
| category      | string | receive or spent                       |
| address       | string | Address where the transaction occurred |
| amount        | double | Transaction balance amount             |
| confirmations | int    | Transaction Confirmation Count         |

{% tabs %}
{% tab title="PHP" %}

```php
$walletTx = $ltcClient->getWalletTx([
    "wallet_id" => 999,
    "category" => "all",
    "order" => "desc",
    "offset" => 0,
    "limit" => 10
]);
```

{% endtab %}
{% endtabs %}

## SendToAddress

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/sendtoaddress`

&#x20;

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | string | Wallet Unique ID |

#### Request Body

| Name                  | Type    | Description                                                                                                                    |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| subtractfeefromamount | boolean | The fee will be deducted from the amount being sent. The recipient will receive less coins than you enter in the amount field. |
| password              | string  | Only available if the wallet is loaded.                                                                                        |
| kbfee                 | number  | Fee per kilobytes to be used for transactions                                                                                  |
| seed\_wif             | string  | Seed private key issued at wallet creation(Not necessary if your wallet is loaded)                                             |
| amount                | number  | balance to be sent                                                                                                             |
| address               | string  | Litecoin Address to Receive                                                                                                    |

{% tabs %}
{% tab title="201 " %}

```javascript
{
	"txid":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"hash":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"version":1,
	"size":370,
	"vin":[
		{
			"txid":"4181c8c93ddb4e3175e97ac8499111a61c48f2355257cc7741bd85281aa9efe5",
			"vout":1,
			"scriptSig":{
				"asm":"0 3045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b638101 304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf201 522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae",
				"hex":"00483045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b63810147304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf2014c69522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae"
			},
			"addresses":["MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3"],
			"value":22.05992851
		}
	],
	"total_in":22.05992851,
	"vout":[
		{
			"value":0.27823000,
			"n":0,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 b38384f200365b7e5bb6c8111a9d966201b97db5 OP_EQUAL",
				"hex":"a914b38384f200365b7e5bb6c8111a9d966201b97db587"
			},
			"addresses":["MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV"]
		},
		{
			"value":21.78125331,
			"n":1,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 fa61f4d50d7d7d704ab5f490649b923ab472af96 OP_EQUAL",
				"hex":"a914fa61f4d50d7d7d704ab5f490649b923ab472af9687"
			},
			"addresses":["MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP"]
		}
	],
	"total_out":22.05948331,
	"in_count":1,
	"out_count":2,
	"fee":0.00044520,
	"fee_per_kb":0.00120324,
	"locktime":1753984,
	"block_hash":"fc20114815508f8871c7da7c479681d9a01ec5eddaf12f4288107a38291768a2",
	"block_height":1753984,
	"time":1576473461,
	"confirmations":5
}
```

{% endtab %}
{% endtabs %}

### Response

Return [Tx](/api/bitcoin.md#tx) on Success

{% tabs %}
{% tab title="PHP" %}

```php
$tx = $ltcClient->sendToAddress([
    "wallet_id" => 999,
    "seed_wif" => "abcdefg",
    "address" => "MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV",
    "amount" => 0.1,
    "kbfee" => 0.0001
])

or

$tx = $ltcClient->sendToAddress([
    "wallet_id" => 999,
    "password" => "abcdefg",
    "address" => "MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV",
    "amount" => 0.1,
    "kbfee" => 0.0001
])
```

{% endtab %}
{% endtabs %}

## SendMany

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/wallet/{wallet_id}/sendmany`

#### Path Parameters

| Name       | Type   | Description      |
| ---------- | ------ | ---------------- |
| wallet\_id | string | Wallet Unique ID |

#### Request Body

| Name                  | Type    | Description                                                                                                                    |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| subtractfeefromamount | boolean | The fee will be deducted from the amount being sent. The recipient will receive less coins than you enter in the amount field. |
| password              | string  | Only available if the wallet is loaded.                                                                                        |
| to                    | object  | Receiving Information                                                                                                          |
| kbfee                 | number  | Fee per kilobytes to be used for transactions                                                                                  |
| seed\_wif             | string  | Seed private key issued at wallet creation(Not necessary if your wallet is loaded)                                             |

{% tabs %}
{% tab title="201 " %}

```javascript
{
	"txid":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"hash":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"version":1,
	"size":370,
	"vin":[
		{
			"txid":"4181c8c93ddb4e3175e97ac8499111a61c48f2355257cc7741bd85281aa9efe5",
			"vout":1,
			"scriptSig":{
				"asm":"0 3045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b638101 304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf201 522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae",
				"hex":"00483045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b63810147304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf2014c69522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae"
			},
			"addresses":["MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3"],
			"value":22.05992851
		}
	],
	"total_in":22.05992851,
	"vout":[
		{
			"value":0.27823000,
			"n":0,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 b38384f200365b7e5bb6c8111a9d966201b97db5 OP_EQUAL",
				"hex":"a914b38384f200365b7e5bb6c8111a9d966201b97db587"
			},
			"addresses":["MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV"]
		},
		{
			"value":21.78125331,
			"n":1,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 fa61f4d50d7d7d704ab5f490649b923ab472af96 OP_EQUAL",
				"hex":"a914fa61f4d50d7d7d704ab5f490649b923ab472af9687"
			},
			"addresses":["MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP"]
		}
	],
	"total_out":22.05948331,
	"in_count":1,
	"out_count":2,
	"fee":0.00044520,
	"fee_per_kb":0.00120324,
	"locktime":1753984,
	"block_hash":"fc20114815508f8871c7da7c479681d9a01ec5eddaf12f4288107a38291768a2",
	"block_height":1753984,
	"time":1576473461,
	"confirmations":5
}
```

{% endtab %}
{% endtabs %}

### Example PostData

```
{
   "to":{
     	"MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV":0.0001,
		 "MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP":0.0001
   },
   "kbfee":0.00001,
   "seed_wif" : "abcdefg"
}
```

### Response

Return [Tx](/api/bitcoin.md#tx) on Success

{% tabs %}
{% tab title="PHP" %}

```php
$tx = $ltcClient->sendMany([
    "wallet_id" => 999,
    "seed_wif" => "abcdefg",
    "to" => [
        "MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV" => 0.0001,
        "MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP" => 0.0001
    ],
    "kbfee" => 0.0001,
    "seed_wif" => "abcdefg"
]);

or

$tx = $ltcClient->sendMany([
    "wallet_id" => 999,
    "seed_wif" => "abcdefg",
    "to" => [
        "MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV" => 0.0001,
        "MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP" => 0.0001
    ],
    "kbfee" => 0.0001,
    "password" => "abcdefg"
]);
```

{% endtab %}
{% endtabs %}

## GetTransaction

<mark style="color:blue;">`GET`</mark> `https://api.blocksdk.com/v1/ltc/transaction/{hash}`

#### Path Parameters

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| hash | string | transaction hash |

{% tabs %}
{% tab title="201 " %}

```javascript
{
	"txid":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"hash":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"version":1,
	"size":370,
	"vin":[
		{
			"txid":"4181c8c93ddb4e3175e97ac8499111a61c48f2355257cc7741bd85281aa9efe5",
			"vout":1,
			"scriptSig":{
				"asm":"0 3045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b638101 304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf201 522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae",
				"hex":"00483045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b63810147304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf2014c69522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae"
			},
			"addresses":["MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3"],
			"value":22.05992851
		}
	],
	"total_in":22.05992851,
	"vout":[
		{
			"value":0.27823000,
			"n":0,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 b38384f200365b7e5bb6c8111a9d966201b97db5 OP_EQUAL",
				"hex":"a914b38384f200365b7e5bb6c8111a9d966201b97db587"
			},
			"addresses":["MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV"]
		},
		{
			"value":21.78125331,
			"n":1,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 fa61f4d50d7d7d704ab5f490649b923ab472af96 OP_EQUAL",
				"hex":"a914fa61f4d50d7d7d704ab5f490649b923ab472af9687"
			},
			"addresses":["MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP"]
		}
	],
	"total_out":22.05948331,
	"in_count":1,
	"out_count":2,
	"fee":0.00044520,
	"fee_per_kb":0.00120324,
	"locktime":1753984,
	"block_hash":"fc20114815508f8871c7da7c479681d9a01ec5eddaf12f4288107a38291768a2",
	"block_height":1753984,
	"time":1576473461,
	"confirmations":5
}
```

{% endtab %}
{% endtabs %}

### Response

Return [Tx](/api/bitcoin.md#tx) on Success

{% tabs %}
{% tab title="PHP" %}

```php
$tx = $ltcClient->getTransaction([
    "hash" => "892235a5aa0f52c2240603e9ca55012f0c76fee688623961003eae1f0ede4506	"
]);
```

{% endtab %}
{% endtabs %}

## SendTransaction

<mark style="color:green;">`POST`</mark> `https://api.blocksdk.com/v1/ltc/transaction`

#### Request Body

| Name      | Type   | Description            |
| --------- | ------ | ---------------------- |
| sign\_hex | string | signed transaction hex |

{% tabs %}
{% tab title="201 " %}

```javascript
{
	"txid":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"hash":"e731c5c5eb674f3f5fc55f489ddc2ec04dbce9cc36f94e4c6b5496692bc69409",
	"version":1,
	"size":370,
	"vin":[
		{
			"txid":"4181c8c93ddb4e3175e97ac8499111a61c48f2355257cc7741bd85281aa9efe5",
			"vout":1,
			"scriptSig":{
				"asm":"0 3045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b638101 304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf201 522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae",
				"hex":"00483045022100a138cccf7136cf865abb4b71c880298ec83a336e2e5be72619e0a69914d2d46202205979f6ef01c1125ce72ef4211679a1bbaa598b6b847423ab06afe5df793b63810147304402203896198f0e0b96144ab44319df5e3b205056104123b96cb3a2f05afbf15f510c02207b74dc8d79821c2d59986e4411c7d75d1f294a44b0a43349a449e268c0d4ebf2014c69522103665796d8223654406c904397f7a3c28bf4aab2042763c35e3f883d3a405049682102e99dfcb366749431deb1c037589796d576c699e9c94c51ede2c1d8edc17d248b21037a05a219e2b301c9bfee0f01530e9552ee75c3ce7ab0f0dfe6f76b388bba125e53ae"
			},
			"addresses":["MJq4zB2rxg7TQGmAsPHxwAu8F2hqMiiAz3"],
			"value":22.05992851
		}
	],
	"total_in":22.05992851,
	"vout":[
		{
			"value":0.27823000,
			"n":0,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 b38384f200365b7e5bb6c8111a9d966201b97db5 OP_EQUAL",
				"hex":"a914b38384f200365b7e5bb6c8111a9d966201b97db587"
			},
			"addresses":["MQGLjtayCCGx7JEfLY55Kx8g2vMzcKagTV"]
		},
		{
			"value":21.78125331,
			"n":1,
			"scriptPubKey":{
				"type":"scripthash",
				"asm":"OP_HASH160 fa61f4d50d7d7d704ab5f490649b923ab472af96 OP_EQUAL",
				"hex":"a914fa61f4d50d7d7d704ab5f490649b923ab472af9687"
			},
			"addresses":["MWj4WWtTFFiHgzaLZPVbtzpXqQmgBPUhCP"]
		}
	],
	"total_out":22.05948331,
	"in_count":1,
	"out_count":2,
	"fee":0.00044520,
	"fee_per_kb":0.00120324,
	"locktime":1753984,
	"block_hash":"fc20114815508f8871c7da7c479681d9a01ec5eddaf12f4288107a38291768a2",
	"block_height":1753984,
	"time":1576473461,
	"confirmations":5
}
```

{% endtab %}
{% endtabs %}

### Response

Return [Tx](/api/bitcoin.md#tx) on Success

{% tabs %}
{% tab title="PHP" %}

```php
$tx = $ltcClient->sendTransaction([
    "sign_hex" => "abcdefg"
])
```

{% endtab %}
{% endtabs %}
