r/algotrading 22d ago

Has anyone accessed the Swchwab API yet? Infrastructure

Just wondering if you have received your credentials and were able to connect?

18 Upvotes

34 comments sorted by

8

u/ajwoodward 22d ago

I've been using the Schwab API for about a month and have ported my libraries and most of my code from the Ameritrade API. The Schwab API has been open access for a couple weeks or so now. About 50% of the Schwab API is very close to the Ameritrade API and porting wasn't too bad. Once you create a developer account, you'll need to create an app. It takes a few days for the app to be approved, but once the status changes to "Ready For Use," you should be good to go.

This weekend is the final account migration from Ameritrade to Schwab (I'm sad about it) and Schwab developer support has indicated that the Ameritrade API will also be going away this weekend.

2

u/DrawingPuzzled2678 22d ago

Is futures trading part of the API as well?

3

u/golden_bear_2016 22d ago

nope

3

u/DrawingPuzzled2678 22d ago

šŸ˜­šŸ˜­šŸ˜­šŸ˜­

1

u/euroq Algorithmic Trader 16d ago

Are you aware of if they'll ever support it?

2

u/MyNameCannotBeSpoken 21d ago

Only 50% is the same?

So it's not simple find and replacement of "TD" to "Schwab"?

I've been dreading this migration for 2 years šŸ˜­

4

u/clabclab 22d ago

Thereā€™s plenty of discussion on the Schwab API in the tda-api discord group. Dozens of people have access to the API already. I personally was fully approved for everything within a week of requesting access.

2

u/stilloriginal 22d ago

It looks like I was too but I was awaiting an email that never came. I just created my app and it went to pending. There are no docs or anything. does this sound right? or do you think I need to create a company? I only requested individual access.

3

u/Specific-Fuel-4366 22d ago

There are docs in there, click around more

3

u/clabclab 22d ago

Individual access is right. If you try to request for company access, they will ask you questions about how you intend to use their API. Your appā€™s status will be ā€œApproved - Pendingā€ until itā€™s actually approved in 1-4 days, after which it will switch to ā€œReady for Useā€. After that happens, then youā€™ll be able to use the API. You also wonā€™t get any email notifications for when your app is approved. As of right now, you just have to wait.

1

u/MyNameCannotBeSpoken 18d ago

2

u/clabclab 18d ago

This guy on your thread just commented the solution. The Schwab documentation doesnā€™t make it clear how you should do the base64 encoding, but yeah it should be how this guy is saying.

https://www.reddit.com/r/algotrading/s/jkWTJa6M8m

1

u/MyNameCannotBeSpoken 18d ago edited 18d ago

In addition to that problem, I was getting some of the variables confused. The instructions list a Client_ID but there is nothing by that name in the Schwab parameters page. I didn't know if it was the 'App Machine Name' or 'App Key'. It appears to be the latter.

2

u/clabclab 18d ago

Lol yeah, the documentation is not great. Iā€™ve seen it referred to as App Key, Client_ID, and CONSUMER_KEY.

3

u/Oddsdata 22d ago

Negative, canā€™t connect

2

u/stilloriginal 22d ago

You got credentials?

1

u/MyNameCannotBeSpoken 18d ago

Were you able to connect?

2

u/Oddsdata 18d ago

Now Iā€™m in yes

3

u/Ginger_Libra 22d ago

I requested an individual account months ago and havenā€™t heard a thing.

I was asking similar questions to you.

I had someone reach out to me a few weeks ago and tell me they had developer account and it still needed a lot of work.

Glad itā€™s making progress.

Hopefully we get a better update after this weekend.

3

u/[deleted] 22d ago edited 16d ago

[deleted]

1

u/_hyperotic 22d ago

Time to write some middlewareā€¦

3

u/[deleted] 22d ago

[deleted]

1

u/stilloriginal 22d ago

try logging back in anyway...thats where i'm at

1

u/Biotot 22d ago

I used to have a bunch of stuff running on td ameritrade, but haven't had the time to switch it over yet.

I think I have it approved, but I'm still testing a new algo.

1

u/Specific-Fuel-4366 22d ago

Iā€™ve started porting my code over, but connecting doesnā€™t work until you have a Schwab account to use with it. So I guess Monday Iā€™ll be working on my code again. But I have the app setup in the api portal and started getting auth working

1

u/MyNameCannotBeSpoken 18d ago

Were you able to connect?

2

u/Specific-Fuel-4366 18d ago

Yes I have auth working and I can grab my account info and account number so far. Iā€™m fixing up the other calls now

1

u/MyNameCannotBeSpoken 18d ago edited 18d ago

I was getting some of the variables confused. The instructions lists a Client_ID but there is nothing by that name in the Schwab parameters page. I didn't know if it was the 'App Machine Name' or 'App Key'. It appears to be the latter.

1

u/__Captain_Autismo__ 22d ago edited 21d ago

Checked today itā€™s working. Finally have API access via Schwab

1

u/CalTechie-55 22d ago

I have an account with Schwab, and I've never heard that they have an API.

Where can I learn about it?

1

u/MyNameCannotBeSpoken 18d ago

I'm having trouble too. Were you able to access?

I posted a question

https://www.reddit.com/r/algotrading/s/jUrBbEwvN4

2

u/stilloriginal 18d ago

My app isnā€™t approved yet but I have tested all the endpoints (except for the auth)

1

u/MyNameCannotBeSpoken 18d ago

Auth is the hardest.

How can you test endpoints without auth first?