Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 559 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Broker plugin API for multiple accounts #472582
05/06/18 16:58
05/06/18 16:58
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
I'm working on a plugin that connects to multiple accounts and most of the data receiving infrastructure is there, the problem I'm having right now is with how Zorro requests assets for multiple accounts.

The docs say about BrokerAccount:

Quote:
Returns the current account status, or changes the account if multiple accounts are supported. Called repeatedly during the trading session.


And about BrokerLogin's Account parameter:

Quote:
Optional output, char[1024] array to be filled with all user's account numbers as subsequent zero-terminated strings, ending with "" for the last string. Only the first account number is used by Zorro.


So my assumption was that I simply configure "Account" in Accounts.csv and return it in the Accounts output in BrokerLogin, then every time Zorro requests an Asset it calls BrokerAccount.

This seems to be incorrect though. When I have assets on multiple accounts, I see Zorro just call BrokerAsset over and over again with the same Asset argument and nothing in between. No BrokerLogin, no BrokerAccount, just repeating requests for the same asset, once per account.

Is this expected behaviour? Should my broker plugin force users to prefix their asset names with a prefix or something like that?

Re: Broker plugin API for multiple accounts [Re: Veratyr] #472596
05/07/18 14:58
05/07/18 14:58
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
I believe the design intent was for the same Assets to be accessible from all accounts, so there would be no reason to change accounts between BrokerAsset calls.

Re: Broker plugin API for multiple accounts [Re: AndrewAMD] #472597
05/07/18 15:03
05/07/18 15:03
Joined: Jan 2016
Posts: 122
V
Veratyr Offline OP
Member
Veratyr  Offline OP
Member
V

Joined: Jan 2016
Posts: 122
Ah, so I will have to give all my assets different names... Oh well, it works.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1