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
3 registered members (MadJack, AndrewAMD, Quad), 540 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
AlpacaZorroPlugin v1.0.6 Released #484027
08/30/21 13:19
08/30/21 13:19
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484029
08/30/21 15:32
08/30/21 15:32
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks kzhao!

Did you see the notice a few days ago about an upcoming "API Breaking Change..."?

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484030
08/30/21 19:18
08/30/21 19:18
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
Yes, I saw the notice. I will make corresponding changes. Thanks for bring this up.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484148
09/16/21 17:46
09/16/21 17:46
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi @kzhao,

I've been trying to follow this part of your docs:

Code
Generate AssetList file through custom borkerCommand

brokerCommand(2001, char *symbols);

symbols - One or more symbols separated by comma. If symbols = 0, all symbols will be included. An AssetAlpaca.csv file will be generated in the Log diredtory.

Exemple:
// GenerateAlpacaAssetList.c
function main() {
  brokerCommand(2001, "SPY,AAPL,MSFT,TSLA");  // Generate AssetsAlpaca.csv contains SPY, AAPL, MSFT, TSLA symbols
}


The example works, but only when using Websocket. It doesn't work over REST - is it supposed to work over REST too?

Also, I can't get "symbols = 0" to return anything. "brokerCommand(2001, 0);" just returns the header.

And, what exactly will "all symbols" be? What's in AssetsFix.csv? Everything known to Alpaca?! laugh

Thanks!

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484149
09/16/21 18:56
09/16/21 18:56
Joined: Aug 2021
Posts: 237
L
Lapsa Offline
Member
Lapsa  Offline
Member
L

Joined: Aug 2021
Posts: 237
I can't read that README.md. Triggering typos.

gj anyhow

Code
LOG_DEBUG("BorkerHisotry


Not to make fun in case you dyslexic.

I just find it extremely distracting.

Last edited by Lapsa; 09/16/21 18:57.
Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484152
09/16/21 21:35
09/16/21 21:35
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi @kzhao,

In addition to the above, I am not able to download prices via the Download script. Using REST, I get a "forbidden" error. Using Websockets, I get "NoData!"...

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484154
09/17/21 02:01
09/17/21 02:01
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
@DdiV

I verified that the generate asset list brokerCommand works over both REST and WebSocket. The command is not using WebSocket. Do you see Zorro prints the Asset in the log window like the following?

Code
GenAssetList compiling..........
Login 0 Alpaca..
!Use Alpaca market data
!Account ********** at UTC 09-17 01:45 ok

!Generating Asset List...
!Asset PH.
!Asset SO
!Asset SUI
!Asset WEC
Logout.. ok


If you add
Quote
AlpacaLogLevel = 5
in Zorro.ini then run the script, do you see any error in the Alpaca log file?

To get all symbols, use
Code
brokerCommand(2001, 0);

All symbols mean all tradeable symbols returned from https://api.alpaca.markets/v2/asssets endpoint.

Last edited by kzhao; 09/17/21 02:54.
Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484155
09/17/21 02:25
09/17/21 02:25
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks @kzhao.

No. Zorro only prints the first 4 lines and the last Logout. It does not print the Generating nor Asset lines.

LogLevel=5 shows error "Failed to open ./Log/AssetsAlpaca file". Which is interesting because AssetsAlpaca.csv is there, but empty.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484156
09/17/21 03:03
09/17/21 03:03
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
@DdlV

The plugin is unable to open the AssetsAlpaca.csv file. Is the file opened by another application? Please close Zorro, make sure there are no other Zorro instances running in the Task Window, and make sure the file is not opened by another application. Or you can delete the AssetsAlpaca.csv file. Then give it another try.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484157
09/17/21 03:13
09/17/21 03:13
Joined: Sep 2019
Posts: 63
Naperville
K
kzhao Offline OP
Junior Member
kzhao  Offline OP
Junior Member
K

Joined: Sep 2019
Posts: 63
Naperville
@DdlV

For the "API Breaking Change...", I don't know what is the null return looks like exactly. I asked in Alpaca's Slack channel but never get a reply. It seems it is a rare situation. I will keep an eye on it and will address it properly when it happens.

Page 1 of 4 1 2 3 4

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