我试图通过在 python 中使用 TDA-API 组合周期类型、周期、频率类型和频率来获得以下时间范围:
3Y:W
1Y:1D
180D:4H
20D:1H
10D:30M
10D:15M
5D:5M
1D:1M
例如,我为 1Y:1D 制作了这个
PeriodType.MONTH,
Period.ONE_YEAR,
FrequencyType.WEEKLY,
Frequency.WEEKLY,
您可以在此链接上找到选项 https://tda-api.readthedocs.io/en/stable/client.html#price-history
编辑-
到目前为止,以下是我发现有效和无效的时间表:
1. weekly (Works)
- PeriodType.YEAR,
- Period.THREE_YEARS,
- FrequencyType.WEEKLY,
- Frequency.WEEKLY
2. daily (Works)
- PeriodType.YEAR
- Period.ONE_YEAR
- FrequencyType.DAILY
- Frequency.DAILY
3. fourhour (Does Not Work)
- PeriodType.YEAR
- Period.ONE_YEAR
- FrequencyType.DAILY
- Frequency.DAILY
4. twentyhour(Does Not Work)
- PeriodType.DAY
- Period.TWENTY_YEARS
- FrequencyType.MINUTE
- Frequency.EVERY_SIXTY_MINUTES
5. thirtymin(Work)
- PeriodType.DAY
- Period.TEN_DAYS
- FrequencyType.MINUTE
- Frequency.EVERY_THIRTY_MINUTES
6. fifteenmin(Works)
- PeriodType.DAY
- Period.FIVE_DAYS
- FrequencyType.MINUTE
- Frequency.EVERY_FIFTEEN_MINUTES
7. fivemin(Works)
- PeriodType.DAY
- Period.FIVE_DAYS
- FrequencyType.MINUTE
- Frequency.EVERY_FIVE_MINUTES
8. onemin(Works)
- PeriodType.DAY
- Period.ONE_DAY
- FrequencyType.MINUTE
- Frequency.EVERY_MINUTE