Streaming prices total volume TRDVOL_1

Hi, I have a question about the streaming prices and the TRD_VOL1 . As it is my understanding the TRD_VOL1 is the volume of the last trade.
I was checking if I get all updates for a security and so the total volume of all updates should be the same as the volume bar in my Eikon terminal. But here it doesnt add up, could you help me out what im doing wrong here?
When I run a streaming prices with the following code:
import eikon as ek
import datetime
ek.set_app_key(xxx)
totalvol=0
def display_updated_fields(streaming_price, instrument_name, fields):
global totalvol
current_time = datetime.datetime.now().time()
totalvol=totalvol+fields['TRDVOL_1']
print(current_time, "- Update received for", instrument_name, ":", fields)
print(f' totalvol @ {datetime.datetime.now()} was {totalvol}' )
streaming_prices = ek.StreamingPrices(
instruments = ['RDSa.AS'],
fields = ['TRDVOL_1'],
on_update = lambda streaming_price, instrument_name, fields :
display_updated_fields(streaming_price, instrument_name, fields),
)
while True:
streaming_prices.open()
I get as output:
11:23:56.157812 - Update received for RDSa.AS : {'TRDVOL_1': 169}
totalvol @ 2020-07-03 11:23:56.157812 was 303
11:23:57.800421 - Update received for RDSa.AS : {'TRDVOL_1': 299}
totalvol @ 2020-07-03 11:23:57.800421 was 602
11:24:04.215283 - Update received for RDSa.AS : {'TRDVOL_1': 100}
totalvol @ 2020-07-03 11:24:04.215283 was 702
11:24:30.747384 - Update received for RDSa.AS : {'TRDVOL_1': 63}
totalvol @ 2020-07-03 11:24:30.747384 was 765
11:24:33.958766 - Update received for RDSa.AS : {'TRDVOL_1': 145}
totalvol @ 2020-07-03 11:24:33.958766 was 910
11:24:35.233361 - Update received for RDSa.AS : {'TRDVOL_1': 250}
totalvol @ 2020-07-03 11:24:35.233361 was 1160
11:24:57.402145 - Update received for RDSa.AS : {'TRDVOL_1': 275}
totalvol @ 2020-07-03 11:24:57.402145 was 1435
11:25:02.335930 - Update received for RDSa.AS : {'TRDVOL_1': 92}
totalvol @ 2020-07-03 11:25:02.336927 was 1527
So the volume according to the streaming_prices addition is: 1435-602=833 shares
But looking at the Eikon graph it shows 5752 shares for this 11:24 minute.(11:23 was 5719 shares and 11:25 was 6902 shares according to the terminal chart)
So im not getting all updates processed with streaming prices i think. Any idea why im doing this wrong?
thanks!
Best Answer
-
I tried on another computer, and there it works fine. So I guess its hardware/software related?
0
Answers
-
13:53:48.831885 - Update received for RDSa.AS : {'TRDVOL_1': 250, 'TRDTIM_1': '11:53:47'}
totalvol @ 2020-07-03 13:53:48.831885 was 39763
13:54:05.269928 - Update received for RDSa.AS : {'TRDVOL_1': 97, 'TRDTIM_1': '11:54:03'}
totalvol @ 2020-07-03 13:54:05.269928 was 39860
13:54:05.572120 - Update received for RDSa.AS : {'TRDVOL_1': 60, 'TRDTIM_1': '11:54:04'}
totalvol @ 2020-07-03 13:54:05.572120 was 39920
13:54:09.616313 - Update received for RDSa.AS : {'TRDVOL_1': 900, 'TRDTIM_1': '11:54:08'}
totalvol @ 2020-07-03 13:54:09.616313 was 40820
13:54:10.827076 - Update received for RDSa.AS : {'TRDVOL_1': 900, 'TRDTIM_1': '11:54:09'}
totalvol @ 2020-07-03 13:54:10.827076 was 41720I did some more testing and as you can see the volume candles from the seconds
13:54:03 & 13:54:04 [ 1100 & 634 shares ]. did not come through the streaming prices, or werent handled.
I only receuved a 97 & 60 share update as one can see from the output.
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 中文论坛