Lightning is an extremely powerful technology to align incentives for digital resources such as APIs. Last June, BitMEX — one of the world’s largest cryptocurrency exchanges — announced that data was dropped from their websocket api because of system overload.

Currently exchanges give away their market data for free. When you look at this initially, you think this is great! Everyone has equal access to market data. However the closer you look at it, you realize not all users should be valued the same. A BitMEX customer that is trading millions of dollars a day via their API should be treated differently than someone who is doing nothing with the data.

A great way to distinguish between customers that are doing something useful with an API and people that are wasting resources is charging for access to the API. This makes sure users of the API have some “skin in the game” and aren’t wasting an exchange’s resources for no purpose. You can charge relatively small amounts of money to start aligning incentives. For instance, we charge $0.0001 per minute.

Lightning is a great tool for this. It retains the open permissionless nature of cryptocurrency APIs while simultaneously aligning incentives. At Suredbits have set up a websocket playground to demo what this looks like with cryptocurrency exchange’s APIs. You can pay a Lightning invoice and subscribe to a websocket for an arbitrary amount of time. You can even get a refund for market data you don’t use if you need to terminate your subscription early.

A common tool exchanges use to prevent overload of system resources for their market data APIs is rate limiting. We have run into this building our backend systems at Suredbits. We recently implemented EUR trading pairs in our API. We now support 39 trading pairs across 7 exchanges. Since we subscribe to so many trading pairs for these various exchanges, we have begun to run up against artificial rate limiting.

Rate limiting is counter productive in a world with Lightning, as you can charge for access to your API rather than turning customers away at the door. An analogy in the physical world would be a very popular bar. If your bar is very popular and can’t fit capacity you have two options:

  1. Arbitrarily turn people away  
  2. Charge customers a cover fee for access to the bar

It is obvious why most bars choose option 2. They make more revenue and the experience for the paying customer is better! No one likes an overcrowded bar.

The same thing applies with Lightning. Currently exchanges like Kraken are choosing to arbitrarily turn people away rather than charging a “cover fee” for access to their API. This leads to “overcrowding” of their market data APIs and suboptimal user experience for customers that are trying to trade, especially programmatically, via their API.

Contact us @Suredbits.

Contact Chris @Chris_Stewart_5


All of our API services are built using Lightning technology and the Lightning Network. All API services are live on Bitcoin’s mainnet. Our fully customizable data service allows customers to stream as much or as little data as they wish and pay using bitcoin.

You can connect to our Lightning node at the url:

038bdb5538a4e415c42f8fb09750729752c1a1800d321f4bb056a9f582569fbf8e@ln.suredbits.com

To learn more about how our Lightning APIs work please visit our API documentation or checkout our new websocket playground to start exploring custom data feeds.

If you are a company or cryptocurrency exchange interested in learning more about how Lightning can help grow your business, contact us  at [email protected].