Support for Oauth
See original GitHub issueHi, does alpaca-backtrader-api support authenticating with Oauth access tokens? A quick look through the source code seems to imply that we can only authenticate with API keys.
Would adding support for Oauth be as simple as adding the oauth
param to AlpacaStore
and passing that parameter to API(tradeapi.REST)
? If so, I can make a PR to add this functionality
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
OAuth Community Site
OAuth is a way to get access to protected data from an application. It's safer and more secure than asking users to log...
Read more >Using OAuth 2.0 to Access Google APIs | Authorization
A service account's credentials, which you obtain from the Google API Console, include a generated email address that is unique, a client ID,...
Read more >What the Heck is OAuth?
OAuth is a delegated authorization framework for REST/APIs. It enables apps to obtain limited access (scopes) to a user's data without giving ...
Read more >OAuth 2.0 Authorization Framework
The OAuth 2.0 authorization framework is a protocol that allows a user to grant a third-party web site or application access to the...
Read more >Setting up OAuth 2.0 - Google Cloud Platform Console Help
To use OAuth 2.0 in your application, you need an OAuth 2.0 client ID, which your application uses when requesting an OAuth 2.0...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, it should work. inside AlpacaStore (line 234) we do this
check if your Oauth works by adding that
adding that if statement is not possible in the main repo. you could have a fork and do it there though the reason is that it is a patch for something it was not designed for, doing something like that could cause bugs in the future (just an example - someone forgets to add credentials and the streamer doesn’t start and no exception happens… he will not know why nothing works)
adding your credentials is never a good practice… so don’t do that (you may get unexpected results… if not now, maybe in a future commit) currently what happens is that the AlpacaBroker gets the REST interface from the AlpacaStore so if you initialize it there correctly it should probably work (but again, it’s not a good practice so operate with caution)
now… we have 2 streamers. one for prices, one for events. prices stream is not relevant for you since you use a different feed. the events are broker events… so I’m guessing you probably need that
in any case - do these actions only with paper trading and see if you get your desired results. also, please update it here so others may get that information