Lean CLI not using sandbox server for tradier paper trading account
Opened this issue · 2 comments
Expected Behavior
The cli parameter --tradier-environment paper
should let lean access the paper trading environment at sandbox.tradier.com
.
Actual Behavior
The log file shows the live endpoint and the application shuts down:
20240528 19:56:34.659 TRACE:: WebSocketClientWrapper connection task ended: wss://ws.tradier.com/v1/markets/events
20240528 19:56:34.660 TRACE:: WebSocketClientWrapper.OnClose(): Connection closed (IsOpen:False, State:Aborted): wss://ws.tradier.com/v1/markets/events
Potential Solution
I checked my lean.json and there is only an "live-tradier" environment, but no "paper-tradier" one. Maybe I am missing some config?
Reproducing the Problem
- Setup tradier paper trading account
- Start lean cli using the command given below
System Information
Register for tradier account, setup a paper trading account at and start lean live:
lean live deploy --brokerage Tradier \
--data-provider-live Tradier \
--tradier-account-id "xxxx" --tradier-access-token "xxxx" \
--tradier-environment paper \
${projectname}
Checklist
- I have completely filled out this template
- I have confirmed that this issue exists on the current
master
branch (No, could make the dotnet build work in my ubuntu environment) - I have confirmed that this is not a duplicate issue by searching issues
- I have provided detailed steps to reproduce the issue
Hey @wlami!
Tradier does not support data streaming in the paper/sandbox environment, this is probably causing the issue ur experiencing. Will keep this issue open so we update the lean CLI not to allow this invalid configuration setup.
Hey @Martin-Molinero,
thanks for the explanation. Could you help me understand what --tradier-environment paper
then is meant to do? Does it only work with other data providers?