MCPcopy Create free account
hub / github.com/danpaquin/coinbasepro-python / __init__

Method __init__

cbpro/websocket_client.py:21–49  ·  view source on GitHub ↗
(
            self,
            url="wss://ws-feed.pro.coinbase.com",
            products=None,
            message_type="subscribe",
            mongo_collection=None,
            should_print=True,
            auth=False,
            api_key="",
            api_secret="",
            api_passphrase="",
            # Make channels a required keyword-only argument; see pep3102
            *,
            # Channel options: ['ticker', 'user', 'matches', 'level2', 'full']
            channels)

Source from the content-addressed store, hash-verified

19
20class WebsocketClient(object):
21 def __init__(
22 self,
23 url="wss://ws-feed.pro.coinbase.com",
24 products=None,
25 message_type="subscribe",
26 mongo_collection=None,
27 should_print=True,
28 auth=False,
29 api_key="",
30 api_secret="",
31 api_passphrase="",
32 # Make channels a required keyword-only argument; see pep3102
33 *,
34 # Channel options: ['ticker', 'user', 'matches', 'level2', 'full']
35 channels):
36 self.url = url
37 self.products = products
38 self.channels = channels
39 self.type = message_type
40 self.stop = True
41 self.error = None
42 self.ws = None
43 self.thread = None
44 self.auth = auth
45 self.api_key = api_key
46 self.api_secret = api_secret
47 self.api_passphrase = api_passphrase
48 self.should_print = should_print
49 self.mongo_collection = mongo_collection
50
51 def start(self):
52 def _go():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected