Jump to content
Sign in to follow this  
mendopablo

Big delay on Margin stream first message received and slow update cadence (Unrealised P&L)

Recommended Posts

We have observed that Trade Margin stream cadence is very slow compared with other stream services like prices or news. Despite that we are concerned on the time it takes the first value to arrive, more than 30 seconds in average. David says that the mechanism CIAPI.CS uses to subscribe to all the streams is the same, so the delay won’t be on the client side.

The amount of server side work required to calculate trade margin is much more than just passing prices. I believe that as a result margin is only calculated every 30 seconds, and could possibly be slower in high load periods. Peter says that this doesn’t occur on other platforms and that the value is cached so it shouldn’t take so much time to appear. So my question would be: why it takes so much time for the first Unrealised P&L value to arrive through margin stream if it is cached?

Share this post


Link to post
Guest sky.sanders
to_vote_up.png?1307554526
0
to_vote_down.png?1307554526

it seems at this point that the trade margin stream is quite responsive

-----------------------------------------------
event received in 00:00:00.9650000 seconds
TradeMarginDTO:
    ClientAccountId=400188637    DirectionId=1    MarginRequirementConverted=160.00    MarginRequirementConvertedCurrencyId=11    MarginRequirementConvertedCurrencyISOCode=USD    MarketId=400616150    MarketTypeId=2    Multiplier=1.000000    OrderId=480053049    OTEConverted=-3.00    OTEConvertedCurrencyId=11    OTEConvertedCurrencyISOCode=USD    PriceCalculatedAt=1.57188    PriceTakenAt=1.57218    Quantity=1.0

-----------------------------------------------

Share this post


Link to post
Guest sky.sanders

We have observed that Trade Margin stream cadence is very slow compared with other stream services like prices or news. Despite that we are concerned on the time it takes the first value to arrive, more than 30 seconds in average. David says that the mechanism CIAPI.CS uses to subscribe to all the streams is the same, so the delay won’t be on the client side.

The amount of server side work required to calculate trade margin is much more than just passing prices. I believe that as a result margin is only calculated every 30 seconds, and could possibly be slower in high load periods. Peter says that this doesn’t occur on other platforms and that the value is cached so it shouldn’t take so much time to appear. So my question would be: why it takes so much time for the first Unrealised P&L value to arrive through margin stream if it is cached?

if you open the P&L stream and watch the log do you see events with data that might be failing deserialization ala http://faq.labs.cityindex.com/questions/orders-stream-executionprice-returns-string-rather-than-decimal-value?

 

Share this post


Link to post
Guest sky.sanders

We have observed that Trade Margin stream cadence is very slow compared with other stream services like prices or news. Despite that we are concerned on the time it takes the first value to arrive, more than 30 seconds in average. David says that the mechanism CIAPI.CS uses to subscribe to all the streams is the same, so the delay won’t be on the client side.

The amount of server side work required to calculate trade margin is much more than just passing prices. I believe that as a result margin is only calculated every 30 seconds, and could possibly be slower in high load periods. Peter says that this doesn’t occur on other platforms and that the value is cached so it shouldn’t take so much time to appear. So my question would be: why it takes so much time for the first Unrealised P&L value to arrive through margin stream if it is cached?

pablo, can you revisit this issue and report back your findings?

Share this post


Link to post
Guest sky.sanders

We have observed that Trade Margin stream cadence is very slow compared with other stream services like prices or news. Despite that we are concerned on the time it takes the first value to arrive, more than 30 seconds in average. David says that the mechanism CIAPI.CS uses to subscribe to all the streams is the same, so the delay won’t be on the client side.

The amount of server side work required to calculate trade margin is much more than just passing prices. I believe that as a result margin is only calculated every 30 seconds, and could possibly be slower in high load periods. Peter says that this doesn’t occur on other platforms and that the value is cached so it shouldn’t take so much time to appear. So my question would be: why it takes so much time for the first Unrealised P&L value to arrive through margin stream if it is cached?

pablo, i think we have resolved this. can you confirm or deny please?

Share this post


Link to post

We have observed that Trade Margin stream cadence is very slow compared with other stream services like prices or news. Despite that we are concerned on the time it takes the first value to arrive, more than 30 seconds in average. David says that the mechanism CIAPI.CS uses to subscribe to all the streams is the same, so the delay won’t be on the client side.

The amount of server side work required to calculate trade margin is much more than just passing prices. I believe that as a result margin is only calculated every 30 seconds, and could possibly be slower in high load periods. Peter says that this doesn’t occur on other platforms and that the value is cached so it shouldn’t take so much time to appear. So my question would be: why it takes so much time for the first Unrealised P&L value to arrive through margin stream if it is cached?

@sky.sanders Sky, this have been resolved with the latest CIAPI release, many thanks!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×