QuantConnect / lean-cli

CLI for running the LEAN engine locally and in the cloud
https://www.lean.io/cli
Apache License 2.0
197 stars 100 forks source link

`lean cloud live` doesn't validate brokerage credentials #82

Closed DerekMelchin closed 2 years ago

DerekMelchin commented 2 years ago

If you enter incorrect brokerage credentials, the CLI doesn't show an error. It displays the live URL and members need to navigate to the site to see if their deployment was successful.

For example, if you enter an invalid account tier for FTX, the command line makes it seem like the deployment was successful. However, you only see that there was an issue after you open the website.

Algorithm.Initialize() Error: tier (Parameter 'ftxus Tier passed cannot be recognized. Please use one of the following values: Tier1,Tier2,Tier3,Tier4,Tier5,Tier6,Tier7,Tier8,Tier9,VIP1,VIP2,VIP3,MM1,MM2,MM3') Stack Trace: tier (Parameter 'ftxus Tier passed cannot be recognized. Please use one of the following values: Tier1,Tier2,Tier3,Tier4,Tier5,Tier6,Tier7,Tier8,Tier9,VIP1,VIP2,VIP3,MM1,MM2,MM3'): StackTrace: tier (Parameter 'ftxus Tier passed cannot be recognized. Please use one of the following values: Tier1,Tier2,Tier3,Tier4,Tier5,Tier6,Tier7,Tier8,Tier9,VIP1,VIP2,VIP3,MM1,MM2,MM3')

Martin-Molinero commented 2 years ago

Validating brokerage credentials isn't really available in the cloud either since we need to run Lean, connect to the brokerage and all. But this seems like a bug in the suggested tier options for Ftxus

rjra2611 commented 2 years ago

solved by https://github.com/QuantConnect/lean-cli/pull/91 Previously, it was using click.prompt( type=str) . Now it's using click.prompt( type=click.Choice()) therefore user will only be able to select from provided options

image