Skip to content

Instantly share code, notes, and snippets.

@KolevDarko
Created October 25, 2018 14:04
Show Gist options
  • Save KolevDarko/62e4d23e3c2dda25c09d319ac8cdac89 to your computer and use it in GitHub Desktop.
Save KolevDarko/62e4d23e3c2dda25c09d319ac8cdac89 to your computer and use it in GitHub Desktop.
# 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