robin_stocks icon indicating copy to clipboard operation
robin_stocks copied to clipboard

anyone experienced `rh.get_all_open_option_orders(account_number=acct)` is very slow? e.g. ~2 minutes

Open mw66 opened this issue 1 year ago • 6 comments

Hi,

Just wonder if anyone experienced rh.get_all_open_option_orders(account_number=acct) is very slow? e.g. ~2 minutes

Is this a server problem, or anything we can improve it on the client side code?

Thanks.

mw66 avatar Nov 26 '24 18:11 mw66

@mw66 Yes, I was having this issue and have resolved it. The problem is that it's requesting the entire list of transactions for the account. I've started a fork that solves this issue by letting you send a start datetime for how far back to request records, and I will post the update tomorrow.

noLeash avatar Dec 10 '24 06:12 noLeash

@mw66 - Fork here https://github.com/noLeash/robin_stocks/tree/order-req-start-date

noLeash avatar Dec 10 '24 16:12 noLeash

@noLeash Thanks for the information and the fork, can you make a PR and contribute back to the original repo?

@jmfernandes

mw66 avatar Dec 10 '24 16:12 mw66

@mw66 - PR has been submitted https://github.com/jmfernandes/robin_stocks/pull/517

noLeash avatar Dec 11 '24 17:12 noLeash

@noLeash hey, just wanted to comment a thanks for your fix on this.

OnishiKenshin avatar Dec 11 '24 23:12 OnishiKenshin

@noLeash hey, just wanted to comment a thanks for your fix on this.

Happy to be able to contribute

noLeash avatar Dec 30 '24 04:12 noLeash