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

Improve Error Handling for Account Permission #16

Open
4 tasks done
AlexCatarino opened this issue Jan 26, 2024 · 0 comments
Open
4 tasks done

Improve Error Handling for Account Permission #16

AlexCatarino opened this issue Jan 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

The user received a brokerage message informing that an order cannot be placed because of API permission.

Actual Behavior

The orders are market as invalid and there are no details.

Potential Solution

Send brokerage message on exception:

2024-01-24T23:57:00.6147462Z ERROR:: BrokerageTransactionHandler.HandleSubmitOrderRequest():  System.Exception: CoinbaseApiClient.ExecuteRequest failed: [403] Forbidden, Content: {"error":"PERMISSION_DENIED","error_details":"Target Account Not Tradable","message":"Target Account Not Tradable"}, ErrorMessage: 
   at QuantConnect.CoinbaseBrokerage.Api.CoinbaseApi.CreateOrder(Order leanOrder)
   at QuantConnect.CoinbaseBrokerage.CoinbaseBrokerage.PlaceOrder(Order order)

Reproducing the Problem

Place order using an account with the trade permission.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant