Develop
Last updated
Last updated
Select the NATS (or SDKs) of your preference. The NATS modern and powerful streaming protocol automatically handles reconnections, message parsing, and more.
Subscriptions
You can subscribe to a single ticker on an Exchange. The topic below would stream you BTC/ETH trades from the Binance cryptocurrency Exchange:
hose.trade.binance.btceth
You can also subscribe 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 Subscriptions
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 cryptocurrency 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 .
Below is some bare-bones example code that will connect and subscribe to Cryptoquote Stream.
You can also find full source code on GitHub: