Created
October 25, 2018 14:04
-
-
Save KolevDarko/62e4d23e3c2dda25c09d319ac8cdac89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install with > pip install bitcoinaverage | |
from bitcoinaverage import TickerWebsocketClientV2 | |
class MyWebsocketClient(TickerWebsocketClientV2): | |
def received_message(self, message): | |
print("Received price update") | |
print(message) | |
if __name__ == '__main__': | |
public_key = 'your_public_key' | |
secret_key = 'your_secret_key' | |
print('Connecting to v2 ticker websocket...') | |
ws = MyWebsocketClient(public_key, secret_key) | |
ws.ticker_data('global', ['BTCUSD', 'XRPUSD', 'ETHEUR']) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment