finnhub-python
finnhub-python copied to clipboard
symbol lookup is not returning useful results
the API docs show the following example:
import finnhub
finnhub_client = finnhub.Client(api_key="")
print(finnhub_client.symbol_lookup('apple'))
with a sample response:
{
"count": 4,
"result": [
{
"description": "APPLE INC",
"displaySymbol": "AAPL",
"symbol": "AAPL",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "AAPL.SW",
"symbol": "AAPL.SW",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "APC.BE",
"symbol": "APC.BE",
"type": "Common Stock"
},
{
"description": "APPLE INC",
"displaySymbol": "APC.DE",
"symbol": "APC.DE",
"type": "Common Stock"
}
]
}
but I am currently getting wildly different results, and AAPL
is not among them:
{'count': 22,
'result': [{'description': 'Apple',
'displaySymbol': 'A19C0M.DU',
'symbol': 'A19C0M.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APC5.BE',
'symbol': 'APC5.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A2R7JV.BE',
'symbol': 'A2R7JV.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT4.BE',
'symbol': 'A3KUT4.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A1HKKY.HA',
'symbol': 'A1HKKY.HA',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT3.DU',
'symbol': 'A3KUT3.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCU.HM',
'symbol': 'APCU.HM',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A2R7JV.MU',
'symbol': 'A2R7JV.MU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT6.DU',
'symbol': 'A3KUT6.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCU.MU',
'symbol': 'APCU.MU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT6.MU',
'symbol': 'A3KUT6.MU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A2R7JT.BE',
'symbol': 'A2R7JT.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT5.DU',
'symbol': 'A3KUT5.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCL.HM',
'symbol': 'APCL.HM',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT5.MU',
'symbol': 'A3KUT5.MU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A3KUT3.MU',
'symbol': 'A3KUT3.MU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APC5.DU',
'symbol': 'APC5.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCU.DU',
'symbol': 'APCU.DU',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCA.HM',
'symbol': 'APCA.HM',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A1HKKY.BE',
'symbol': 'A1HKKY.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'APCT.BE',
'symbol': 'APCT.BE',
'type': ''},
{'description': 'Apple',
'displaySymbol': 'A1HKKY.MU',
'symbol': 'A1HKKY.MU',
'type': ''}]}
I don't have access to any of these symbols under my current plan, and even if I did, none of these results are expected
I should also note that the sample used to be representative of what this API returned, but this is no longer the case
Sorry this is extremely late but I was having the same issue and I'm new to finnhub. Did you figure out what the issue was?
The response I eventually got from Finnhub was to not use symbol_lookup
at all, and instead use stock_symbols
to build my own daily lookup table