10 levels market depth via python API in datascope
Hello,
I would like to query market data of RIC = LCOc1 and 10 levels market depth via python API.
this is Json file I used, but no instrument error shown below. please advise?
secondly what to add in Json for 10 levels market depth?
Extraction Services Version 18.3.1.48082 (0d5e6bbb8e4a), Built Jan 10 2025 19:16:51User ID: 9038901Extraction ID: 2000000882037631Correlation ID: CiD/9038901/AAAAAA.09515249d80aee81/RASchedule: 0x09515249d81aee81 (ID = 0x0000000000000000)Input List (1 items): (ID = 0x09515249d81aee81) Created: 17-03-2025 12:36:11 Last Modified: 17-03-2025 12:36:11Report Template: _OnD_0x09515249d81aee81 (ID = 0x09515249d82aee81) Created: 17-03-2025 12:36:09 Last Modified: 17-03-2025 12:36:09Schedule dispatched via message queue (0x09515249d81aee81)Schedule Time: 17-03-2025 12:36:10Processing started at 17-03-2025 12:36:10Processing completed successfully at 17-03-2025 12:36:11Extraction finished at 17-03-2025 12:36:11 UTC, with servers: xc18qrtpQ10Instrument <RIC,LCOc1> expanded to 0 RICS.Report suppressed because there are no instruments
Answers
-
Hello @onionw
It might be because you didn't specify the view. Try this following query to get market depth for LCOc1:
{ "ExtractionRequest": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryMarketDepthExtractionRequest", "ContentFieldNames": [ "Ask Price", "Bid Price", "Number of Buyers", "Number of Sellers" ], "IdentifierList": { "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [{ "Identifier": "LCOc1", "IdentifierType": "Ric" } ], "ValidationOptions": None, "UseUserPreferencesForValidationOptions": False }, "Condition": { "View": "NormalizedLL2", "NumberOfLevels": 10, "MessageTimeStampIn": "GmtUtc", "ReportDateRangeType": "Range", "QueryStartDate": "2025-03-03T15:00:00.000Z", "QueryEndDate": "2025-03-03T15:01:00.000Z", "DisplaySourceRIC": False } } }
Result:
#RIC,Domain,Date-Time,GMT Offset,Type,L1-BidPrice,L1-BuyNo,L1-AskPrice,L1-SellNo,L2-BidPrice,L2-BuyNo,L2-AskPrice,L2-SellNo,L3-BidPrice,L3-BuyNo,L3-AskPrice,L3-SellNo,L4-BidPrice,L4-BuyNo,L4-AskPrice,L4-SellNo,L5-BidPrice,L5-BuyNo,L5-AskPrice,L5-SellNo,L6-BidPrice,L6-BuyNo,L6-AskPrice,L6-SellNo,L7-BidPrice,L7-BuyNo,L7-AskPrice,L7-SellNo,L8-BidPrice,L8-BuyNo,L8-AskPrice,L8-SellNo,L9-BidPrice,L9-BuyNo,L9-AskPrice,L9-SellNo,L10-BidPrice,L10-BuyNo,L10-AskPrice,L10-SellNo LCOc1,Market Price,2025-03-03T20:00:00.009285927Z,+0,Normalized LL2,71.41,17,71.43,9,71.4,20,71.44,19,71.39,18,71.45,9,71.38,16,71.46,14,71.37,17,71.47,12,71.36,14,71.48,13,71.35,12,71.49,9,71.34,11,71.5,9,71.33,13,71.51,11,71.32,11,71.52,12 LCOc1,Market Price,2025-03-03T20:00:00.064120724Z,+0,Normalized LL2,71.41,17,71.43,9,71.4,20,71.44,19,71.39,18,71.45,9,71.38,16,71.46,14,71.37,18,71.47,12,71.36,14,71.48,13,71.35,12,71.49,9,71.34,11,71.5,11,71.33,13,71.51,11,71.32,11,71.52,12 LCOc1,Market Price,2025-03-03T20:00:00.089162764Z,+0,Normalized LL2,71.41,17,71.43,10,71.4,20,71.44,19,71.39,18,71.45,9,71.38,16,71.46,14,71.37,18,71.47,12,71.36,14,71.48,13,71.35,12,71.49,9,71.34,11,71.5,11,71.33,13,71.51,11,71.32,11,71.52,12 LCOc1,Market Price,2025-03-03T20:00:00.099030024Z,+0,Normalized LL2,71.41,17,71.42,1,71.4,20,71.43,10,71.39,18,71.44,19,71.38,16,71.45,9,71.37,18,71.46,14,71.36,14,71.47,12,71.35,12,71.48,13,71.34,11,71.49,9,71.33,13,71.5,11,71.32,11,71.51,11 LCOc1,Market Price,2025-03-03T20:00:00.114284336Z,+0,Normalized LL2,71.41,16,71.42,1,71.4,21,71.43,10,71.39,18,71.44,18,71.38,16,71.45,9,71.37,18,71.46,14,71.36,14,71.47,12,71.35,12,71.48,13,71.34,10,71.49,9,71.33,13,71.5,11,71.32,11,71.51,11 LCOc1,Market Price,2025-03-03T20:00:00.124292726Z,+0,Normalized LL2,71.41,14,71.42,1,71.4,22,71.43,10,71.39,18,71.44,18,71.38,16,71.45,9,71.37,18,71.46,14,71.36,14,71.47,12,71.35,12,71.48,13,71.34,10,71.49,9,71.33,13,71.5,11,71.32,11,71.51,11 …
The view can be one of the following -
0 -
thanks it works for me.
another question: I need re-sampled data e.g. 1 sec or 1 min. what field shall I use in Json file?i changed orderType to below:
"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
could you pls give me an example? also, do you have a DOC showing all options so that I could go through them myself0 -
You can see the REST API help on the DSS website which should list all the parameters etc. There are also the Postman samples available in the DSS and Tickhistory downloads tab which can be of help as well.
For content query and questions around data, it is best to raise a help ticket at LSEG MyAccount.
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
- 684 Datastream
- 1.4K DSS
- 614 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
- 248 ETA
- 552 WebSocket API
- 37 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
- 639 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
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛