EikonError: Error code 413 Client Error: Request Entity Too Large - get symbology

I looked up a similar question to mine on the developer community, and the best solution proposed was dividing the list of symbols into 100. Is there a more efficient way to get rid of this error?
I am trying to use "get_symbology" to get RIC codes based on a list of 9200 ISINs.
My code and the full error below:
RICs, err= ek.get_symbology(list(ISIN_List), from_symbol_type="ISIN", to_symbol_type= "RIC")
RICs
EikonError: Error code 413 | Client Error: <!DOCTYPE html><html><head><title></title><link rel="stylesheet" href="/stylesheets/style.css"></head><body><h1>request entity too large</h1><h2>413</h2><pre>Error
at readStream (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:196:17)
at getRawBody (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/raw-body/index.js:106:12)
at read (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/body-parser/lib/read.js:76:3)
at jsonParser (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/body-parser/lib/types/json.js:127:5)
at Layer.handle [as handle_request] (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/express/lib/router/layer.js:95:5)
at trim_prefix (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:317:13)
at /Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:284:7
at Function.process_params (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:335:12)
at next (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/express/lib/router/index.js:275:10)
at logger (/Applications/Eikon API Proxy.app/Contents/Resources/app.asar/node_modules/morgan/index.js:144:5)</pre></body></html>
Best Answer
-
Hi @Erik77 - thanks for your question. Yes an instrument list of 9200 ISINs will be too large for the API to handle at once. Please be aware of the data limits of the APIs by looking at the document here. You can try chunking the list into smaller pieces (lets say 100 ISINs) and presenting each chunk to the API. You need to pip install pydash first. You can chunk your list using:
from pydash.arrays import chunk
chunklist = chunk(ISIN_list, 100)
chunklistand then present each chunk of 100 ISINs to the API.
I hope this can help
0
Answers
-
Thanks @jason.ramchandi . The code you shared seems to work. But I am still not getting the desired results. See below:
Input:
RICs, err= ek.get_symbology(chunklist[1], from_symbol_type="ISIN", to_symbol_type= "RIC")
print(RICs)
Output:
'RIC'
Any suggestions as to why it returns the string 'RIC', as opposed to a DF with the RIC's for the 100 ISIN's on the list?
0 -
Thanks @jason.ramchandi . The code you shared seems to work. But I am still not getting the desired results. See below:
Input:
RICs, err= ek.get_symbology(chunklist[1], from_symbol_type="ISIN", to_symbol_type= "RIC")
print(RICs)
Output:
'RIC'
Any suggestions as to why it returns the string 'RIC', as opposed to a DF with the RIC's for the 100 ISIN's on the list?
0 -
@Erik77 you need to drop the err on your api call (that is only used in get_data api call) - see code below:
RICs = ek.get_symbology(['GB00BH4HKS39','US88160R1014'], from_symbol_type="ISIN", to_symbol_type= "RIC")
RICsI hope this can help.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛