The blockchain masterpiece from Charlie Lee is now supported in Amberdata’s platform with full features including RPC, REST and Websockets.
Litecoin was first announced October 9th 2011 as an alternative cryptocurrency, a digital asset that could be used in conjunction with Bitcoin and utilize lower hardware requirements. While many people assume Litecoin is just a quick clone of Bitcoin, there are actually practical differences that make this a substantial asset.
We’re thrilled to announce that Litecoin joins our blockchain offering! We see Litecoin as a great addition to the platform as it enables business to focus on their core features, allows users to maintain self-sovereignty and broadens use-cases for greater market accessibility. With all the features you’ve come to love and enjoy, Litecoin is no longer a new set of tools and protocol, it’s part of a unified set of APIs!
Use Litecoin today — No syncing required, no cli, no protocol learning curve, no dev-ops or server management (All of which can cost hundreds to thousands per month), add Litecoin within minutes.
For developers, enable Litecoin with a simple variable!
Go to Amberdata.io to Get Started.
Get account balance by using our documentation directly. Next, go to this page in our documentation. Copy your Amberdata API key to clipboard, and paste it into the “Header Auth” box:
Add Amberdata API to make a request
Add the Litecoin address “MPLtCqK2X4hvcAdiHFMvXZsmfZmQSn9ABV” to the “hash” parameter.
Lastly, add the Litecoin blockchain Id “f94be61fd9f4fa684f992ddfd4e92272” to the x-amberdata-blockchain-id
input:
Add Litecoin blockchain ID
Click “Try It”. Now you can see account balance data for this address.
The above steps were cool, but we’ve made things a lot simpler! Using the web3data.js SDK, you can get blockchain & market data directly without having to learn our API. Fortunately, we have a full setup guide here:
Now that you have your API key handy, follow me to the next couple examples:
const Web3Data = require("web3data-js")const w3d = new Web3Data('YOUR_API_KEY')const latestBlock = await w3d.ltc.block.getBlocks()const latestBlockTxns = await w3d.ltc.block.getTransactions(597875, {includePrice: true})
NEXT — Get Account Balance with Market Value →
const Web3Data = require("web3data-js")const w3d = new Web3Data('YOUR_API_KEY', { blockchainId: "f94be61fd9f4fa684f992ddfd4e92272"})// Initialize the connectionw3d.connect()// Subscribes to address transaction eventsw3d.on({ eventName: 'address:transactions', filters: {address: "Lbuzsisqmp8KyxuotRa8QUz5owr2cVMJGL"}}, transaction => {// Log the transaction data console.log(transaction)// Terminate the socket connection w3d.disconnect()})
const Web3Data = require("web3data-js")const w3d = new Web3Data('YOUR_API_KEY')const bestBlockHash = await w3d.ltc.rpc('getbestblockhash')
Web3data supports everything Litecoin within the namespace .ltc
— making things super simple to add to your application!
For ongoing development, we’ve created a postman collection that covers all of our features and utilizes simple parameters so you can focus on building. Click here to download the collection directly, or go here for tons of resources: