Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484170
09/17/21 18:58
09/17/21 18:58
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

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

Regenerated the API key - same forbidden error.

Which only happens after the 1st asset - if asset 1 works, why don't assets 2+?

Is there a further LogLevel greater than 6 that will show the complete interaction with Alpaca?

Thanks.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484171
09/17/21 21:02
09/17/21 21:02
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

I have no idea why assets 2+ are forbidden. That is Alpaca's response. At this point, I'd contact Alpaca to find out what is the reason.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484172
09/17/21 21:07
09/17/21 21:07
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

Aha, the get snapshot returns forbidden is because there is a space before the symbol. Please make sure the assets are separated with a comma without any spaces.



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

Joined: Jun 2013
Posts: 1,609
Thanks @kzhao, but that's not it. Same result without spaces:

Code
2021-09-17 21:15:55 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SO/snapshot
2021-09-17 21:15:56 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:15:57 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SUI/snapshot
2021-09-17 21:15:58 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:15:58 | DEBUG | --> https://data.alpaca.markets/v2/stocks/WEC/snapshot
2021-09-17 21:15:59 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:15:59 | DEBUG | close file


And if I break it into 4 separate brokerCommand's:

Code
2021-09-17 21:23:02 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/snapshot
2021-09-17 21:23:03 | TRACE2 | <-- {"symbol":"PH","latestTrade":{"t":"2021-09-17T19:59:23.438575225Z","x":"V","p":287.85,"s":100,"c":[" "],"i":56480353247027,"z":"A"},"latestQuote":{"t":"2021-09-17T19:59:59.68236824Z","ax":"V","ap":0,"as":0,"bx":"V","bp":0,"bs":0,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T19:59:00Z","o":287.85,"h":287.85,"l":287.85,"c":287.85,"v":862,"n":22,"vw":287.785162},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":293.855,"h":293.855,"l":285.27,"c":287.85,"v":59433,"n":2556,"vw":287.336592},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":289.37,"h":291.375,"l":287.26,"c":289.71,"v":74303,"n":1079,"vw":289.392517}}
2021-09-17 21:23:03 | DEBUG | close file
2021-09-17 21:23:03 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SO/snapshot
2021-09-17 21:23:05 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:23:05 | DEBUG | close file
2021-09-17 21:23:05 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SUI/snapshot
2021-09-17 21:23:06 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:23:06 | DEBUG | close file
2021-09-17 21:23:06 | DEBUG | --> https://data.alpaca.markets/v2/stocks/WEC/snapshot
2021-09-17 21:23:07 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:23:07 | DEBUG | close file


And if I put WEC first, again no error on the first asset, only the following ones:

Code
2021-09-17 21:26:44 | DEBUG | --> https://data.alpaca.markets/v2/stocks/WEC/snapshot
2021-09-17 21:26:46 | TRACE2 | <-- {"symbol":"WEC","latestTrade":{"t":"2021-09-17T19:59:48.717084597Z","x":"V","p":90.73,"s":100,"c":[" "],"i":56485083113038,"z":"A"},"latestQuote":{"t":"2021-09-17T19:59:57.170214559Z","ax":"V","ap":0,"as":0,"bx":"V","bp":0,"bs":0,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T19:59:00Z","o":90.81,"h":90.815,"l":90.73,"c":90.73,"v":1543,"n":23,"vw":90.77581},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":91.13,"h":91.67,"l":90.72,"c":90.73,"v":41329,"n":886,"vw":91.123337},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":92.55,"h":92.55,"l":91.17,"c":91.54,"v":27346,"n":606,"vw":91.715505}}
2021-09-17 21:26:46 | DEBUG | close file
2021-09-17 21:26:46 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/snapshot
2021-09-17 21:26:47 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:26:47 | DEBUG | close file
2021-09-17 21:26:47 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SO/snapshot
2021-09-17 21:26:48 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:26:48 | DEBUG | close file
2021-09-17 21:26:48 | DEBUG | --> https://data.alpaca.markets/v2/stocks/SUI/snapshot
2021-09-17 21:26:50 | TRACE2 | <-- {"message": "forbidden."}

2021-09-17 21:26:50 | DEBUG | close file


So I don't think it's the account?

Thanks.

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

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

Is there a LogLevel or some other way to show the full commands being sent to Alpaca?

Thanks.

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484175
09/17/21 21:48
09/17/21 21:48
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

For the Download, it seems that Alpaca changed the timeframe from 1D to 1Day. When I tried the download, I got "invalid timeframe". Not sure if Alpaca had just changed the response message. Anyway, I will fix both of the issues this weekend. Thanks

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

Joined: Jun 2013
Posts: 1,609
No - Thank YOU!

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484177
09/17/21 22:34
09/17/21 22:34
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

That is really strange. I have no idea why other snapshot requests are forbidden. If you launch Zorro from a terminal by "Zorro.exe -d", then run the script, you will see debug logging in the strategy's log (not the Alpacal log)

Re: AlpacaZorroPlugin v1.0.6 Released [Re: kzhao] #484178
09/17/21 22:39
09/17/21 22:39
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 got the response from Alpaca in the Slack:
Quote

It appears you haven’t signed up for the “unlimited” data plan? or are using keys from an account that isn’t associated with that plan. Notice in your debugging the line
Alpaca Basic Plan. Adjust end to 1631894271
That implies the API thinks you only have the basic data plan which restricts access to the most recent 15 minutes of data.

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

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

Hmmm... It's true I haven't signed up for unlimited. But... I think we should separate the issues:

GenAssetList: What does the data plan have to do with this?! Even if it's only 15 mins, why does that impact subsequent assets?

Download: I'm trying to download EOD data, for which a 15 min limit makes no sense...

Thanks.

Page 3 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