(
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)
| 19 | |
| 20 | class 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(): |
nothing calls this directly
no outgoing calls
no test coverage detected