Skip to content

Commit 3bad019

Browse files
committed
Refactor data sources
1 parent 2581ae0 commit 3bad019

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/coinbase_trading_bot/coinbase.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
and secret key to access their market data. You can create them here:
1010
https://www.coinbase.com/settings/api
1111
12-
You need to add a market credential to the app, and then add market data sources
13-
to the app. You can then use the market data sources in your trading strategy.
12+
You need to add a market credential to the app, and then add market
13+
data sources to the app. You can then use the market data
14+
sources in your trading strategy.
1415
"""
1516
# Define your market credential for coinbase
1617
coinbase_market_credential = MarketCredential(
@@ -41,14 +42,13 @@ class CoinBaseTradingStrategy(TradingStrategy):
4142
def apply_strategy(self, algorithm, market_data):
4243
pass
4344

45+
4446
config = {
4547
SYMBOLS: ["BTC/EUR"],
4648
RESOURCE_DIRECTORY: os.path.join(os.path.dirname(__file__), "resources")
4749
}
48-
4950
algorithm = Algorithm()
5051
algorithm.add_strategy(CoinBaseTradingStrategy)
51-
5252
app = create_app(config=config)
5353
app.add_algorithm(algorithm)
5454
app.add_market_credential(coinbase_market_credential)
@@ -62,4 +62,3 @@ def apply_strategy(self, algorithm, market_data):
6262

6363
if __name__ == "__main__":
6464
app.run()
65-

0 commit comments

Comments
 (0)