Lean icon indicating copy to clipboard operation
Lean copied to clipboard

Error Interpreter for Brokerage Error

Open AlexCatarino opened this issue 1 year ago • 1 comments

Expected Behavior

LEAN translates brokerage error messages to user-friendly terms.

Actual Behavior

We receive messages as the following one:

No security definition has been found for the request. Origin: [Id=42] GetContractDetails: NVDL (CFD NVD L SMART)

which is not very helpful. It means that the CFD for NVDL was not found in IB database. If we search for it on the Produce Search page, it cannot be found.

Potential Solution

Pipe the brokerage error messages through error interpreter logic, expand the interpreters to include common brokerage error messages.

Reproducing the Problem

Live deployment with the following code:

self.add_cfd("NVDL", market=Market.INTERACTIVE_BROKERS)

Checklist

  • [x] I have completely filled out this template
  • [x] I have confirmed that this issue exists on the current master branch
  • [x] I have confirmed that this is not a duplicate issue by searching issues
  • [x] I have provided detailed steps to reproduce the issue

AlexCatarino avatar Apr 23 '24 22:04 AlexCatarino

There is no such NVDL CFD contract in IB. image

Please note that the Produce Search page is not the most updated. To get accurate information, it is suggested to go to TWS and see whether the contract exists in TWS.

cheukhin1024 avatar Sep 27 '24 07:09 cheukhin1024