GithubHelp home page GithubHelp logo

rameritrade's People

Contributors

exploringfinance avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rameritrade's Issues

Limit on close orders

Hi, I've been using the rameritrade library and it's been excellent.
What I'd like to report here is not really an issue, it's more of a suggestion. The library supports many order types, but Limit on Close (LOC) orders are not accepted, even though TD Ameritrade do support LOC orders. The lirbrary accepts Market on Close, but not Limit on Close orders, so I suspect it might be easy to implement it.

Error: 400 - 'LIMIT_ON_CLOSE' is not a valid orderType. Valid values are (for Order and SavedOrder) 'MARKET', 'LIMIT', 'STOP', 'STOP_LIMIT', 'TRAILING_STOP', MARKET_ON_CLOSE', 'TRAILING_STOP_LIMIT', (these are only valid for Order) 'EXERCISE', 'NET_DEBIT', 'NET_CREDIT', 'NET_ZERO'.

Would it be possible to add this order type?
Thanks for the library, it's awesome!

td_priceHistory generates Bad Request

Error in Price History function td_priceHistory

td_priceHistory(tickers = c("AAPL", "MSFT"), startDate = Sys.Date() - 30,
endDate = Sys.Date(), freq = c('30min'), accessToken = NULL)
Error: 400 - Bad request.

Order replacing

This is not an issue but a request for another function that can modify an existing order.

How to request minute data?

I am trying to request minute data. But I was not successful. How to request minute data?

R> tickHistDay = td_priceHistory(c('SPY','IWM'), startDate = '1990-01-01')
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
R> head(tickHistDay)
# A tibble: 6 x 8
  ticker date       date_time            open  high   low close  volume
  <chr>  <date>     <dttm>              <dbl> <dbl> <dbl> <dbl>   <int>
1 SPY    1993-01-29 1993-01-29 01:00:00  44.0  44.0  43.8  43.9 1003200
2 SPY    1993-02-01 1993-02-01 01:00:00  44.0  44.2  44.0  44.2  480500
3 SPY    1993-02-02 1993-02-02 01:00:00  44.2  44.4  44.1  44.3  201300
4 SPY    1993-02-03 1993-02-03 01:00:00  44.4  44.8  44.4  44.8  529400
5 SPY    1993-02-04 1993-02-04 01:00:00  45.0  45.1  44.5  45    531500
6 SPY    1993-02-05 1993-02-05 01:00:00  45.0  45.1  44.7  45.0  492100
R> tickHistDay = td_priceHistory(c('SPY','IWM'), startDate = '1990-01-01', freq='1m')
Error: 400 - Bad request.
R> tickHistDay = td_priceHistory(c('SPY','IWM'), startDate = '2020-01-01', freq='1m')
Error: 400 - Bad request.
R> tickHistDay = td_priceHistory(c('SPY','IWM'), startDate = '2020-01-01', endDate='2020-01-10', freq='1m')
Error: 400 - Bad request.
R> tickHistDay = td_priceHistory(c('SPY','IWM'), startDate = '2020-07-11', freq='1m')
Error: 400 - Bad request.

Issues in Scheduling with CronR

I am trying to use this (great) package to text myself updates on my portfolio at certain times of the day, but I am having issues with CronR. A function of mine calls rameritrade::td_auth_accessToken(consumerKey, refreshToken), which appears to be the cause of the issue. It should be noted that this message does not appear when running it manually, only when I attempt to schedule it. The error message in my log is:
"Error in ram_checkRefresh(refreshToken) :
Incorrect object type passed as Refresh Token. Please pass the output from auth_init_refreshToken or auth_new_refreshToken.FALSE
Calls: get_acct -> -> ram_checkRefresh
Execution halted"

Thanks for any and all assistance.

Authentication step 8 failed

@exploringfinance, thanks for creating the package! Also understand that you won't make any changes till the Schwab integration and its impact on ToS API is clear.

But I thought I would flag this one as I tried, but I was unable to get passed authentication in step 8. I ran the following:

td_auth_refreshToken("CONSUMERAUTHORIZATIONCODE", 
                                   "https://callbackURL", 
                                   "https://testing/?code=CONSUMERAUTHORIZATIONCODE")

The error message I received was the following:

"Error: The auth code provided does not appear to be a valid auth code. Please confirm the URL link from a successful login was passed."

I double checked for typos and there shouldn't be any. Any idea(s)?

Why the price of the current day may not be correct?

I see the close price of the current day is not correct. The correct value should be 59.07, but it is shown as 60.7.

I also see other tickers having this problem, but not all tickers have this problem. Does anybody know what is wrong?

R> tail(rameritrade::td_priceHistory('DWAC'), n=1)
No encoding supplied: defaulting to UTF-8.
# A tibble: 1 x 8
  ticker date       date_time            open  high   low close   volume
  <chr>  <date>     <dttm>              <dbl> <dbl> <dbl> <dbl>    <int>
1 DWAC   2021-10-26 2021-10-26 00:00:00  87.1  91.4  55.5  60.7 26657852

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.