@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:
Code
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:
Code
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.