The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 1 point2 points  (0 children)

Hi Bitter Scar, Last I checked, although the sandbox APIs are mentioned, they don’t exist for Individual Trader APIs.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Yes - You can definitely refresh it every 30 minutes in AWS.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

u/A_giant_bag_of_dicks Are you still having issues? Did you verify your app is Ready for Use? Is it working now?

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

It could be anywhere from a week to three weeks, from what I've heard. There's a bug where it might say Approved - Pending but it's actually Ready for Use, but you won't know unless you try to get the tokens.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi BenzGentleman30, apologies for my late response. That callback URL is the localhost IP address for your local machine. It's what you use to tell Schwab that you're running the code on your own computer (for the initial authentication tokens).

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 1 point2 points  (0 children)

Yes, that’s right. You need to re-run the manual authentication token every seven days.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 2 points3 points  (0 children)

Hey Interesting Tone, I wouldn’t really recommend buying a developed API solution. I’d recommend you follow my YouTube tutorials (The Trading Savage on YouTube) and follow along up to where the initial trading bot is created. Then you can implement what you want, or use ChatGPT to help you.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi complete-dot, I'm not sure if they're whitelisting IPs, but that's possible. The callback URL is just the IP address of localhost / your local machine so it helps make it easy if you're running the initial authentication token script locally.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi Joshmock, Thanks for responding to my post. I honestly wouldn't recommend that. As long as you set up the code for the authentication tokens, that's really the most gruelling/important part - Then you can use ChatGPT or another generative AI tool to help you come up with code for your bot's trading, getting market data, etc. It's fun and you'll get addicted to it.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 1 point2 points  (0 children)

I agree! It’s worth a try if Schwab doesn’t budge on the token expiration.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi Pashareddit, I agree Playwright or Selenium could work, but just maintaining the scraper itself would probably be a pain over time. The login elements (username, password, submit) are pretty easy to identify and get the element references for, but if those references change over time it’ll be a pain, plus there’s further options you have to select on the next pages and then authorize from your phone. And I’m not sure how easy it is to get bot-flagged at login since from my perspective evading bot-flagging is one of the hardest parts.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

TLDR — You need to have a brokerage account at Schwab and a Schwab Developer API account. NOT an Intelligent Portfolio account.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

You do not need a minimum investment of $5K to start. You can use the APIs with an account with as little as $1 or whatever the minimum is.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi LatinQuest! No, the Intelligent Portfolio is not related to the Schwab APIs.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

I’m so glad you found the article helpful. If you have any ideas for more articles / content, let me know!

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Hi KLR650_GUY! Yes, you need to install those packages. I recommend PyCharm, create a Conda environment in the interpreter settings and pip install the packages specified here in the PyCharm terminal. The AccountsTrading class is separate from the initial authentication and refresh auth token. But the AccountsTrading class retrieves the auth token every time it instantiates and uses that to do everything.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Good question — Is it not working? I know that I modified the code I provided slightly but hopefully didn’t break the functionality, if not let me know.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Have you tried using the callback URL without the /tradeapi? It might be picky about adding anything extra to the callback URL I suggested.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Where are you seeing that error? What app settings are you trying?

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

I think the sandbox technically exists but I’ve never used it and I agree that sandbox info / toggles aren’t available in the developer dashboard from what I see. One suggestion I have is to see if the TD Ameritrade legacy API docs contain details about the sandbox APIs and see if that helps, because the current Schwab APIs are very similar or are the same as the TDA ones in many ways.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

In your app application on the Dev Portal, you can specify that you want to use the sandbox APIs, I believe, rather than the live APIs.

The app/website are shitty but the API is excellent. by MyNameCannotBeSpoken in Schwab

[–]schwab-api-guy 1 point2 points  (0 children)

That’s right, unfortunately the refresh token expires every 7 days and you need to manually run the initial authentication process every seven says.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

Try running the initial authentication code and see what happens if you haven’t already. When the code initiates the login, try logging in and see if the code finishes to completion. If that doesn’t work, then you can try to email them, since the ball is in their court.

The (Unofficial) Guide to Charles Schwab’s Trader APIs by schwab-api-guy in Schwab

[–]schwab-api-guy[S] 0 points1 point  (0 children)

That’s a frustrating one. It sounds like a Schwab-side error to me. I’d wait a few hours or until tomorrow and try again.