EikonError: Error code 413 | Client Error: Payload Too Large get symbology
Hi I am converting around 13000 cusip, isin, and sedol to ric using eikon API and I am feeding into get_symbology a list of identifiers. I got the error 413: client error: payload too large even I try to shrink the list to as small as 5 entries. Does any one know what is the restriction eikon has on the size of list input? Thanks!
Best Answer
-
I split my list into 100 blocks. Even 1000 does not work for me.
0
Answers
-
@yiliu.lu symbology api can be safely used on large datasets (think index constituents code conversion for a large index), so it is difficult to say what causes this behavior without looking at your code.
I may only assume that something went wrong after you attempted to execute the initial 13000 symbols as one request, however, it is something that I failed to replicate.
If this problem persists, please let us know.
0 -
Thanks! @Zhenya Kovalyov I am merging factset(that uses cusip) with eikon to fill in some missing entries. running the following line of code:
cric=ek.get_symbology(cusip,from_symbol_type='CUSIP',to_symbol_type='RIC')['RIC']
Where cusip is a list of 13000 cusips that I need to convert to ric.
The complete error message I got is:
Error code 413 | Client Error: Payload Too Large - <!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>
---------------------------------------------------------------------------
EikonError Traceback (most recent call last)
<ipython-input-501-c351c41ab672> in <module>
----> 1 cric=ek.get_symbology(cusip,from_symbol_type='CUSIP',to_symbol_type='RIC')['RIC']
~/anaconda3/envs/my_conda/lib/python3.7/site-packages/eikon/symbology.py in get_symbology(symbol, from_symbol_type, to_symbol_type, raw_output, debug, bestMatch)
107
108 payload ={'symbols': symbol,'from': from_symbol_type,'to': to_symbol_type,'bestMatchOnly': bestMatch}
--> 109 result = eikon.json_requests.send_json_request(Symbology_UDF_endpoint, payload, debug=debug)
110
111 if raw_output:
~/anaconda3/envs/my_conda/lib/python3.7/site-packages/eikon/json_requests.py in send_json_request(entity, payload, debug)
98 return result
99 else:
--> 100 raise_for_status(response)
101
102 except requests.exceptions.ConnectionError as connectionError:
~/anaconda3/envs/my_conda/lib/python3.7/site-packages/eikon/json_requests.py in raise_for_status(response)
189
190 if error_msg:
--> 191 logger.error('Error code {} | {}'.format(response.status_code, error_msg))
192 raise EikonError(response.status_code, error_msg)
EikonError: Error code 413 | Client Error: Payload Too Large - <!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>I think it might be a restriction on the server side. Any thoughts? Thanks a lot!
0 -
@yiliu.lu
I suggest you split your list into several smaller ones. Rather than using a single list of 13K Cusips try doing your Cusip to RIC conversion in a loop with 13 lists of 1K Cusips each.0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛