Litecoin

Litecoin Blockchain enables access to the most commonly used Litecoin methods. These methods bring a small level of abstraction and are used for applications that communicate with the blockchain directly. Some of the methods are used alongside Tatum Private Ledger to connect the blockchain and the private ledger, like wallet generation or getting information about transactions.
Tatum supports 2 chains:

  • Mainnet - a regular live chain
  • Testnet - a chain used for testing purposes. Coins on the test chain have no value and can be obtained from a faucet, e.g. http://testnet.litecointools.com/
Tatum supports BIP44 HD wallets. Because they can generate 2^31 addresses from 1 mnemonic phrase, they are very convenient and secure. It is possible to generate this type of wallet with 1 simple API call.

Generate Litecoin wallet

5 credits per API call.


Tatum supports BIP44 HD wallets. It is very convenient and secure, since it can generate 2^31 addresses from 1 mnemonic phrase. Mnemonic phrase consists of 24 special words in defined order and can restore access to all generated addresses and private keys.
Each address is identified by 3 main values:

  • Private Key - your secret value, which should never be revealed
  • Public Key - public address to be published
  • Derivation index - index of generated address

Tatum follows BIP44 specification and generates for Litecoin wallet with derivation path m'/44'/2'/0'/0. More about BIP44 HD wallets can be found here - https://github.com/litecoin/bips/blob/master/bip-0044.mediawiki. Generate BIP44 compatible Litecoin wallet.

SecurityX-API-Key
Request
query Parameters
mnemonic
string <= 500 characters

Mnemonic to use for generation of extended public and private keys.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/wallet
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/wallet?mnemonic=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse",
  • "xpub": "xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid"
}

JSON RPC HTTP driverDeprecated

2 credits per API call

This endpoint is deprecated. Use the HTTP-based JSON RPC driver instead.


Use this endpoint URL as an http-based JSON RPC driver to connect directly to the node provided by Tatum.

Request
Request Body schema: application/json
jsonrpc
string

Version of the JSON RPC.

id
string

ID of the request, could be any arbitrary identifier.

method
string

Method to invoke on the node.

params
Array of arrays

Params to the method call, if required.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

500

Internal server error. There was an error on the server while processing the request.

post/v3/litecoin/node
Request samples
application/json
{
  • "jsonrpc": "1.0",
  • "id": "test",
  • "method": "getblockcount",
  • "params": [ ]
}
Response samples
application/json
{
  • "jsonrpc": "1.0",
  • "id": "test",
  • "result": 654321
}

Get Litecoin Blockchain Information

5 credits per API call.


Get Litecoin Blockchain Information. Obtain basic info like testnet / mainnet version of the chain, current block number and it's hash.

SecurityX-API-Key
Responses
200

OK

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/info
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/litecoin/info \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "chain": "test",
  • "blocks": 1234314,
  • "headers": 1234314,
  • "bestblockhash": "6178dda07b94becb118f67b21aa72f60d85c1029e9e9b8ae56a25d684de66078",
  • "difficulty": 0.0018856935093586335
}

Get Litecoin Block hash

5 credits per API call.


Get Litecoin Block hash. Returns hash of the block to get the block detail.

SecurityX-API-Key
Request
path Parameters
i
required
number

The number of blocks preceding a particular block on a block chain.

Example: 1234314
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/block/hash/{i}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/block/hash/{i}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "hash": "6178dda07b94becb118f67b21aa72f60d85c1029e9e9b8ae56a25d684de66078"
}

Get Litecoin Block by hash or height

5 credits per API call.


Get Litecoin Block detail by block hash or height.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Block hash or height.

Example: 1234314
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

404

Block not found.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/block/{hash}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/block/{hash}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "hash": "6178dda07b94becb118f67b21aa72f60d85c1029e9e9b8ae56a25d684de66078",
  • "blockNumber": 1234314,
  • "version": 536870912,
  • "prevBlock": "a3047a060e5d586a9b26779ebe62fc57ce7323745da8f28761ab755454d89c52",
  • "merkleRoot": "a1634a42a8e956a5fb5225d06c3af6207e7f6fe5a00fa45229edfd0ddfa587f0",
  • "time": 1572865501,
  • "bits": 503452237,
  • "nonce": 2278594841,
  • "txs": [
    ]
}

Get Litecoin Transaction by hash

5 credits per API call.


Get Litecoin Transaction detail by transaction hash.

SecurityX-API-Key
Request
path Parameters
hash
required
string

Transaction hash

Example: d60631d8e5c8b6eb0557b5181cf28564d771c628a08abc414e87ad7c05ff2fc2
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/transaction/{hash}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/transaction/{hash}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "hash": "5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a",
  • "witnessHash": "d819688a3ac77cb6d2751808e5411baf7e20fa3eeeccf65867554a09beddd9a3",
  • "fee": "0.00001682",
  • "rate": "0.00010011",
  • "ps": 1572703011,
  • "height": 1233224,
  • "block": "b540bf37450eae0fb9fb7f190009ca890f0dd17cb19521c6241a0dc5e70f67dc",
  • "ts": 1572694484,
  • "index": 2,
  • "version": 2,
  • "flag": 1,
  • "inputs": [
    ],
  • "outputs": [
    ],
  • "locktime": 1233222
}

Get Mempool Transactions

1 credit per API call.


Get Litecoin Transaction ids in the mempool.

SecurityX-API-Key
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/mempool
Request samples
curl -i -X GET \
  https://api-eu1.tatum.io/v3/litecoin/mempool \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • "4c7846a8ff8415945e96937dea27bdb3144c15d793648d725602784826052586"
]

Get Litecoin Transactions by address

5 credits per API call.


Get Litecoin Transaction by address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Address

Example: n4YNG8q5JyxkeWf7zMi1bMyRZbRKK1W7or
query Parameters
pageSize
required
number [ 1 .. 50 ]

Max number of items per page is 50.

Example: pageSize=10
offset
number

Offset to obtain next page of the data.

Example: offset=0
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/transaction/address/{address}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/transaction/address/{address}?pageSize=10&offset=0' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Get Litecoin Balance of the address

5 credits per API call.


Get Litecoin Balance of the address.

SecurityX-API-Key
Request
path Parameters
address
required
string

Address

Example: n4YNG8q5JyxkeWf7zMi1bMyRZbRKK1W7or
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/address/balance/{address}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/address/balance/{address}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "incoming": "0.1234",
  • "outgoing": "0.1"
}

Get Litecoin UTXO of Transaction

5 credits per API call.


Get UTXO of given transaction and output index. UTXO means Unspent Transaction Output, which is in blockchain terminology assets, that user received on the specific address and does not spend it yet.
In bitcoin-like blockchains (BTC, LTC, DOGE, BCH), every transaction is built from the list of previously not spent transactions connected to the address. If user owns address A, receives in transaciont T1 10 LTC, he can spend in the next transaction UTXO T1 of total value 10 LTC. User can spend multiple UTXOs from different addresses in 1 transaction.
If UTXO is not spent, data are returned, otherwise 404 error code.

SecurityX-API-Key
Request
path Parameters
hash
required
string = 64 characters

TX Hash

Example: 5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a
index
required
number >= 0

Index of tx output to check if spent or not

Example: 0
Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/utxo/{hash}/{index}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/utxo/{hash}/{index}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "version": 2,
  • "height": 1233224,
  • "value": "0.0015",
  • "script": "76a914fc8f50c952da910f473a0533561311ad140c989b88ac",
  • "address": "n4YNG8q5JyxkeWf7zMi1bMyRZbRKK1W7or",
  • "coinbase": false,
  • "hash": "5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a",
  • "index": 0
}

Generate Litecoin deposit address from Extended public key

5 credits per API call.


Generate Litecoin deposit address from Extended public key. Deposit address is generated for the specific index - each extended public key can generate up to 2^31 addresses starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
path Parameters
xpub
required
string

Extended public key of wallet.

Example: xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid
index
required
number

Derivation index of desired address to be generated.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

get/v3/litecoin/address/{xpub}/{index}
Request samples
curl -i -X GET \
  'https://api-eu1.tatum.io/v3/litecoin/address/{xpub}/{index}' \
  -H 'x-api-key: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "address": "n36h3pAH7sC3z8KMB47BjbqvW2aJd2oTi7"
}

Generate Litecoin private key

5 credits per API call.


Generate private key for address from mnemonic for given derivation path index. Private key is generated for the specific index - each mnemonic can generate up to 2^32 private keys starting from index 0 until 2^31 - 1.

SecurityX-API-Key
Request
Request Body schema: application/json
index
required
integer <= 2147483647

Derivation index of private key to generate.

mnemonic
required
string [ 1 .. 500 ] characters

Mnemonic to generate private key from.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/litecoin/wallet/priv
Request samples
application/json
{
  • "index": 0,
  • "mnemonic": "urge pulp usage sister evidence arrest palm math please chief egg abuse"
}
Response samples
application/json
{
  • "key": "cTmS2jBWXgFaXZ2xG9jhn67TiyTshnMp3UedamzEhGm6BZV1vLgQ"
}

Send Litecoin to blockchain addresses

10 credits per API call.


Send Litecoin to blockchain addresses. It is possible to build a blockchain transaction in 2 ways:

  • fromAddress - assets will be sent from the list of addresses. For each of the addresses last 100 transactions will be scanned for any unspent UTXO and will be included in the transaction.
  • fromUTXO - assets will be sent from the list of unspent UTXOs. Each of the UTXO will be included in the transaction.
In bitcoin-like blockchains, the transaction is created from the list of previously not spent UTXO. Every UTXO contains the number of funds, which can be spent. When the UTXO enters into the transaction, the whole amount is included and must be spent. For example, address A receives 2 transactions, T1 with 1 LTC and T2 with 2 LTC. The transaction, which will consume UTXOs for T1 and T2, will have available amount to spent 3 LTC = 1 LTC (T1) + 2 LTC(T2).

There can be multiple recipients of the transactions, not only one. In the to section, every recipient address has it's corresponding amount. When the amount of funds, that should receive the recipient is lower than the number of funds from the UTXOs, the difference is used as a transaction fee.

This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and losing funds. In this method, it is possible to enter privateKey or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

SecurityX-API-Key
Request
Request Body schema: application/json
One of:
required
Array of objects

Array of addresses and corresponding private keys. Tatum will automatically scan last 100 transactions for each address and will use all of the unspent values. We advise to use this option if you have 1 address per 1 transaction only.

Array
address
required
string [ 30 .. 50 ]

Address to send assets from.

privateKey
required
string [ 52 .. 52 ]

Private key of the address to send assets from. Private key, or signature Id must be present.

required
Array of objects

Array of addresses and values to send Litecoins to. Values must be set in LTC. Difference between from and to is transaction fee.

Array
address
required
string [ 30 .. 60 ]

Destination address.

value
required
number >= 0

Amount to be sent, in LTC.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/litecoin/transaction
Request samples
application/json
{
  • "fromAddress": [
    ],
  • "to": [
    ]
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}

Broadcast signed Litecoin transaction

5 credits per API call.


Broadcast signed transaction to Litecoin blockchain. This method is used internally from Tatum KMS, Tatum Middleware or Tatum client libraries. It is possible to create custom signing mechanism and use this method only for broadcasting data to the blockchian.

SecurityX-API-Key
Request
Request Body schema: application/json
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

signatureId
string <uuid> = 36 characters

ID of prepared payment template to sign. Required only, when broadcasting transaction signed by Tatum KMS.

Responses
200

OK

400

Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.

401

Unauthorized. Not valid or inactive subscription key present in the HTTP Header.

403

Forbidden. The request is authenticated, but it is not possible to required perform operation due to logical error or invalid permissions.

500

Internal server error. There was an error on the server while processing the request.

post/v3/litecoin/broadcast
Request samples
application/json
{
  • "txData": "62BD544D1B9031EFC330A3E855CC3A0D51CA5131455C1AB3BCAC6D243F65460D",
  • "signatureId": "1f7f7c0c-3906-4aa1-9dfe-4b67c43918f6"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9",
  • "failed": false
}