tradier

Issue with API call to Tradier using R with httr package

北慕城南 提交于 2019-12-24 22:34:30
问题 I'm trying to make an API call to tradier API, but get 401 error. Here's the link to their API: https://developer.tradier.com/documentation/markets/get-quotes And it's my simple code: library(httr) tradier <- "https://api.tradier.com/v1/markets/history?symbol=AAPL" getdata<-GET(url=tradier, add_headers(Authorization="Bearer XXXXXXXXXXXXXXXXX")) getdata 回答1: The sandbox API endpoint works for me. I guess for the brokerage API endpoint you have to upgrade your account. library(magrittr) library