itsjafer / schwab-api

A python library for placing trades on Charles Schwab
MIT License
213 stars 66 forks source link

HTTP GET and POST request Data for VBA Excel. #12

Closed victorfaria87 closed 12 months ago

victorfaria87 commented 2 years ago

Good afternoon Jafer. I have been searching the whole internet for a way automate Excel with Charles Schwab.

Your method seems to be the only available option since Microsoft retired IE.

I have very little knowledge of Python, I dedicate most of my time to VBA because of the simple integration with Excel.

I am trying to import information from my Schwab’s account in to excel and trade stocks directly from excel.

(used to do it with Internet explorer). Also imported most information with M code Table query’s I have also done this for the TD Ameritrade, but they have an actual API.

On the description, you indicate you perform web requests to the Schwab own API.

I have attempted to go thru the code but have not seen how you send the GET and POST requests to the API. I am looking for the structure of the Body and the request headers. Do you have the actual GET or POST HTTP request that is sent to Charles Schwab’s?

Thanks Victor

victorfaria87 commented 2 years ago

Hey Jafer

I am now attempting to integrate Python in Excel using xlwings. Having multiple issues for which have not found solutions, and may be a dead end.

I am thinking in transition to a different approach: • Your Python code automated in “Fast API”. • Send simple GET and POST requests from Excel VBA. • Have “FastAPI” handle the requests to schwabs.

Is this possible?

itsjafer commented 12 months ago

As it stands, I don't think this is achievable. This package uses Playwright to get past the authentication stage, and then makes HTTP requests.