alpacahq / Momentum-Trading-Example

An example algorithm for a momentum-based day trading strategy.
642 stars 218 forks source link

Update to alpaca data v2 #40

Open camelpac opened 2 years ago

camelpac commented 2 years ago

update this sample code to use the alpaca data v2 API

timholthuijsen commented 2 years ago

This is a really useful and valuable update, now maybe we will be able to use the algorithm in Alpaca v2. However, when I try to run your code, get a RuntimeError: This event loop is already running from: get_1000m_history_data() and asyncio.

Do you have any idea how to fix this issue?

sonarcloud[bot] commented 2 years ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication