-
-
Save cardosofede/1a37db4ebc02440d8fb1352fc324e531 to your computer and use it in GitHub Desktop.
Quickstart Guide: Exercise I
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hummingbot.strategy.script_strategy_base import ScriptStrategyBase | |
class QuickstartScript(ScriptStrategyBase): | |
# It is best to first use a paper trade exchange connector | |
# while coding your strategy, once you are happy with it | |
# then switch to real one. | |
markets = {"binance_paper_trade": {"BTC-USDT"}} | |
def on_tick(self): | |
price = self.connectors["binance_paper_trade"].get_mid_price("BTC-USDT") | |
msg = f"Bitcoin price: ${price}" | |
self.logger().info(msg) | |
self.notify_hb_app_with_timestamp(msg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment