(self, params={})
| 311 | client.resolve(ohlcv, messageHash) |
| 312 | |
| 313 | async def authenticate(self, params={}): |
| 314 | self.check_required_credentials() |
| 315 | wsOptions = self.safe_dict(self.options, 'ws', {}) |
| 316 | authenticated = self.safe_string(wsOptions, 'token') |
| 317 | if authenticated is None: |
| 318 | auth = { |
| 319 | 'access_key': self.apiKey, |
| 320 | 'nonce': self.uuid(), |
| 321 | } |
| 322 | token = self.jwt(auth, self.encode(self.secret), 'sha256', False) |
| 323 | wsOptions['token'] = token |
| 324 | wsOptions['options'] = { |
| 325 | 'headers': { |
| 326 | 'authorization': 'Bearer ' + token, |
| 327 | }, |
| 328 | } |
| 329 | self.options['ws'] = wsOptions |
| 330 | url = self.urls['api']['ws'] + '/private' |
| 331 | client = self.client(url) |
| 332 | return client |
| 333 | |
| 334 | async def watch_private(self, symbol, channel, messageHash, params={}): |
| 335 | await self.authenticate() |
no test coverage detected