0 registered members (),
900
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484161
09/17/21 03:48
09/17/21 03:48
|
Joined: Sep 2019
Posts: 63 Naperville
kzhao
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2019
Posts: 63
Naperville
|
@DdlV Which version of Zorro do you use? It seems an exception occurred and the file is not closed.
Last edited by kzhao; 09/17/21 03:50.
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484162
09/17/21 03:59
09/17/21 03:59
|
Joined: Jun 2013
Posts: 1,609
DdlV
Serious User
|
Serious User
Joined: Jun 2013
Posts: 1,609
|
@kzhao: With LogLevel=6, tried Download SPY and got many lines like
2021-09-17 03:51:55 | DEBUG | BorkerHisotry SPY start: 1609459200 end: 1631850714 nTickMinutes: 1 nTicks: 300
2021-09-17 03:51:55 | INFO | Alpaca Basic Plan. Adjust end to 1631849815
2021-09-17 03:51:55 | DEBUG | BorkerHisotry SPY start: 2021-01-01T00:00:00Z(1609459200) end: 2021-09-17T03:36:55Z(1631849815) nTickMinutes: 1 nTicks: 300
After a while the INFO lines stop and only the DEBUG lines show. No SPY file created. Zorro version is 1.96.
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484165
09/17/21 13:36
09/17/21 13:36
|
Joined: Sep 2019
Posts: 63 Naperville
kzhao
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2019
Posts: 63
Naperville
|
@ DdlV 1.96 might be too old. Could you try Zorro 2.35 and above? For those symbols which returned "!forbidden", could you try
curl -X GET \
-H "APCA-API-KEY-ID: <YOUR_ALPACA_KEY>" \
-H "APCA-API-SECRET-KEY:<YOUR_ALPACA_SECRETE>"\
https://data.alpaca.markets/v2/stocks/SO/snapshot
SO is one of them, replace it with other symbols if you want to. What is the response from Alpaca? BTW, the "." after the PH is not a bug. It was added by Zorro for indicating the progress of the operation.
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484166
09/17/21 14:25
09/17/21 14:25
|
Joined: Jun 2013
Posts: 1,609
DdlV
Serious User
|
Serious User
Joined: Jun 2013
Posts: 1,609
|
Thanks @kzhao.
I don't have curl installed, but using wget the test works - a snapshot file containing data is created
Since the first asset (PH) did not return an error, I tried putting a different asset first. The first asset again did not return an error, but all the others returned "forbidden", as before. So, something goes wrong in the processing of the 1st asset.
The LogLevel=6 shows the first asset's data is in fact returned, but I looked a little closer and see that no PH file was created, indicating an error occurs that is not being reported.
It will take a while longer to download, install, and try 2.35 or 2.40...
Thanks.
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484167
09/17/21 15:36
09/17/21 15:36
|
Joined: Sep 2019
Posts: 63 Naperville
kzhao
OP
Junior Member
|
OP
Junior Member
Joined: Sep 2019
Posts: 63
Naperville
|
@DdlV To be clear, "no PH file was created" - you mean the PH is not written to the AssetsAlpaca.csv file or you are talking about the Download script did not create the PH history file? When I run the GenAssetList script, I got the following in the Alpaca log: 2021-09-17 15:23:57 | DEBUG | --> https://data.alpaca.markets/v2/stocks/AEP/snapshot2021-09-17 15:23:57 | TRACE2 | <-- {"symbol":"AEP","latestTrade":{"t":"2021-09-17T15:23:58.113971199Z","x":"U","p":84.94,"s":100,"c":["@","F"],"i":928,"z":"C"},"latestQuote":{"t":"2021-09-17T15:23:58.114431539Z","ax":"Q","ap":84.95,"as":2,"bx":"U","bp":84.94,"bs":1,"c":["R"],"z":"C"},"minuteBar":{"t":"2021-09-17T15:22:00Z","o":84.9581,"h":84.97,"l":84.9581,"c":84.9675,"v":2211,"n":56,"vw":84.964057},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":85.98,"h":86.13,"l":84.92,"c":84.9675,"v":2132757,"n":15223,"vw":85.736417},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":87.04,"h":87.605,"l":85.8,"c":85.98,"v":3648954,"n":48814,"vw":86.274489}} 2021-09-17 15:23:57 | DEBUG | --> https://data.alpaca.markets/v2/stocks/BRX/snapshot2021-09-17 15:23:57 | TRACE2 | <-- {"symbol":"BRX","latestTrade":{"t":"2021-09-17T15:23:38.693Z","x":"D","p":23.635,"s":300,"c":[" "],"i":79372106414168,"z":"A"},"latestQuote":{"t":"2021-09-17T15:23:58.11787264Z","ax":"N","ap":23.64,"as":7,"bx":"K","bp":23.63,"bs":7,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T15:22:00Z","o":23.635,"h":23.635,"l":23.63,"c":23.635,"v":1157,"n":14,"vw":23.634632},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":23.7,"h":23.79,"l":23.5,"c":23.635,"v":606627,"n":3250,"vw":23.623893},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":23.48,"h":23.81,"l":23.38,"c":23.63,"v":1916339,"n":11894,"vw":23.632988}} 2021-09-17 15:23:57 | DEBUG | --> https://data.alpaca.markets/v2/stocks/CFG/snapshot2021-09-17 15:23:58 | TRACE2 | <-- {"symbol":"CFG","latestTrade":{"t":"2021-09-17T15:23:57.385924747Z","x":"H","p":44.07,"s":100,"c":[" ","F"],"i":52984217424189,"z":"A"},"latestQuote":{"t":"2021-09-17T15:23:58.123406848Z","ax":"N","ap":44.07,"as":11,"bx":"N","bp":44.06,"bs":3,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T15:22:00Z","o":44.0802,"h":44.1,"l":44.07,"c":44.08,"v":26951,"n":96,"vw":44.079047},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":43.55,"h":44.2401,"l":43.53,"c":44.08,"v":1364132,"n":10455,"vw":43.815531},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":44.03,"h":44.3,"l":43.6,"c":43.72,"v":4073907,"n":34659,"vw":43.878355}} 2021-09-17 15:23:58 | DEBUG | --> https://data.alpaca.markets/v2/stocks/CMS/snapshot2021-09-17 15:23:58 | TRACE2 | <-- {"symbol":"CMS","latestTrade":{"t":"2021-09-17T15:23:54.435002624Z","x":"N","p":62.28,"s":100,"c":[" "],"i":52983542271799,"z":"A"},"latestQuote":{"t":"2021-09-17T15:23:55.46624155Z","ax":"T","ap":62.29,"as":1,"bx":"N","bp":62.27,"bs":3,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T15:22:00Z","o":62.3,"h":62.3153,"l":62.3,"c":62.3153,"v":1156,"n":33,"vw":62.305444},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":62.33,"h":62.62,"l":62.11,"c":62.3153,"v":874822,"n":4409,"vw":62.339674},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":62.8,"h":63.18,"l":62.39,"c":62.48,"v":1240504,"n":13493,"vw":62.627855}} 2021-09-17 15:23:58 | DEBUG | --> https://data.alpaca.markets/v2/stocks/CUBE/snapshot2021-09-17 15:23:58 | TRACE2 | <-- {"symbol":"CUBE","latestTrade":{"t":"2021-09-17T15:23:59.423Z","x":"D","p":52.27,"s":300,"c":[" "],"i":71679970988629,"z":"A"},"latestQuote":{"t":"2021-09-17T15:23:59.474206848Z","ax":"N","ap":52.29,"as":3,"bx":"T","bp":52.27,"bs":1,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T15:22:00Z","o":52.31,"h":52.33,"l":52.3,"c":52.33,"v":3511,"n":60,"vw":52.308776},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":52.67,"h":52.78,"l":52.14,"c":52.33,"v":190342,"n":2107,"vw":52.483831},"prevDailyBar":{"t":"2021-09-16T04:00:00Z","o":52.81,"h":53.04,"l":52.41,"c":52.58,"v":635574,"n":8179,"vw":52.604212}} 2021-09-17 15:23:58 | DEBUG | close file Do you see "!forbidden" in the log? Do all other assets, except the first, send a snapshot request and get a response?
|
|
|
Re: AlpacaZorroPlugin v1.0.6 Released
[Re: kzhao]
#484168
09/17/21 16:28
09/17/21 16:28
|
Joined: Jun 2013
Posts: 1,609
DdlV
Serious User
|
Serious User
Joined: Jun 2013
Posts: 1,609
|
@kzhao: Sorry for the confusion! You're right - I have been mixing things... GenAssetList: Using "brokerCommand(2001, "PH, SO, SUI, WEC");": - AssetsAlpaca.csv contains only a PH row - Log contains:
2021-09-17 16:16:55 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/snapshot
2021-09-17 16:16:57 | TRACE2 | <-- {"symbol":"PH","latestTrade":{"t":"2021-09-17T16:15:52.08019227Z","x":"V","p":287.6,"s":100,"c":[" "],"i":54333202192483,"z":"A"},"latestQuote":{"t":"2021-09-17T16:16:42.976071272Z","ax":"V","ap":0,"as":0,"bx":"V","bp":0,"bs":0,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T16:15:00Z","o":287.58,"h":287.6,"l":287.58,"c":287.6,"v":244,"n":7,"vw":287.587295},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":293.855,"h":293.855,"l":285.27,"c":287.6,"v":23473,"n":749,"vw":287.506828},"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 16:16:57 | DEBUG | --> https://data.alpaca.markets/v2/stocks/ SO/snapshot
2021-09-17 16:16:58 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:16:58 | DEBUG | --> https://data.alpaca.markets/v2/stocks/ SUI/snapshot
2021-09-17 16:16:59 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:16:59 | DEBUG | --> https://data.alpaca.markets/v2/stocks/ WEC/snapshot
2021-09-17 16:17:01 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:17:01 | DEBUG | close file
Download: Entering PH and 2021: - No PH file is created - Log contains:
2021-09-17 16:12:50 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/snapshot
2021-09-17 16:12:51 | TRACE2 | <-- {"symbol":"PH","latestTrade":{"t":"2021-09-17T16:12:44.106958939Z","x":"V","p":288.02,"s":100,"c":[" "],"i":54328437011028,"z":"A"},"latestQuote":{"t":"2021-09-17T16:12:40.09506449Z","ax":"V","ap":0,"as":0,"bx":"V","bp":0,"bs":0,"c":["R"],"z":"A"},"minuteBar":{"t":"2021-09-17T16:08:00Z","o":287.85,"h":287.85,"l":287.84,"c":287.84,"v":237,"n":9,"vw":287.849916},"dailyBar":{"t":"2021-09-17T04:00:00Z","o":293.855,"h":293.855,"l":285.27,"c":287.84,"v":22757,"n":721,"vw":287.49602},"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 16:12:51 | DEBUG | BorkerHisotry PH start: 1609459200 end: 1631895171 nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:51 | INFO | Alpaca Basic Plan. Adjust end to 1631894271
2021-09-17 16:12:51 | DEBUG | BorkerHisotry PH start: 2021-01-01T00:00:00Z(1609459200) end: 2021-09-17T15:57:51Z(1631894271) nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:51 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/bars?start=2021-01-01T00:00:00Z&end=2021-09-17T15:57:51Z&limit=5000&timeframe=1D
2021-09-17 16:12:53 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:12:53 | DEBUG | BorkerHisotry PH start: 1609459200 end: 1631808771 nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:53 | DEBUG | BorkerHisotry PH start: 2021-01-01T00:00:00Z(1609459200) end: 2021-09-16T16:12:51Z(1631808771) nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:53 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/bars?start=2021-01-01T00:00:00Z&end=2021-09-16T16:12:51Z&limit=5000&timeframe=1D
2021-09-17 16:12:54 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:12:54 | DEBUG | BorkerHisotry PH start: 1609459200 end: 1631722371 nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:54 | DEBUG | BorkerHisotry PH start: 2021-01-01T00:00:00Z(1609459200) end: 2021-09-15T16:12:51Z(1631722371) nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:54 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/bars?start=2021-01-01T00:00:00Z&end=2021-09-15T16:12:51Z&limit=5000&timeframe=1D
2021-09-17 16:12:56 | TRACE2 | <-- {"message": "forbidden."}
2021-09-17 16:12:56 | DEBUG | BorkerHisotry PH start: 1609459200 end: 1631635971 nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:56 | DEBUG | BorkerHisotry PH start: 2021-01-01T00:00:00Z(1609459200) end: 2021-09-14T16:12:51Z(1631635971) nTickMinutes: 1440 nTicks: 1000
2021-09-17 16:12:56 | DEBUG | --> https://data.alpaca.markets/v2/stocks/PH/bars?start=2021-01-01T00:00:00Z&end=2021-09-14T16:12:51Z&limit=5000&timeframe=1D
2021-09-17 16:12:57 | TRACE2 | <-- {"message": "forbidden."}
Note: In this case there is no "close file" in the log. Hope that is clearer. Thanks.
|
|
|
|