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.
Examples of working with the Litecoin blockchain can be found in Tatum LTC SDK.
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
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
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.

SecurityX-API-Key
Request
Request Body schema: application/json
required
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
{ }
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
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
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
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
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
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
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.'
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
Response samples
application/json
{
  • "hash": "5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a",
  • "witnessHash": "d819688a3ac77cb6d2751808e5411baf7e20fa3eeeccf65867554a09beddd9a3",
  • "fee": "0.00001682",
  • "rate": "0.00010011",
  • "ps": 1572703011,
  • "blockNumber": 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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.'
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
Response samples
application/json
[
  • "4c7846a8ff8415945e96937dea27bdb3144c15d793648d725602784826052586"
]

Get Litecoin Transactions by address

5 credits per API call.


Get Litecoin Transaction by address.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.'
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
txType
string

Type of the transaction to fetch - either incoming, or outgoing. If none is present - all transactions are fetched.

Enum: "incoming" "outgoing"
Example: txType=incoming
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
Response samples
application/json
[
  • {
    }
]

Get the balance of a Litecoin address

5 credits per API call.


Get Litecoin Balance of the address.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.'
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
Response samples
application/json
{
  • "incoming": "0.1234",
  • "outgoing": "0.1",
  • "incomingPending": "0.0004",
  • "outgoingPending": "0.05"
}

Get the balance of multiple Litecoin addresses

50 credits per API call

Get the balance of multiple Litecoin addresses, up to 30.

The API returns the balance only if the address has up to 50,000 UTXOs (Unspent Transaction Outputs). For an address with more than 50,000 UTXOs, the API returns an error with the 403 response code.

SecurityX-API-Key
Request
query Parameters
addresses
required
string

The blockchain addresses separated by comma to get the balances for

Example: addresses=2MsM67NLa71fHvTUBqNENW15P68nHB2vVXb,2MsM67NLa71fHvTUBqNENW15P68nHB2vVXb
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 perform the required operation due to a 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/batch
Request samples
Response samples
application/json
[
  • {
    }
]

Get information about a transaction output (UTXO) in a Litecoin transaction

5 credits per API call

Get information about a transaction output in a transaction and check whether this output is a UTXO or has been spent.

"UTXO" stands for "Unspent Transaction Output". A UTXO is the amount of LTC that remains at a Litecoin address after a cryptocurrency transaction involving this address has been performed. The UTXO can then be used as input for a new cryptocurrency transaction. For more information the UTXO, see the Bitcoin user documentation.

  • If the transaction output is an UTXO, the API returns data about it.
  • If the transaction output has been spent and there is no UTXO to return, the API returns an error with the 404 response code.

Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
SecurityX-API-Key
Request
path Parameters
hash
required
string = 64 characters

The transaction hash

Example: 5f83d51c8d3054012cea3011fa626b85d89442788721afd60719ab1f9ab8f78a
index
required
number >= 0

The index of the transaction output that you want to check for the UTXO

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
Response samples
application/json
{
  • "version": 2,
  • "height": 1233224,
  • "value": 30000000,
  • "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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
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
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.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
SecurityX-API-Key
Request
Request Body schema: application/json
required
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 LTC to Litecoin addresses

10 credits per API call

Send LTC to blockchain addresses.

Litecoin transactions are based on UTXOs. "UTXO" stands for "Unspent Transaction Output". A UTXO is the amount of LTC that remains at a Litecoin address after a cryptocurrency transaction involving this address has been performed. The UTXO can then be used as input for a new cryptocurrency transaction. For more information about the UTXO, see the Bitcoin user documentation. To check UTXOs in a transaction, see the API for getting information about a transaction output (UTXO) in a Litecoin transaction.

You can build a LTC transaction by one of the following methods:

  • Sending LTC from blockchain addresses
    The assets are sent from a list of addresses. For each address, the last 100 transactions are scanned for any UTXO to be included in the transaction. For easier control over the assets to be sent, we recommend that you use this method only if you have one address to send the assets from.
    To use this method, use the LtcTransactionAddress or LtcTransactionAddressKMS schema of the request body.
  • Sending LTC from UTXOs
    The assets are sent from a list of UTXOs. Each UTXO is included in the transaction. Use this method if you want to manually calculate the amount to send.
    To use this method, use the LtcTransactionFromUTXO or LtcTransactionFromUTXOKMS schema of the request body.

When an UTXO is entered into a transaction, the whole UTXO amount is included and must be spent. For example, address A receives two transactions, T1 with 1 LTC and T2 with 2 LTC. A transaction that consumes the UTXOs from both T1 and T2 will have an available amount of 3 LTC to spend:
1 LTC (from T1) + 2 LTC (from T2) = 3 LTC (to spend in total)

You can send the assets to one or multiple recipients in one transaction. If you send the assets to multiple addresses, each address must have its own amount to receive.

Paying the gas fee and receiving the change
When the amount that the recipients should receive is lower than the amount from the UTXOs, the difference between these two amounts is by default used as the gas fee for the transaction. Because this amount may be considerable and you may not want to spend it all on the gas fee, you can explicitly specify the fee amount and the blockchain address where any extra funds remaining after covering the fee will be sent (the fee and changeAddress parameters in the request body, correspondingly).

Signing a transaction
When sending LTC, you are charged a fee for the transaction, and you must sign the transaction with the private key of the blockchain address from which the fee will be deducted.

Providing the private key in the API is not a secure way of signing transactions, because the private key can be stolen or exposed. Your private keys should never leave your security perimeter. You should use the private keys only for testing a solution you are building on the testnet of a blockchain.

For signing transactions on the mainnet, we strongly recommend that you use the Tatum Key Management System (KMS) and provide the signature ID instead of the private key in the API. Alternatively, you can use the Tatum JavaScript client.


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
SecurityX-API-Key
Request
Request Body schema: application/json
required
One of:
required
Array of objects

The array of blockchain addresses to send the assets from and their private keys. For each address, the last 100 transactions are scanned for any UTXO to be included in the transaction.

Array
address
required
string [ 30 .. 50 ]

The blockchain address to send the assets from

privateKey
required
string [ 52 .. 52 ]

The private key of the address to send the assets from

required
Array of objects

The array of blockchain addresses to send the assets to and the amounts that each address should receive (in LTC). The difference between the UTXOs calculated in the fromAddress section and the total amount to receive calculated in the to section will be used as the gas fee. To explicitly specify the fee amount and the blockchain address where any extra funds remaining after covering the fee will be sent, set the fee and changeAddress parameters.

Array
address
required
string [ 30 .. 60 ]

The blockchain address to receive the assets

value
required
number >= 0

The amount to receive (in LTC)

fee
string

The fee to be paid for the transaction (in LTC); if you are using this parameter, you have to also use the changeAddress parameter because these two parameters only work together.

changeAddress
string [ 30 .. 60 ]

The blockchain address to send any extra assets remaning after covering the fee to; if you are using this parameter, you have to also use the fee parameter because these two parameters only work together.

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"
}

Broadcast signed Litecoin transaction

5 credits per API call.


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


Examples of using this endpoint with the Tatum JS SDK can be found in Tatum LTC SDK.
SecurityX-API-Key
Request
Request Body schema: application/json
required
txData
required
string [ 1 .. 500000 ] characters

Raw signed transaction to be published to network.

signatureId
string <uuid>

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

index
number [ 0 .. 2147483647 ]

(Only if the signature ID is mnemonic-based and you run KMS v6.2 or later) The index of the address to send the assets from that was generated from the mnemonic

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"
}
Response samples
application/json
{
  • "txId": "c83f8818db43d9ba4accfe454aa44fc33123d47a4f89d47b314d6748eb0e9bc9"
}