We cannot get items by multiple Batch Request

Hi Team,
I'm going to send request for 4000+ items. So divide items for multiple batch request like below, by reference
(_send_market_price_request is called after getting login response correctly.)
class ReutersReceiver:
def _send_market_price_request(self):
# get 4000+ items
all_rics = get_ric_list()
# each batch request has 3500 items
MAX_LIST_LEN = 3500
def get_req_json(rics):
return {
'ID': 2,
'Domain': 'MarketPrice',
'Key': {
'NameType': 'Ric',
'Name': rics,
},
'View':get_view_items_list(),
}
for top_num in range(0, len(all_rics), MAX_LIST_LEN):
_rics = all_rics[top_num:top_num + MAX_LIST_LEN]
self.web_socket_app.send(json.dumps(get_req_json(_rics)))
time.sleep(5)
Only 3447/4678 Refresh message has be returned and as items increase the time first Update message has arrived increase, even though each batch request item size is around 55kb.
Also, the more increasing size, the worse returned Refresh/Update message.
Are there anything bad implementations or other factor?
Or what should I do if there is no simple resolution. Could you give me some workaround?
Thanks
mochizuki.y
Best Answer
-
According to the code, you use the same streamID for batch requests which is incorrect.
The streamID must be unique for each stream. The following picture shows how the streamID works in a batch request.
The picture uses the streamID: 4 for a batch request which requests three items.
The server will close the batch request (streamID: 4) with the stream state: Closed and the data state: Ok. Then, the server will send unique streamIDs (5, 6, 7) for each subscribed item.
Therefore, if the application would like to send another batch stream, the streamID of the new batch request should be 8.
In your case, you use the streamId: 2 for a batch request to subscribe to 3500 items so the streamID of the next batch request should be 3503 (2+3500+1).
0
Answers
-
Thank you for your advice. Now we have confirmed to get 4000+ items by multiple batch requests which are assigned streamID dynamically.
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
- 688 Datastream
- 1.4K DSS
- 625 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 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
- 276 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
- 695 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
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 92 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛