Lean
Lean copied to clipboard
Error Interpreter for Brokerage Error
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
masterbranch - [x] I have confirmed that this is not a duplicate issue by searching issues
- [x] I have provided detailed steps to reproduce the issue
There is no such NVDL CFD contract in IB.
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.