-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hummingbot spot connector bot-api integration changes #3
base: genius_yield-spot-connector
Are you sure you want to change the base?
Hummingbot spot connector bot-api integration changes #3
Conversation
trading_pair = await self._connector.trading_pair_associated_to_exchange_symbol(symbol=raw_message["s"]) | ||
trading_pair = await self._connector.trading_pair_associated_to_exchange_symbol(symbol=raw_message["market_id"]) |
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.
Need to verify wheter we can map symbol to market_id
@@ -167,24 +174,20 @@ async def _place_order(self, | |||
type_str = GeniusYieldExchange.genius_yield_order_type(order_type) | |||
side_str = CONSTANTS.SIDE_BUY if trade_type is TradeType.BUY else CONSTANTS.SIDE_SELL | |||
symbol = await self.exchange_symbol_associated_to_pair(trading_pair=trading_pair) |
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.
Needs to be double checked wheter trading_pair is appropriate here. Might be correct to use asset_ticker instead
o_id = str(order_result["orderId"]) | ||
transact_time = order_result["transactTime"] * 1e-3 | ||
o_id = str(order_result["transaction_id"]) | ||
transact_time = self._time_synchronizer.time() |
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.
Need to check wheter we can use tx id as means of an orders id. Contact api does not have a seperate order id field it seems.
trading_pair = await self.exchange_symbol_associated_to_pair(trading_pair=tracked_order.trading_pair) | ||
symbol = await self.exchange_symbol_associated_to_pair(trading_pair=tracked_order.trading_pair) |
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.
Again might be more appropriate to use ticker here
Integration Checklist for Hummingbot Connector with Bot API
Overview
This checklist details the changes made and further actions required to integrate the Hummingbot connector with our internal Bot API.
Bot-api schema referenced here: https://github.com/geniusyield/dex-contracts-api/blob/main/web/swagger/api.yaml
Changes Made
1.
genius_yield_exchange.py
_place_order
method aligns with the provided API structure._place_cancel
method to use correct endpoint and parameters._format_trading_rules
method to parse and validate trading pair information correctly.2.
genius_yield_auth.py
rest_authenticate
to use header-based authentication as per our schema._generate_signature
method to match the internal API’s requirements for request signing.3.
genius_yield_constants.py
4.
genius_yield_api_order_book_data_source.py
_request_order_book_snapshot
method to fetch order book data from the correct endpoint.snapshot_message_from_exchange
anddiff_message_from_exchange
methods to align with the schema’s structure for bids, asks, and update IDs.5.
genius_yield_order_book.py
snapshot_message_from_exchange
,diff_message_from_exchange
, andtrade_message_from_exchange
methods to correctly parse and structure order book messages based on the provided schema.6.
genius_yield_utils.py
is_exchange_information_valid
to ensure trading pairs are enabled based on status and permission sets.GeniusYieldConfigMap
includes fields for API key and secret with appropriate prompts.7.
genius_yield_api_user_stream_data_source.py