-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Feat/amm arb oracle #3466
Feat/amm arb oracle #3466
Conversation
…mmingbot into feat/amm_arb_oracle Rebase with origin/development
@@ -99,6 +99,16 @@ def prices(self) -> Dict[str, Decimal]: | |||
""" | |||
return self._prices.copy() | |||
|
|||
def rate_for_tokens(self, base_token: str, quote_token: str) -> Decimal: |
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 not a quite clear function name, maybe rate_for_trading_pair?
self._quote_eth_rate_fetch_loop_task = safe_ensure_future(self.quote_in_eth_rate_fetch_loop()) | ||
self._quote_eth_rate_fetch_loop_task = safe_ensure_future(self.quote_in_eth_rate_fetch_loop()) | ||
if self._use_oracle_conversion_rate: | ||
RateOracle.get_instance().start() |
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.
Rate Oracle is started on start_check
in start_command
, you don't need to start it here. On the start_check, it also confirms conversion rate with a user before starting, this is to prevent input error.
@@ -121,4 +121,11 @@ def order_amount_prompt() -> str: | |||
default=False, | |||
validator=validate_bool, | |||
type_str="bool"), | |||
"use_oracle_conversion_rate": ConfigVar( |
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.
You'll need to set rate_oracle_pairs
global setting variable, you can see Arbitrage config map for an example.
Nice to see you are adding pydocs :) |
I close this PR because it has been replaced with https://github.com/CoinAlpha/hummingbot/pull/3492 |
Change in amm_arb strategy to make it posible to use rate oracle to look for rates.
There is a new parameter that enables the use of the oracle to get the price of quote tokens in ETH.
Also the status message was extended to include the information about the quote rates in ETH, that shows the user if the strategy is using the oracle or not.
https://app.zenhub.com/workspaces/hummingbot-5f340755c5e17300167a8f30/issues/coinalpha/hummingbot/3216
https://github.com/CoinAlpha/hummingbot/issues/3216