Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lean CLI not using sandbox server for tradier paper trading account #461

Open
3 of 4 tasks
wlami opened this issue May 28, 2024 · 2 comments
Open
3 of 4 tasks

Lean CLI not using sandbox server for tradier paper trading account #461

wlami opened this issue May 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@wlami
Copy link

wlami commented May 28, 2024

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

  1. Setup tradier paper trading account
  2. 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
@Martin-Molinero
Copy link
Member

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.

@Martin-Molinero Martin-Molinero transferred this issue from QuantConnect/Lean May 29, 2024
@Martin-Molinero Martin-Molinero added the bug Something isn't working label May 29, 2024
@wlami
Copy link
Author

wlami commented May 30, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants