The usage for con.bdh
is con.bdh('SPY US Equity', ['PX_LAST', 'VOLUME'],
'20150629', '20150630', longdata=True)
I would like to get PX_LAST
and VOLUME
for a list of securities that I have on an array (strings with tickers). When I try to substitute SPY US Equity with the array "arrtickers" or [list(arrtickers)] I get the following error:
...eidData[] = {
}
sequenceNumber = 0
securityError = {
source = "3920::bbdbh4"
code = 15
category = "BAD_SEC"
message = "Security key is too longInvalid Security [nid:3920] "
subcategory = "INVALID_SECURITY"
}
fieldExceptions[] = {
}
fieldData[] = {
}}}
Am I using the correct syntax?
Without posting a reproducible example this is just a guess, but as the error message in your snippet suggests this is likely because you are querying for an invalid security. Array syntax should work. For example the following works fine
Whereas this does not