[go: nahoru, domu]

Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Feat/amm arb oracle #3466

wants to merge 8 commits into from

Conversation

aarmoa
Copy link
Contributor
@aarmoa aarmoa commented May 31, 2021

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

@aarmoa aarmoa requested a review from Nullably May 31, 2021 12:58
@aarmoa aarmoa changed the base branch from master to development May 31, 2021 12:59
@dennisocana dennisocana linked an issue May 31, 2021 that may be closed by this pull request
@@ -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:
Copy link
Contributor

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()
Copy link
Contributor

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(
Copy link
Contributor

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.

@james-hummingbot
Copy link
Contributor

Nice to see you are adding pydocs :)

@aarmoa
Copy link
Contributor Author
aarmoa commented Jun 3, 2021

I close this PR because it has been replaced with https://github.com/CoinAlpha/hummingbot/pull/3492

@aarmoa aarmoa closed this Jun 3, 2021
@fengtality fengtality deleted the feat/amm_arb_oracle branch February 8, 2023 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rate oracle to amm-arb
4 participants