Page 1 of 1

How to update Trade Status panel

Posted: Mon Sep 06, 2021 7:57 pm
by hesaid
Hello,
How can I update trade panel components (Position, P&L, etc.) with my own values? 
Thanks 

Re: How to update Trade Status panel

Posted: Tue Sep 07, 2021 10:37 am
by Svyatoslav
Hi. If you are writing a Layer0 adapter (connector) you can send updates via onStatus and onBalance callbacks.

Re: How to update Trade Status panel

Posted: Tue Sep 07, 2021 3:52 pm
by hesaid
Ok. Thank you, Svyatoslav!

Re: How to update Trade Status panel

Posted: Tue Sep 07, 2021 7:31 pm
by hesaid
Hi Svyatoslav!
Update after a short research.
I need implememtation in @Layer1Injectable (extends Layer1ApiInjectorRelay) class. I have implemented BalanceListener, PositionListener interfaces - no effect. onStatus, onBalance, onPositionUpdate aren't called.

Thanks

Re: How to update Trade Status panel

Posted: Wed Sep 08, 2021 7:17 am
by Svyatoslav
Hi. Is your intention to listen for that data or to send this data into bookmap?
Please note, that when selecting the 1st or 2nd mode on the launchpad (trading simulated by bookmap) you will not receive those events in your indicators since simulated trading layer just does not currently support that. We'll eventually improve the simulation, but I can't tell you when that will happen. Until then it's best to use server-side simulations, such as paper trading accounts.
Also note that Layer1Injectable is core API annotation and PositionListener / BalanceListener are classes from simplified API. So they won't do anything outside of simplified.

Re: How to update Trade Status panel

Posted: Wed Sep 08, 2021 9:35 am
by hesaid
The main purpose is to send positon,balance updates from external source to bookmap and display them in trading panel namely in a separate thread I get repetive events which I'd like to push to the position/balance listener