NAV
shell php javascript java csharp ruby python go

Litecoin APIs

Blockchain information

curl -X GET 'https://api.blocksdk.com/v2/ltc/info' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$blockChain = $ltcClient->getBlockChain();
var blockChain = ltcClient.getBlockChain()
blockChain = ltcClient.getBlockChain()
blockChain = ltcClient.getBlockChain()
blockChain := ltcClient.GetBlockChain()

Response Body

{
    "payload": {
        "network": "mainnet",
        "currency": "LTC",
        "last_block_height": 1982052,
        "last_block_hash": "aac7c2a76b11b4f483d8642eb31500e544a7a42d56a4d3df425292c7717c7777",
        "last_block_datetime": "2021-01-13T03:37:07+00:00",
        "last_block_timestamp": 1610509027,
        "prev_block_height": 1982050,
        "prev_block_hash": "885360691b16e80f25019be57a094af8e1706e5ba8af2755971a48d9efa8237c",
        "prev_block_datetime": "2021-01-13T03:36:19+00:00",
        "prev_block_timestamp": 1610508979,
        "unconfirmed_count": 31,
        "low_fee_per_kb": 0.00011,
        "medium_fee_per_kb": 0.00018,
        "high_fee_per_kb": 0.00035
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns information about the Litecoin blockchain.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/info

Response

Variable Type Description
unconfirmed_count int Memory pool transaction count
low_fee_per_kb double Low fees per kb
medium_fee_per_kb double Medium fees per kb (3~6 Block)
high_fee_per_kb double High fees per kb (1~2 Block)

Block information

curl -X GET 'https://api.blocksdk.com/v2/ltc/blocks/1' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$block = $ltcClient->getBlock([
    "block" => 1,
    "rawtx" => false,
    "offset" => 0,
    "limit" => 10
]);
var block = ltcClient.getBlock({
    "block" : 1,
    "rawtx" : false,
    "offset" : 0,
    "limit" : 10
})
block = ltcClient.getBlock({
    "block" => 1,
    "rawtx" => false,
    "offset" => 0,
    "limit" => 10
})
block = ltcClient.getBlock({
    "block" : 1,
    "rawtx" : false,
    "offset" : 0,
    "limit" : 10
})
block := ltcClient.GetBlock(map[string]interface{}{
      "block" : 1,
      "rawtx" : false,
      "offset" : 0,
      "limit" : 10
})

Response Body

{
    "payload": {
        "hash": "80ca095ed10b02e53d769eb6eaf92cd04e9e0759e5be4a8477b42911ba49c78f",
        "confirmations": 1982053,
        "height": 1,
        "transactions": [
            "fa3906a4219078364372d0e2715f93e822edd0b47ce146c71ba7ba57179b50f6"
        ],
        "transaction_count": 1,
        "total_input": 0,
        "input_count": 1,
        "total_output": 50,
        "output_count": 1,
        "fee_per_kb": 0,
        "total_fee": 0,
        "generation": 50,
        "reward": 50,
        "size": 215,
        "datetime": "2011-10-08T06:29:19+00:00",
        "timestamp": 1318055359,
        "prev_block_hash": "12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2",
        "prev_block_datetime": "2011-10-07T07:31:05+00:00",
        "prev_block_timestamp": 1317972665,
        "next_block_hash": "13957807cdd1d02f993909fa59510e318763f99a506c4c426e3b254af09f40d7",
        "next_block_datetime": "2011-10-12T02:34:18+00:00",
        "next_block_timestamp": 1318386858
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Return information about a specific block

HTTP Request

GET https://api.blocksdk.com/v2/ltc/blocks/<block>

URL Parameters

Parameter Type Description
block* string Block height or block hash

Query Parameters

Parameter Type Default Description
rawtx boolean false If true, return transaction details
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Response

Variable Type Description
hash string Block Hash
height string Block Height
transactions array List of transactions contained in the block
transaction_count array Number of transactions contained in the block
total_input double Total amount of input of all transactions included in the block
input_count int Number of inputs of all transactions included in the block
total_output double Total amount of output of all transactions included in the block
output_count int Number of outputs of all transactions included in the block
fee_per_kb double Average fee per kb of all transactions
total_fee double Total fees for all transactions in the block
generation double Block Mining Amount
reward double Block mining reward
size int Block Size
datetime string Block creation date and time
timestamp string Block creation date and time

List of memory pool transactions

curl -X GET 'https://api.blocksdk.com/v2/ltc/mempool' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$mempool = $ltcClient->getMemPool([
    "rawtx" => false,
    "offset" => 0,
    "limit" => 10
]);
var mempool = ltcClient.getMemPool({
    "rawtx" : false,
    "offset" : 0,
    "limit" : 10
})
mempool = ltcClient.getMemPool({
    "rawtx" => false,
    "offset" => 0,
    "limit" => 10
})
mempool = ltcClient.getMemPool({
    "rawtx" : false,
    "offset" : 0,
    "limit" : 10
})
mempool := ltcClient.GetMemPool(map[string]interface{}{
      "rawtx" : false,
      "offset" : 0,
      "limit" : 10
})

Response Body

{
    "payload": {
        "transactions": [
            "e366e4d4d7ea0a053f5df9d1a63627f5cd248dac1b03bd0d83f81c88b1776699",
            "f56d0ca430004c4ddacfe6cf3b6dbf21b9c761b39d6d19da983be5c0d200b5b8",
            "9d0b22a6de2c435b492416d83c13752d7d708cef35d923efa241b78629e483ad",
            "ad55b477c75ad812acf3abb3cc69320df0f6ecb59a3e8410ca07ebe21f536e23",
            "3aff846f8a45c3b70b45bd5663a80965ef43c8d6c0edf8eef2b58f3269bc09ad",
            "a8846de5c294702f7f3283ae364a48330206193ae05c3b0d4512fcaf6c79a73c",
            "87aa66196f5253404d10f6c5b0873098a3c2ef8b141f76c890325bd50d14a848",
            "4cee906c7900dce632eee5b60b52882ce4e2de131c59331bf258334026dd32b7",
            "2066ac91604986eff5b5b85a7ffd7929e611c2b58966814a0f31919b3dd62e49",
            "dce539cd25c81ceba62b0e43c9c69387190e26872d255107a2fd29b209cd6dfa"
        ],
        "transaction_count": 45
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns a list of transactions in the memory pool.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/mempool

Query Parameters

Parameter Type Default Description
rawtx boolean false If true, return transaction details
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Response

Variable Type Description
transactions array List of transactions with memory pool
transaction_count array Number of transactions included in the memory pool

Address information

curl -X GET 'https://api.blocksdk.com/v2/ltc/addresses/LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$addressInfo = $ltcClient->getAddressInfo([
    "address" => "LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq",
    "rawtx" => false,
    "reverse" => true,
    "offset" => 0,
    "limit" => 10
]);
var addressInfo = ltcClient.getAddressInfo({
    "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN",
    "rawtx" : false,
    "reverse" : true,
    "offset" : 0,
    "limit" : 10
})
addressInfo = ltcClient.getAddressInfo({
    "address" => "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN",
    "rawtx" => false,
    "reverse" => true,
    "offset" => 0,
    "limit" => 10
})
addressInfo = ltcClient.getAddressInfo({
    "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN",
    "rawtx" : false,
    "reverse" : true,
    "offset" : 0,
    "limit" : 10
})
addressInfo := ltcClient.GetAddressInfo(map[string]interface{}{
      "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN",
      "rawtx" : false,
      "reverse" : true,
      "offset" : 0,
      "limit" : 10,
})

Response Body

{
    "payload": {
        "address": "LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq",
        "transactions": [
            "fa181905dddcf5a78ca6de75f130d07fff016b4a0735f842c2bd4e91a7dbf95e",
            "13c2d16d18a83042f98436a30d83de17d678055129703a5535e4ea86cb901b62"
        ],
        "unconfirmed_transactions": [],
        "transaction_count": 2,
        "received_count": 1,
        "spent_count": 1,
        "total_received": 46.681,
        "total_spent": 46.681,
        "unconfirmed_total_received": 0,
        "unconfirmed_total_spent": 0,
        "balance": 0,
        "unconfirmed_count": 0,
        "first_datetime": "2016-12-28T18:47:43+00:00",
        "first_timestamp": 1482950863,
        "last_datetime": "2017-02-15T23:11:24+00:00",
        "last_timestamp": 1487200284
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns information about a specific address.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/addresses/<address>

URL Parameters

Parameter Type Description
address* string Return information from this address.

Query Parameters

Parameter Type Default Description
rawtx boolean false If true, return transaction details
reverse boolean true If true, the transaction is returned in the most recent order.
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Response

Variable Type Description
transactions array List of transactions received or sent to the address
transaction_count int Number of transactions received or sent to the address
unconfirmed_transactions array List of transactions not included in the block
received_count double Number of transactions received
spent_count double Number of transactions sent
total_received double Total amount received
total_spent double Total amount sent
unconfirmed_total_received double Total amount received not included in the block
unconfirmed_total_spent double Total amount sent not included in the block
balance double Remaining balance
unconfirmed_count int Number of transactions not included in the block
first_datetime string Creation date and time of the first transaction that occurred at the address
first_timestamp int Creation date and time of the first transaction that occurred at the address
last_datetime string Creation date and time of the last transaction that occurred at the address
last_timestamp int Creation date and time of the last transaction that occurred at the address

Address balance

curl -X GET 'https://api.blocksdk.com/v2/addresses/LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq/balance' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$balance = $ltcClient->getAddressBalance([
    "address" => "LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq"
]);
var balance = ltcClient.getAddressBalance({
    "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN"
})
balance = ltcClient.getAddressBalance({
    "address" => "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN"
})
balance = ltcClient.getAddressBalance({
    "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN"
})
balance := ltcClient.GetAddressBalance(map[string]interface{}{
      "address" : "14ydRmjd5Tzg7W2hJJ8nsuZvpQNVcLYCYN"
})

Response Body

{
    "payload": {
        "address": "LKYGM2VMyNGdW77zAGUeJT4tN9Bz5rj8Eq",
        "balance": 0,
        "unconfirmed_total_received": 0,
        "unconfirmed_total_spent": 0
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns the balance for a specific address.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/addresses/<address>/balance

URL Parameters

Parameter Type Description
address* string Return information from this address.

Response

Variable Type Description
unconfirmed_total_received double Total amount received not included in the block
unconfirmed_total_spent double Total amount sent not included in the block
balance double Remaining balance

HD wallet creation

curl -X POST 'https://api.blocksdk.com/v2/ltc/wallets/hd' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'\
    -d '{"name" : "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"}'   
$wallet = $ltcClient->createHdWallet([
    "name" => "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"
]);
var wallet = ltcClient.createHdWallet({
    "name" : "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"
})
wallet = ltcClient.createHdWallet({
    "name" => "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"
})
wallet = ltcClient.createHdWallet({
    "name" : "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"
})
wallet := ltcClient.CreateHdWallet(map[string]interface{}{
      "name" : "IwbdtnYMSD8MWHWGOwBluLAlbEZoMROC4mQ"
})

Response Body

{
    "payload": {
        "id": 353,
        "name": "LgX24xavoeateajxZAZHK6mmgHurwCaVzLx",
        "wif": "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
        "datetime": "2021-01-13T03:45:24+00:00",
        "timestamp": 1610509524
    },
    "state": {
        "code": 201,
        "success": true
    }
}

Info

Create an HD wallet.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/hd

Body Parameters

Parameter Type Default Description
name string random Wallet name

Response

Variable Type Description
id int Wallet unique id
name string Wallet identification name
wif string Wallet key. This value is not stored on the server for security and stability reasons, so it cannot be recovered when lost. Be careful not to lose it.

Wallet list

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$wallets = $ltcClient->getWallets([
    "offset" => 0,
    "limit" => 10
]);
var wallets = ltcClient.getWallets({
    "offset" : 0,
    "limit" : 10
})
wallets = ltcClient.getWallets({
    "offset" => 0,
    "limit" => 10
})
wallets = ltcClient.getWallets({
    "offset" : 0,
    "limit" : 10
})
wallets := ltcClient.GetWallets(map[string]interface{}{
      "offset" : 0,
      "limit" : 10
})

Response Body

{
    "payload": [
        {
            "id": 353,
            "name": "LgX24xavoeateajxZAZHK6mmgHurwCaVzLx",
            "datetime": "2021-01-13T03:45:24+00:00",
            "timestamp": 1610509524
        }
    ],
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns the list of wallets created.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/wallets

Query Parameters

Parameter Type Default Description
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Response

Variable Type Description
id int Wallet unique id
name string Wallet identification name
datetime string Date and time the wallet was created
timestamp int Date and time the wallet was created

Specific wallet information

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets/353' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$wallet = $ltcClient->getWallet([
    "wallet_id" => 353
]);
var wallet = ltcClient.getWallet({
    "wallet_id" : 353
})
wallet = ltcClient.getWallet({
    "wallet_id" => 353
})
wallet = ltcClient.getWallet({
    "wallet_id" : 353
})
wallet := ltcClient.GetWallet(map[string]interface{}{
      "wallet_id" : 466
})

Response Body

{
    "payload": {
        "id": 353,
        "name": "LgX24xavoeateajxZAZHK6mmgHurwCaVzLx",
        "address_count": 0,
        "transaction_count": 0,
        "unspent_transaction_count": 0,
        "loaded": false,
        "datetime": "2021-01-13T03:45:24+00:00",
        "timestamp": 1610509524
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns information about a specific wallet.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to return information

Response

Variable Type Description
id int Wallet unique id
name string Wallet identification name
address_count int Number of addresses created in wallet
transaction_count int Total number of transactions received or sent
loaded boolean Loading state
datetime string Date and time the wallet was created
timestamp int Date and time the wallet was created

Wallet loading

curl -X POST 'https://api.blocksdk.com/v2/ltc/wallets/353/load' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token' \
  -d '{
    "wif" : "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
    "password" : "abcdef123456"
    }'
$load = $ltcClient->loadWallet([
    "wallet_id" => 353,
    "wif" => "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
    "password" => "abcdef123456"
]);
var load = ltcClient.loadWallet({
    "wallet_id" : 470,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "password" : "abcdef123456"
})
load = ltcClient.loadWallet({
    "wallet_id" => 470,
    "wif" => "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "password" => "abcdef123456"
})
load = ltcClient.loadWallet({
    "wallet_id" : 470,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "password" : "abcdef123456"
})
load := ltcClient.LoadWallet(map[string]interface{}{
      "wallet_id" : 470,
      "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
      "password" : "abcdef123456"
})

Response Body

{
    "payload": {
        "id": 467,
        "loaded": true
    },
    "state": {
        "code": 201,
        "success": true
    }
}

Info

Load a specific wallet.

The loaded wallet can create transactions or addresses with passwords without wif.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/load

URL Parameters

Parameter Type Description
wallet_id* int Wallet id to load

Body Parameters

Parameter Type Description
password* string Loaded wallets require this password when creating a transaction or address.
wif* string This is the wif returned when the wallet was created

Response

Variable Type Description
id int Wallet unique id
loaded boolean Loading state

Unload wallet

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets/353/unload' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$unload = $ltcClient->unloadWallet([
    "wallet_id" => 353
]);
var unload = ltcClient.unloadWallet({
    "wallet_id" : 467
})
unload = ltcClient.unloadWallet({
    "wallet_id" => 467
})
unload = ltcClient.unloadWallet({
    "wallet_id" : 467
})
unload := ltcClient.UnloadWallet(map[string]interface{}{
      "wallet_id" : 467
})

Response Body

{
    "payload": {
        "id": 353,
        "loaded": false
    },
    "state": {
        "code": 201,
        "success": true
    }
}

Info

Unload the loaded wallet.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/unload

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to unload

Response

Variable Type Description
id int Wallet unique id
loaded boolean Loading state

Wallet balance

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets/353/balance' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$walletBalance = $ltcClient->getWalletBalance([
    "wallet_id" => 353
]);
var walletBalance = ltcClient.getWalletBalance({
    "wallet_id" : 467
})
walletBalance = ltcClient.getWalletBalance({
    "wallet_id" => 467
})
walletBalance = ltcClient.getWalletBalance({
    "wallet_id" : 467
})
walletBalance := ltcClient.GetWalletBalance(map[string]interface{}{
      "wallet_id" : 467
})

Response Body

{
    "payload": {
        "balance": 0,
        "unconfirmed_balance": 0
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns the remaining balance information for a specific wallet.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/balance

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to return balance

Response

Variable Type Description
balance double Balance left in wallet
unconfirmed_balance double The remaining balance not included in the block and pending use

Wallet address list

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets/353/addresses' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$wallet_addresses = $ltcClient->getWalletAddresses([
    "wallet_id" => 353,
    "offset" => 0,
    "limit" => 10
]);
var wallet_addresses = ltcClient.getWalletAddresses({
    "wallet_id" : 467,
    "offset" : 0,
    "limit" : 10
})
wallet_addresses = ltcClient.getWalletAddresses({
    "wallet_id" => 467,
    "offset" => 0,
    "limit" => 10
})
wallet_addresses = ltcClient.getWalletAddresses({
    "wallet_id" : 467,
    "offset" : 0,
    "limit" : 10
})
wallet_addresses := ltcClient.GetWalletAddresses(map[string]interface{}{
      "wallet_id" : 467,
      "offset" : 0,
      "limit" : 10
})

Response Body

{
    "payload": [
        {
            "address": "LTBWmH7Ui8He8ENkXUUBvADuxom7PdCnCA",
            "hdkeypath": "m/0'/0'/0'",
            "datetime": "2021-01-13T03:48:19+00:00",
            "timestamp": 1610509699
        }

        ...

    ],
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns a list of addresses generated by a specific wallet.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/addresses

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to return address list

Query Parameters

Parameter Type Default Description
address string --- Filter by this address
hdkeypath string --- Filter by this hdkeypath
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Create wallet address

curl -X POST 'https://api.blocksdk.com/v2/ltc/wallets/353/addresses' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token' \
    -d '{
        "wif" : "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5"
    }'
$address = $ltcClient->createWalletAddress([
    "wallet_id" => 353,
    "wif" => "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5"
]);

or

$address = $ltcClient->createWalletAddress([
    "wallet_id" => 353,
    "wif" => "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5"
]);
var address = ltcClient.createWalletAddress({
    "wallet_id" : 470,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG"
})

or

var address = ltcClient.createWalletAddress({
    "wallet_id" : 470,
    "password" : "abcdefg"
})
address = ltcClient.createWalletAddress({
    "wallet_id" => 470,
    "wif" => "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG"
})

or

address = ltcClient.createWalletAddress({
    "wallet_id" => 470,
    "password" => "abcdefg"
})
address = ltcClient.createWalletAddress({
    "wallet_id" : 470,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG"
})

or

address = ltcClient.createWalletAddress({
    "wallet_id" : 470,
    "password" : "abcdefg"
})
address := ltcClient.CreateWalletAddress(map[string]interface{}{
      "wallet_id" : 470,
      "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG"
})

or

address := ltcClient.CreateWalletAddress(map[string]interface{}{
      "wallet_id" : 470,
      "password" : "abcdefg"
})

Response Body

{
    "payload": {
        "address": "LTBWmH7Ui8He8ENkXUUBvADuxom7PdCnCA",
        "hdkeypath": "m/0'/0'/0'",
        "datetime": "2021-01-13T03:48:19+00:00",
        "timestamp": 1610509699
    },
    "state": {
        "code": 201,
        "success": true
    }
}

Info

Create an address in a specific wallet.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/addresses

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to create address

Body Parameters

Parameter Type Description
password string If the wallet is loaded, you can create an address with a password.
wif string This value is mandatory if the wallet is not loaded. Issued when the wallet is created.

Response

Variable Type Description
address string Generated address
hdkeypath string Hd path of generated address
datetime string Address creation date and time
timestamp string Address creation date and time

Wallet transaction list

curl -X GET 'https://api.blocksdk.com/v2/ltc/wallets/353/transactions' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$wallet_transactions = $ltcClient->getWalletTransactions([
    "wallet_id" => 353,
    "type" => "all",
    "order" => "desc",
    "offset" => 0,
    "limit" => 10
]);
var wallet_transactions = ltcClient.getWalletTransactions({
    "wallet_id" : 215,
    "type" : "all",
    "order" : "desc",
    "offset" : 0,
    "limit" : 10
})
wallet_transactions = ltcClient.getWalletTransactions({
    "wallet_id" => 215,
    "type" => "all",
    "order" => "desc",
    "offset" => 0,
    "limit" => 10
})
wallet_transactions = ltcClient.getWalletTransactions({
    "wallet_id" : 215,
    "type" : "all",
    "order" : "desc",
    "offset" : 0,
    "limit" : 10
})
wallet_transactions := ltcClient.GetWalletTransactions(map[string]interface{}{
    "wallet_id" : 215,
    "type" : "all",
    "order" : "desc",
    "offset" : 0,
    "limit" : 10
})

Response Body

{
    "payload": [
        {
            "txid": "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef",
            "type": "received",
            "address": "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi",
            "amount": 15.31876939,
            "confirmations": 736202
        },

        ...

    ],
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Returns a list of transactions received or sent to the wallet.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/transactions

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to return transaction list

Query Parameters

Parameter Type Default Description
type string all Type of transaction (all,receive,spent,unspent)
order string desc Sort by newest, oldest (asc,desc)
offset int 0 Sequential index number at the beginning of the list of items for a given criterion
limit int 10 Limit number of item lists for a given criterion

Response

Variable Type Description
txid string transaction id, transaction hash
type string Transaction type (receive,spent,unspent)
address string Address used for transaction
amount string Transaction amount

Transfer wallet amount

curl -X POST 'https://api.blocksdk.com/v2/ltc/wallets/125/sendtoaddress' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token' \
    -d '{
        "wif" : "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
        "address" : "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi",
        "amount" : 15.31876939
    }'  
$tx = $ltcClient->sendToAddress([
    "wallet_id" => 125,
    "wif" => "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
    "address" => "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi",
    "amount" =>  15.31876939
])

or

$tx = $ltcClient->sendToAddress([
    "wallet_id" => 125,
    "password" => "abcdefg",
    "address" => "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi",
    "amount" =>  15.31876939
])
var tx = ltcClient.sendToAddress({
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})

or

var tx = ltcClient.sendToAddress({
    "wallet_id" : 125,
    "password" : "abcdefg",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})
tx = ltcClient.sendToAddress({
    "wallet_id" => 125,
    "wif" => "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "address" => "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" =>  0.0001
})

or

tx = ltcClient.sendToAddress({
    "wallet_id" => 125,
    "password" => "abcdefg",
    "address" => "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" =>  0.0001
})
tx = ltcClient.sendToAddress({
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})

or

tx = ltcClient.sendToAddress({
    "wallet_id" : 125,
    "password" : "abcdefg",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})
tx := ltcClient.SendToAddress(map[string]interface{}{
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})

or

tx := ltcClient.SendToAddress(map[string]interface{}{
    "wallet_id" : 125,
    "password" : "abcdefg",
    "address" : "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg",
    "amount" :  0.0001
})

Response Body

{
    "payload": {
        "txid": "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef",
        "version": 1,
        "size": 226,
        "inputs": [
            {
                "txid": "ef53387a388cbe7cc1bab6de214633414e7c792e177a8af00f463882a372e776",
                "output_index": 3,
                "script": {
                    "ams": "3045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f444301 033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0",
                    "hex": "483045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f44430121033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0"
                },
                "addresses": [
                    "LLcFVYxTrR1vfL5m1tL8eLKExzbfjuadWc"
                ],
                "value": 16.999
            }
        ],
        "total_input": 16.999,
        "outputs": [
            {
                "value": 15.31876939,
                "index": 0,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 13d09c8e09eff577b2449c39d9137e33a41b5de0 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a91413d09c8e09eff577b2449c39d9137e33a41b5de088ac"
                },
                "addresses": [
                    "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi"
                ]
            },
            {
                "value": 1.68,
                "index": 1,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 b478653619cbcf47a153fa97c49f8f390b7ccd5c OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914b478653619cbcf47a153fa97c49f8f390b7ccd5c88ac"
                },
                "addresses": [
                    "LbgC7xYk6NPE3tGDgSgDRaTo51BNbQpHBG"
                ]
            }
        ],
        "total_output": 16.99876939,
        "input_count": 1,
        "output_count": 2,
        "fee": 0.00023061,
        "fee_per_kb": 0.0010204,
        "locktime": 0,
        "block_hash": "1089f7ab28615b089a11068847392ff92bc27cb4836880f4c6477fbd7108a57c",
        "block_height": 1245873,
        "datetime": "2017-07-24T11:22:48+00:00",
        "timestamp": 1500895368,
        "confirmations": 736202
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Send the amount to a specific address.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/sendtoaddress

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to transfer coin to

Body Parameters

Parameter Type Default Description
password string --- If the wallet is loaded, you can create a transaction with your password.
wif string --- This value is mandatory if the wallet is not loaded. Issued when the wallet is created.
kbfee double --- Fee per kb
address* string --- Address to receive coin
amount* double --- Amount to send
subtractfeefromamount boolean false If this value is true, the fee is deducted from the amount to be sent.

Response

Transaction Object

Wallet multi-coin transfer

curl -X POST 'https://api.blocksdk.com/v2/ltc/wallets/125/sendtoaddress' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token' \
    -d '{
        "wif" : "TBHfZFzpqNUfb165r5CoyznEM2N5nniH8kShxiy4KQp1MfdKzgA5",
        "to" : { 
            "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi" : 15.31876939
        }
    }'  
$tx = $ltcClient->sendMany([
    "wallet_id" => 125,
    "wif" => "abcdefg",
    "to" => [
        "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi" => 15.31876939
    ],
]);

or

$tx = $ltcClient->sendMany([
    "wallet_id" => 125,
    "password" => "abcdefg",
    "to" => [
        "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi" => 15.31876939
    ]
]);
var tx = ltcClient.sendMany({
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    },
})

or

var tx = ltcClient.sendMany({
    "wallet_id" : 125,
    "password" : "abcdefg",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    }
})
tx = ltcClient.sendMany({
    "wallet_id" => 125,
    "wif" => "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "to" => {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" => 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" => 0.00006840
    },
})

or

tx = ltcClient.sendMany({
    "wallet_id" => 125,
    "password" => "abcdefg",
    "to" => {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" => 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" => 0.00006840
    }
})
tx = ltcClient.sendMany({
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    },
})

or

tx = ltcClient.sendMany({
    "wallet_id" : 125,
    "password" : "abcdefg",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    }
})
tx := ltcClient.SendMany(map[string]interface{}{
    "wallet_id" : 125,
    "wif" : "L5PGqGxSA7zTyHdNSVCKN8jzt3RKz9nn2KvUjdzyfsW1Czvqu5BG",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    }
})

or

tx := ltcClient.SendMany(map[string]interface{}{
    "wallet_id" : 125,
    "password" : "abcdefg",
    "to" : {
        "1KWbGyMn9MMwQSRLYtWqszcpNST9TqC1vg" : 0.0001,
        "1AxZmuy1kMK4VXQzGuvzQNmqP2s9mS9vBu" : 0.00006840
    }
})

Response Body

{
    "payload": {
        "txid": "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef",
        "version": 1,
        "size": 226,
        "inputs": [
            {
                "txid": "ef53387a388cbe7cc1bab6de214633414e7c792e177a8af00f463882a372e776",
                "output_index": 3,
                "script": {
                    "ams": "3045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f444301 033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0",
                    "hex": "483045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f44430121033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0"
                },
                "addresses": [
                    "LLcFVYxTrR1vfL5m1tL8eLKExzbfjuadWc"
                ],
                "value": 16.999
            }
        ],
        "total_input": 16.999,
        "outputs": [
            {
                "value": 15.31876939,
                "index": 0,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 13d09c8e09eff577b2449c39d9137e33a41b5de0 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a91413d09c8e09eff577b2449c39d9137e33a41b5de088ac"
                },
                "addresses": [
                    "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi"
                ]
            },
            {
                "value": 1.68,
                "index": 1,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 b478653619cbcf47a153fa97c49f8f390b7ccd5c OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914b478653619cbcf47a153fa97c49f8f390b7ccd5c88ac"
                },
                "addresses": [
                    "LbgC7xYk6NPE3tGDgSgDRaTo51BNbQpHBG"
                ]
            }
        ],
        "total_output": 16.99876939,
        "input_count": 1,
        "output_count": 2,
        "fee": 0.00023061,
        "fee_per_kb": 0.0010204,
        "locktime": 0,
        "block_hash": "1089f7ab28615b089a11068847392ff92bc27cb4836880f4c6477fbd7108a57c",
        "block_height": 1245873,
        "datetime": "2017-07-24T11:22:48+00:00",
        "timestamp": 1500895368,
        "confirmations": 736202
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Send money to multiple addresses.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/wallets/<wallet_id>/sendmany

URL Parameters

Parameter Type Description
wallet_id* int Wallet ID to transfer coin to

Body Parameters

Parameter Type Default Description
password string --- If the wallet is loaded, you can create a transaction with your password.
wif string --- This value is mandatory if the wallet is not loaded. Issued when the wallet is created.
kbfee double --- Fee per kb
to* object --- List of address and amount to receive the amount
subtractfeefromamount boolean false If this value is true, the fee is deducted from the amount to be sent.

to Sample

` {

"1CK6KHY6MHgYvmRQ4PAafKYDrg1ejbH1cE" : 0.0012 ,

"3L6ySzGMtkEGdZpE31fXzkDmc5aZ7w1Hcf" : 0.031

} `

Response

Transaction Object

Send Transaction

curl -X POST 'https://api.blocksdk.com/v2/ltc/transactions/send' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token' \
    -d '{
        "hex" : "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
    }'  
$tx = $ltcClient->sendTransaction([
    "hex" => "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
]);
var tx = ltcClient.sendTransaction({
    "hex" : "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
})
tx = ltcClient.sendTransaction({
    "hex" => "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
})
tx = ltcClient.sendTransaction({
    "hex" : "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
})
tx := ltcClient.SendTransaction(map[string]interface{}{
    "hex" : "010000000001020f97230a629600ef2ce03116f910b172248b54a1c006fb0ee5999aab03a0a11000000000171600142a7466cd986288292aa43a2c9e4874c6f2f9a7ccffffffff0e65c24edd64b6ecf75cccb8329c5975ea3011d91219127ccd6741ba583253a30000000017160014760c51588eebf1d9f26c81335c70c42aea4f1a59ffffffff0210270000000000001976a914cb0af04acb1be057e1172119b94383f4653fa3b788acb81a0000000000001976a9146d3b5e5d8d8bd035ce785d3bb27c332d7cfced1c88ac02483045022100fe68240f0531038b8834025abd4d9338d7bbc0095f9f9301e0f02e159aa033e1022068edeae31080b32106a59cef92445c78e296797d8c4af193a0f5eaef1588f9c4012103508333612a63bd0b26bb9814bc1cfb53d8e2a3f1f237171e33223a8eeaa7da6f02483045022100acad6d184ac1dfd04ea335039ed329e79b76668cb90609fbabd8b3d6442e4c7d0220460961d945286f698e234000fb42e10dc4be566eac949c82060897a3c546137c0121027960d1c0511bcf5722afea96adb1c59aa584b48cdb88b802e0ead360e73a130a00000000"
})

Response Body

{
    "payload": {
        "txid": "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef",
        "version": 1,
        "size": 226,
        "inputs": [
            {
                "txid": "ef53387a388cbe7cc1bab6de214633414e7c792e177a8af00f463882a372e776",
                "output_index": 3,
                "script": {
                    "ams": "3045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f444301 033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0",
                    "hex": "483045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f44430121033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0"
                },
                "addresses": [
                    "LLcFVYxTrR1vfL5m1tL8eLKExzbfjuadWc"
                ],
                "value": 16.999
            }
        ],
        "total_input": 16.999,
        "outputs": [
            {
                "value": 15.31876939,
                "index": 0,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 13d09c8e09eff577b2449c39d9137e33a41b5de0 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a91413d09c8e09eff577b2449c39d9137e33a41b5de088ac"
                },
                "addresses": [
                    "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi"
                ]
            },
            {
                "value": 1.68,
                "index": 1,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 b478653619cbcf47a153fa97c49f8f390b7ccd5c OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914b478653619cbcf47a153fa97c49f8f390b7ccd5c88ac"
                },
                "addresses": [
                    "LbgC7xYk6NPE3tGDgSgDRaTo51BNbQpHBG"
                ]
            }
        ],
        "total_output": 16.99876939,
        "input_count": 1,
        "output_count": 2,
        "fee": 0.00023061,
        "fee_per_kb": 0.0010204,
        "locktime": 0,
        "block_hash": "1089f7ab28615b089a11068847392ff92bc27cb4836880f4c6477fbd7108a57c",
        "block_height": 1245873,
        "datetime": "2017-07-24T11:22:48+00:00",
        "timestamp": 1500895368,
        "confirmations": 736202
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Send the signed transaction.

HTTP Request

POST https://api.blocksdk.com/v2/ltc/transactions/send

Body Parameters

Parameter Type Description
hex string Signed transaction hex

Response

Transaction Object

Transaction information

curl -X GET 'https://api.blocksdk.com/v2/ltc/transactions/043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef' \
    -H 'Content-Type: application/json' \
    -H 'X-API-Token: my-api-token'
$tx = $ltcClient->getTransaction([
    "tx_id" => "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef    "
]);
var tx = ltcClient.getTransaction({
    "tx_id" : "b7e98ec27b6fe51a1c1d7fc98ad0dd9c3f5953747901d4d3644fc3fc625c57a1"
})
tx = ltcClient.getTransaction({
    "tx_id" => "b7e98ec27b6fe51a1c1d7fc98ad0dd9c3f5953747901d4d3644fc3fc625c57a1"
})
tx = ltcClient.getTransaction({
    "tx_id" : "b7e98ec27b6fe51a1c1d7fc98ad0dd9c3f5953747901d4d3644fc3fc625c57a1"
})
tx := ltcClient.GetTransaction(map[string]interface{}{
    "tx_id" : "b7e98ec27b6fe51a1c1d7fc98ad0dd9c3f5953747901d4d3644fc3fc625c57a1"
})

Response Body

{
    "payload": {
        "txid": "043c9fa67942d90df478ccac507b580dff0c0bba2eb97c8e47891f81d9568eef",
        "version": 1,
        "size": 226,
        "inputs": [
            {
                "txid": "ef53387a388cbe7cc1bab6de214633414e7c792e177a8af00f463882a372e776",
                "output_index": 3,
                "script": {
                    "ams": "3045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f444301 033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0",
                    "hex": "483045022100cf5d41fe311b54742bed8cdeb7d5a2bed6708b0224bf1d651e28b2305097c34202200808a38fdb4d1c83cf17e3ed9958bd57e301af559c5864ba2ff1e5b0981f44430121033e8ed3e4a83aa289fc7a9509e8ea557b3d0df8fc15bd263609a7b86a8c58abb0"
                },
                "addresses": [
                    "LLcFVYxTrR1vfL5m1tL8eLKExzbfjuadWc"
                ],
                "value": 16.999
            }
        ],
        "total_input": 16.999,
        "outputs": [
            {
                "value": 15.31876939,
                "index": 0,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 13d09c8e09eff577b2449c39d9137e33a41b5de0 OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a91413d09c8e09eff577b2449c39d9137e33a41b5de088ac"
                },
                "addresses": [
                    "LM2j1SafrnyXbZSWPNZ7dFrxM6BrrghvGi"
                ]
            },
            {
                "value": 1.68,
                "index": 1,
                "script": {
                    "type": "pubkeyhash",
                    "asm": "OP_DUP OP_HASH160 b478653619cbcf47a153fa97c49f8f390b7ccd5c OP_EQUALVERIFY OP_CHECKSIG",
                    "hex": "76a914b478653619cbcf47a153fa97c49f8f390b7ccd5c88ac"
                },
                "addresses": [
                    "LbgC7xYk6NPE3tGDgSgDRaTo51BNbQpHBG"
                ]
            }
        ],
        "total_output": 16.99876939,
        "input_count": 1,
        "output_count": 2,
        "fee": 0.00023061,
        "fee_per_kb": 0.0010204,
        "locktime": 0,
        "block_hash": "1089f7ab28615b089a11068847392ff92bc27cb4836880f4c6477fbd7108a57c",
        "block_height": 1245873,
        "datetime": "2017-07-24T11:22:48+00:00",
        "timestamp": 1500895368,
        "confirmations": 736202
    },
    "state": {
        "code": 200,
        "success": true
    }
}

Info

Return information for a specific transaction.

HTTP Request

GET https://api.blocksdk.com/v2/ltc/transactions/<tx_id>

URL Parameters

Parameter Type Description
tx_id string Transaction hash or transaction ID to return transaction information

Response

Transaction Object

Transaction Object

Variable Type Description
txid string Transaction id,Transaction Hash
version int Transaction version
size int Transaction size
inputs array[object] List of transactions used
total_input double Total amount of transactions used
outputs array[object] List of transactions received
total_output double Total amount of transactions received
input_count int Number of transactions used
output_count int Number of transactions received
fee double Fees used in the transaction
fee_per_kb double Fee per kb unit
locktime int Block height to be unlocked
block_hash string Hash of the block containing the transaction
block_height string The height of the block containing the transaction
datetime string Date and time the transaction was created
timestamp int Date and time the transaction was created

Input Object

Variable Type Description
txid string Previous transaction id, transaction hash
output_index int Previous transaction output number
script object Signature script
addresses array Address received from previous transaction
value double Amount received from previous transaction

Output Object

Variable Type Description
value double Amount to receive
index index Transaction Output number
script object Receive Address Script
addresses array receiving address