We’ve been working diligently to build our first consolidated cryptocurrency exchange API for the Lightning Network.

We wanted to provide a quick update on where things are to date. We are doing this iteratively. We are very close to having streaming tickers data available.

Here is an example of opening a lightning request for “tickers” channel. You open a standard lightning node connection with Suredbits API :

{“message”:”Welcome to the SuredBits Exchange API!”,”ln_uri”:”0338f57e4e20abf4d5c86b71b59e995ce4378e373b021a7b6f41dabb42d3aad069@ln.test.suredbits.com”,”version”:0,”openChannels”:”tickers”}

{
“event”: “subscribe”,
“channel”: “tickers”,
“symbol”: “BTCUSD”,
“exchange”: “bitfinex”,
“duration”: 21000,
“refundInvoice”: “lnbcrt1pdec3u6pp5u2mf5ee9k0ht20x7jd98cfgv7ulyq4h6tgxu6eulv55x3yf6vyjqdq82fz5v4gxqrrsszseffx85jnukzwv70mc69dru07207zuucrfc5djta3gnfaxfyvf54z96kgprtlurm0qk9lcdampepsvj333yqu0y4fq5tsv3m3u7qnqpgxs29u”,
“uuid”: “00112233–4455–6677–8899-aabbccddeeff”
}

Here is the lightning invoice being sent and received:

{“uuid”:”00112233–4455–6677–8899-aabbccddeeff”,”invoice”:”lnbcrt210n1pdec3agpp5a45lv7wejv6rpkht2yert3w8y2dfx67lkmul7322z9tzqx5ja89sdqqxqrrsslvdst5yqrlafpt0x4fjnp6cujdwen48e3jsace64g8g32a2exaaksuz3pjzryr80pcl793wd8x0rq67l2vm7qs5smvhy9juaf593xscqdvkmzv”}

{“uuid”:”00112233–4455–6677–8899-aabbccddeeff”,”exchange”:”bitfinex”,”symbol”:”BTCUSD”,”duration”:21000,”event”:”subscribed”}

And the data for BTCUSD being delivered:

{“uuid”:”00112233–4455–6677–8899-aabbccddeeff”,”data”:{“bid”:6493.3,”bidSize”:34.6451369,”ask”:6493.4,”askSize”:36.73343916,”dailyChange”:-5.9246668,”dailyChangePerc”:-0.0009,”lastPrice”:6493.4,”volume”:16551.06940674,”high”:6596.5,”low”:6355.2}}

To watch it play out, check out this quick walkthrough: