-
Notifications
You must be signed in to change notification settings - Fork 28
Add simple liquidity bot #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
233be0c to
5608c38
Compare
| chain_rpc_url="https://rpc.sepolia.org", | ||
| api_base_url="https://api.starknet.sepolia.extended.exchange/api/v1", | ||
| stream_url="wss://api.starknet.sepolia.extended.exchange/stream.extended.exchange/v1", | ||
| stream_url="wss://starknet.sepolia.extended.exchange/stream.extended.exchange/v1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for UI, pls revert
| target_order_amount_usd = Decimal("50") | ||
| market = available_markets["BTC-USD"] | ||
| await root_trading_client.mass_cancel(markets=[market.name]) | ||
| buy_orders_infoz: List[Tuple[str, Decimal] | None] = [None, None, None] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why can't we reuse OrderBookEntry?
| self.init_orderbook(event.data) | ||
| elif event.type == StreamDataType.DELTA.value: | ||
| self.update_orderbook(event.data) | ||
| while True: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is for reconnection?
| try: | ||
| return await self.__receive() | ||
| except websockets.ConnectionClosed: | ||
| raise StopAsyncIteration from None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from None -- why we can't use correct cause?
| """ | ||
|
|
||
| url = self.__get_url("/orderbooks/<market?>", market=market_name) | ||
| url = self.__get_url("/orderbooks/<market?>" + (f"?depth={depth}" if depth else ""), market=market_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls check test_generate_valid_url_from_template you can do
query={ "depth": depth }
if will be removed if it is None
No description provided.