Jump to content
Sign in to follow this  
yarane

How to connect to client account margin stream?

Recommended Posts

Try using a different user 0x234 the probe messages are just hearbeats to check the server and that user (xx189949) as a demo user doesn’t have his margin switched on in PreProduction enviroment. I’ll change the documentation in PreProd but if you change the user to 0x234 and change the

Streaming Uri: https://pushpreprod.cityindextest9.co.uk/STREAMINGCLIENTACCOUNTTopic: CLIENTACCOUNTMARGIN.ALL

you will see the streaming Margin

Share this post


Link to post

The Adapter set is STREAMINGCLIENTACCOUNT and the Adapter is CLIENTACCOUNTMARGIN I gave Tim missleading information. I’ll look at getting the documentation up to date and provide http JS examples

Share this post


Link to post

Thanks, it got connected. Next question: what should I send in LSid parameter? If I sendhttp://pushpreprod.cityindextest9.co.uk/lightstreamer/control.txt?LSsession=Sa7c5e499671319aaT1624438&LStable=1&LSop=add&LSdataadapter=CLIENTACCOUNTMARGIN&LSmode=RAW&LSsnapshot=true&LSid=ALL&LSschema=Cash+Margin+MarginIndicator+NetEquity+OpenTradeEquity+TradeableFunds+TradingResource+TotalMarginRequirement+CurrencyId

with LS_id=ALL (accordingly to API documentation) the stream answers me only with ‘PROBE’ messages, i.e. no real data.

Share this post


Link to post

Try these settings:

LSsession=XXXXXXXXXXXXXXXXX&LStable=0&LSop=add&LSid=ALL&LSschema=Cash%20CurrencyId%20CurrencyISO%20Margin%20MarginIndicator%20NetEquity%20OpenTradeEquity%20TradeableFunds%20PendingFunds%20TradingResource%20TotalMarginRequirement&LSsnapshot=true&LSdataadapter=CLIENTACCOUNTMARGIN&LS_mode=MERGE&

Share this post


Link to post

Try using a different user 0x234 the probe messages are just hearbeats to check the server and that user (xx189949) as a demo user doesn’t have his margin switched on in PreProduction enviroment. I’ll change the documentation in PreProd but if you change the user to 0x234 and change the

Streaming Uri: https://pushpreprod.cityindextest9.co.uk/STREAMINGCLIENTACCOUNTTopic: CLIENTACCOUNTMARGIN.ALL

you will see the streaming Margin

Thanks, now it works.

Share this post


Link to post

Try these settings:

LSsession=XXXXXXXXXXXXXXXXX&LStable=0&LSop=add&LSid=ALL&LSschema=Cash%20CurrencyId%20CurrencyISO%20Margin%20MarginIndicator%20NetEquity%20OpenTradeEquity%20TradeableFunds%20PendingFunds%20TradingResource%20TotalMarginRequirement&LSsnapshot=true&LSdataadapter=CLIENTACCOUNTMARGIN&LS_mode=MERGE&

Still, I recieve only such lines: 0,1|#|#|#|#|#|#|#|#|# PROBE PROBE

Besides, my test user has two accounts, here is AccountInformation response: 

{ “ClientAccountCurrency”:“GBP”, “ClientAccountId”:400059903, “LogonUserName”:“Mr Peter Dale – Test”, “TradingAccounts”:[ {“TradingAccountCode”:“XX189949”, “TradingAccountId”:400088018, “TradingAccountStatus”:“Open”, “TradingAccountType”:“CFD”}, {“TradingAccountCode”:“XX897303”, “TradingAccountId”:400088019, “TradingAccountStatus”:“Open”, “TradingAccountType”:“Spread Betting”}] }

It’s not clear enough to me where is something like AccountID in ClientAccountMarginDTO (which is supposed to be sent via the stream)?

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  
×