alexanu / alpaca_snippets

my collection of different scripts to trade with Alpaca
10 stars 5 forks source link

[Bug] None of ['symbol'] are in the columns #1

Open sshcli opened 2 years ago

sshcli commented 2 years ago

https://github.com/alexanu/alpaca_snippets/blob/d3a14c9dbf0bcb8e32054d87227d201b17ccb82a/HFT-ish_2.py#L114

Message="None of ['symbol'] are in the columns" Source=\alpaca_snippets\HFT-ish_2.py StackTrace: File "\alpaca_snippets\HFT-ish_2.py", line 110, in submitorder positions= positions.set_index('symbol').transpose() File "\alpaca_snippets\HFT-ish_2.py", line 221, in (Current frame) submitorder(randtick,'buy',positions,num_positions, BASE_VALUE)

sshcli commented 2 years ago

So far, the error only appears if you haven't buy anything yet. Only if you don't have any position in your account

sshcli commented 2 years ago

The problem also occurs when you buy and sell the same day, when you don't have more opened positions in your account