Litecoin just launched on Amberdata.io!

Trevor Clarke
Oct 18, 2019 · 4 min read

The blockchain masterpiece from Charlie Lee is now supported in Amberdata’s platform with full features including RPC, REST and Websockets.

What is Litecoin, and how is it different from bitcoin?

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.

Key differences in Litecoin vs. Bitcoin:

  1. Proof of Work algorithm uses Scrypt instead of SHA-256
    Noted in the announcement: “We really liked Tenebrix’s Scrypt proof of work. Using Scrypt allows one to mine Litecoin while also mining Bitcoin”. Litecoin is meant to be a lower barrier to entry, making it an affordable governance model.

Litecoin is now part of Amberdata.io

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!

Amberdata platform features supporting Litecoin:

  1. REST — A full API with standardized data sets, across blockchains

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.

How would we…

  • Connect to Litecoin?

Adding Litecoin is simple:

For developers, enable Litecoin with a simple variable!

1. Get your Free API Key

Go to Amberdata.io to Get Started.

2. Make your first request — Account Balance

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.

Add our SDK, Web3data.js

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:

View the SDK docs here →

Now that you have your API key handy, follow me to the next couple examples:

Try the basics, and the extras — Blocks & Transactions

Go here to test in action →

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 →

Get account transaction updates with Websockets

Go here to test in action →

const Web3Data = require("web3data-js")
const w3d = new Web3Data('YOUR_API_KEY', {
blockchainId: "f94be61fd9f4fa684f992ddfd4e92272"
})
// Initialize the connection
w3d.connect()
// Subscribes to address transaction events
w3d.on({
eventName: 'address:transactions',
filters: {address: "Lbuzsisqmp8KyxuotRa8QUz5owr2cVMJGL"}
}, transaction => {
// Log the transaction data
console.log(transaction)
// Terminate the socket connection
w3d.disconnect()
})

Using RPC to send & receive Litecoin data

Go here to test in action →

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!

Get postman collection for easy API testing

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:


amberdata

Amberdata is the leading data infrastructure for blockchain and digital assets. The API empowers our customer to build decentralized applications, backtest trading strategies, gain actionable insights and accelerate time to market for their digital asset and blockchain offering

Trevor Clarke

Written by

VP of Product - Amberdata.io, Passionate Software Engineer 🤓, Hobbyist in 3D Design & Robotics

amberdata

amberdata

Amberdata is the leading data infrastructure for blockchain and digital assets. The API empowers our customer to build decentralized applications, backtest trading strategies, gain actionable insights and accelerate time to market for their digital asset and blockchain offering

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade