|
4 | 4 | # /examples/ticker_updates.py |
5 | 5 | # Stanislav Lazarov |
6 | 6 |
|
7 | | -# Sample script to show how subscribe_to_exchange_deltas() works. |
| 7 | +# Sample script showing how subscribe_to_exchange_deltas() works. |
| 8 | + |
8 | 9 | # Overview: |
9 | | -# Creates a custom ticker_updates_container dict. |
10 | | -# Subscribes to N tickers to get their general information. |
11 | | -# When information is received, checks if the ticker is |
12 | | -# in ticker_updates_container and adds it if not. |
13 | | -# Disconnects when it has the information for each ticker. |
| 10 | +# --------- |
| 11 | +# 1) Creates a custom ticker_updates_container dict. |
| 12 | +# 2) Subscribes to N tickers to get their general information. |
| 13 | +# 3) When information is received, checks if the ticker is |
| 14 | +# in ticker_updates_container and adds it if not. |
| 15 | +# 4) Disconnects when it has the information for each ticker. |
14 | 16 |
|
15 | 17 | from bittrex_websocket.websocket_client import BittrexSocket |
16 | 18 | from time import sleep |
@@ -42,8 +44,8 @@ async def on_public(self, msg): |
42 | 44 | sleep(0.01) |
43 | 45 | ws.subscribe_to_exchange_deltas([ticker]) |
44 | 46 |
|
45 | | - # Users can also subscribe without introducing delays in invoking but |
46 | | - # it is recommended when you are subscribing to a large list of tickers. |
| 47 | + # Users can also subscribe without introducing delays during invoking but |
| 48 | + # it is the recommended way when you are subscribing to a large list of tickers. |
47 | 49 | # ws.subscribe_to_exchange_deltas(tickers) |
48 | 50 |
|
49 | 51 | while len(ws.ticker_updates_container) < len(tickers): |
|
0 commit comments