alpacahq/Momentum-Trading-Example

Stream connection set to live url

trainsdse opened this issue · 1 comments

Line 75 establishes the stream but does not take in the parameter for base_url and therefore always connects to the default which is the live api url. Out of the box this causes issues when testing with a paper account because you end up sending orders with the paper url but "listening" for updates on the live url. If you change line 75 to this:

conn = tradeapi.StreamConn(base_url=base_url, key_id=api_key_id, secret_key=api_secret)

it fixes the issue.

Pretty easy to figure out but I figured I'd mention it.

Cheers,

TJ

This was fixed by #5.