Skip to content

Commit

Permalink
add cross margin balance update channel
Browse files Browse the repository at this point in the history
  • Loading branch information
revilwang committed Jul 23, 2021
1 parent 41bb24a commit bf5807c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion python/examples/local_order_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,8 @@ async def run(self):
result = await self.q.get()
try:
self.ob.update(result)
except ValueError:
except ValueError as e:
logger.error("failed to update: %s", e)
# reconstruct order book
break

Expand Down
5 changes: 5 additions & 0 deletions python/gate_ws/spot.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ class SpotMarginBalanceChannel(BaseChannel):
class SpotFundingBalanceChannel(BaseChannel):
name = 'spot.funding_balances'
require_auth = True


class SpotCrossMarginBalanceChannel(BaseChannel):
name = 'spot.cross_balances'
require_auth = True
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = '0.2.2'
VERSION = '0.3.0'

setup(
name='gate-ws',
Expand Down

0 comments on commit bf5807c

Please sign in to comment.