【发布时间】:2021-08-17 08:20:47
【问题描述】:
我已经注册了 tdameritrade 开发者账户并获得了 api 密钥。
curl -X GET --header "Authorization: " \
"https://api.tdameritrade.com/v1/marketdata/aapl/quotes?apikey=my_tda_api_key"
可以获取aapl的数据如下:
{"AAPL": {"assetType":"EQUITY","assetMainType":"EQUITY","cusip":"037833100","symbol":"AAPL",
#omitted all other info
现在我想用 curl 和我的 api 密钥获得 aapl 的股票期权火车:
curl -X GET --header "Authorization: " "https://api.tdameritrade.com/v1/marketdata/chains? \
apikey=my_tda_api_key& \
symbol=aapl&contractType=all&includeQuotes=false&strategy=single&interval=1&range=all& \
fromDate=2021-8-14&toDate=2023-8-14&expMonth=all&optionType=all"
我总是得到所有HTTP/1.1 400 Bad Request,在url中尝试了许多不同的参数组合,仍然无法得到正常响应,那么如何解决?
https://developer.tdameritrade.com/option-chains/apis/get/marketdata/chains#
【问题讨论】: