CryptoQuote Stream

The Stream infrastructure is based on NATS allowing you to subscribe based on topic and interest. For example, you can subscribe to all trade messages for all cryptocurrency Exchanges, trade messages for a single market on a single Exchange, or even trade messages for a single market pair across all Exchanges.

NATS has clients (or SDKs) that cover all modern programming languages. The NATS clients will automatically handle reconnections, message parsing, and more - making for a smaller amount of development overhead for your project.

Contact us at [email protected] to get your username:password for streaming data access

You can check out CryptoQuote Stream in the browser using this example.

The base topics are as follows:

  • hose.trade
  • hose.ticker
  • hose.book_update
  • Note: Some exchanges only support a subset of the above topics.


    Subscriptions

    You can subscribe to a single ticker on an Exchange. The topic below would stream you BTC/ETH trades from the Binance crypto Exchange:

  • hose.trade.binance.btceth
  • You can also subcribe to a market for all exchanges:

  • hose.trade.*.btcusd
  • Given the above topic, you would receive all trades for BTC/USD for all supported Exchanges.

    Note: all topic strings must be in lowercase


    Exchange Subscription

    One of the more powerful features of CryptoQuote Stream is the ability to subscribe to a full exchange. The topic below streams all trades from the Binance crypto Exchange:

  • hose.trade.binance.*

  • All Trades

    To subscribe to all trade messages for all exchanges, your topic would be:

  • hose.trade.>
  • You can read more about NATS subscription wildcards here.

    Example Code

    Below is some bare-bones example code that will connect and subscribe to CryptoQuote Stream.

    You can also find full source code on GitHub: https://github.com/cryptoquote/firehose-examples