Closed dakr001 closed 5 years ago
I don't think this will work this way round. You can request the primary exchange of a specific symbol but not get a list of all symbols from a specific exchange.
I think the issue here is that need to specify “STK” as the type id of the security
Sent from my iPhone
On Sep 24, 2019, at 4:30 AM, dakr001 notifications@github.com wrote:
Apologies if this query doesn't belong here.
Is it possible to programmatically get a list of symbols for an exchange using TWS API?
The example below suggests it is possible: https://interactivebrokers.github.io/tws-api/contract_details.html
However when I use the following contract specs I get an error contract.exchange('SMART'); contract.primaryExch('NYSE'); contract.currency('USD');
Error: 2 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Is there another source then to get list of symbols programmatically?
Even if there was, it would not solve the error you posted.
All IB api functionality is described in the docs
http://interactivebrokers.github.io/tws-api/basic_contracts.html
On Sep 24, 2019, at 6:21 AM, dakr001 notifications@github.com wrote:
Is there another source then to get list of symbols programmatically?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I think the issue here is that need to specify “STK” as the type id of the security … Sent from my iPhone On Sep 24, 2019, at 4:30 AM, dakr001 @.***> wrote: Apologies if this query doesn't belong here. Is it possible to programmatically get a list of symbols for an exchange using TWS API? The example below suggests it is possible: https://interactivebrokers.github.io/tws-api/contract_details.html However when I use the following contract specs I get an error contract.exchange('SMART'); contract.primaryExch('NYSE'); contract.currency('USD'); Error: 2 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Specified 'STK' but got the following error: 3 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered
As I said, You need to specify fully defined contract
Contract details works for individual contracts
Contract details has nothing to do with providing exchange security listings etc.
On Sep 24, 2019, at 7:16 AM, dakr001 notifications@github.com wrote:
I think the issue here is that need to specify “STK” as the type id of the security … Sent from my iPhone On Sep 24, 2019, at 4:30 AM, dakr001 @.***> wrote: Apologies if this query doesn't belong here. Is it possible to programmatically get a list of symbols for an exchange using TWS API? The example below suggests it is possible: https://interactivebrokers.github.io/tws-api/contract_details.html However when I use the following contract specs I get an error contract.exchange('SMART'); contract.primaryExch('NYSE'); contract.currency('USD'); Error: 2 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Specified 'STK' but got the following error: 3 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
Here you find a list of all stocks you can trade with IB sorted by exchange:
https://www.interactivebrokers.com/en/index.php?f=1563
Depending on how many stocks you need you can either parse all this information or just copy/paste to an excel spreadsheet and then read it into Matlab.
Here you find a list of all stocks you can trade with IB sorted by exchange:
https://www.interactivebrokers.com/en/index.php?f=1563
Depending on how many stocks you need you can either parse all this information or just copy/paste to an excel spreadsheet and then read it into Matlab.
Thanks, looks like this is the way to go. Wished there is a more elegant way.
Apologies if this query doesn't belong here.
Is it possible to programmatically get a list of all symbols for an exchange using TWS API?
The example below suggests it is possible: https://interactivebrokers.github.io/tws-api/contract_details.html
However when I use the following contract specs I get an error contract.exchange('SMART'); contract.primaryExch('NYSE'); contract.currency('USD');
Error: 2 321 Error validating request:-'bQ' : cause - The symbol or the local-symbol or the security id must be entered