Skip to content

Commit

Permalink
Refactor data sources
Browse files Browse the repository at this point in the history
  • Loading branch information
MDUYN committed Jul 2, 2024
1 parent 2581ae0 commit 3bad019
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions examples/coinbase_trading_bot/coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
and secret key to access their market data. You can create them here:
https://www.coinbase.com/settings/api
You need to add a market credential to the app, and then add market data sources
to the app. You can then use the market data sources in your trading strategy.
You need to add a market credential to the app, and then add market
data sources to the app. You can then use the market data
sources in your trading strategy.
"""
# Define your market credential for coinbase
coinbase_market_credential = MarketCredential(
Expand Down Expand Up @@ -41,14 +42,13 @@ class CoinBaseTradingStrategy(TradingStrategy):
def apply_strategy(self, algorithm, market_data):
pass


config = {
SYMBOLS: ["BTC/EUR"],
RESOURCE_DIRECTORY: os.path.join(os.path.dirname(__file__), "resources")
}

algorithm = Algorithm()
algorithm.add_strategy(CoinBaseTradingStrategy)

app = create_app(config=config)
app.add_algorithm(algorithm)
app.add_market_credential(coinbase_market_credential)
Expand All @@ -62,4 +62,3 @@ def apply_strategy(self, algorithm, market_data):

if __name__ == "__main__":
app.run()

0 comments on commit 3bad019

Please sign in to comment.