Giter VIP home page Giter VIP logo

Comments (10)

gyias avatar gyias commented on July 27, 2024

It seems that this only happens to the accounts that were originally opened with TD Ameritrade and have been migrated to Schwab recently. I can place orders without issues on my other Schwab account that was opened with Schwab.

Is there anyway I can debug this from my end? I'd really love to keep using this API to automate my trading.

from schwab-api.

itsjafer avatar itsjafer commented on July 27, 2024

It's difficult for me to debug this, because I don't have a TD ameritrade-opened account

from schwab-api.

gyias avatar gyias commented on July 27, 2024

Is there any way I can help you debug? Like posting sample request and response bodies?

Or I can try to fix it myself if you let me know how you usually handle this kind of problem. I don't even know where to start looking, but with some help, I may be able to debug it. I write programs for a living.

from schwab-api.

itsjafer avatar itsjafer commented on July 27, 2024

Quick update, I reverse engineered the "new" API for trading by persisting the authentication token obtained through playwright. I don't actively trade on Schwab anymore so I'll have to move some money in and test it over the next few days, but I'm optimistic this will solve the issue (and perhaps make the debugging process less opaque for anyone who wants to contribute in the future)

from schwab-api.

gyias avatar gyias commented on July 27, 2024

Awesome! Looking forward to the fix. Thank you so much!

from schwab-api.

itsjafer avatar itsjafer commented on July 27, 2024

Hi @gyias, I just pushed version 0.3.0, which features a trade_v2 function using the new API. I haven't fully tested it (which is why it's not a replacement of the old trade function), but I did get it to place orders on my regular Schwab brokerage account.

Could you try it out and let me know if it solves your problem?

from schwab-api.

gyias avatar gyias commented on July 27, 2024

Sure, will do. Thanks a lot!

from schwab-api.

gyias avatar gyias commented on July 27, 2024

Looking good so far. :) The orders didn't go through because the market was closed, but they appeared as pending orders. I'll try to make a real order tomorrow and report back. Thanks!

from schwab-api.

itsjafer avatar itsjafer commented on July 27, 2024

I was able to test buying but not selling, so I suspect selling might be a problem. Glad to hear the orders went through though, keep me posted!

from schwab-api.

gyias avatar gyias commented on July 27, 2024

Confirming both buy and sell orders can be placed and filled without any issue now. Thank you very much!


BTW, the new API supports MOC (Market on close) orders. In case other users of this library want to take advantage of the new order type, the order type number is 53. It might be a good idea to add an order type parameter to the new API? Probably with a default value of "49" for the backward compatibility?

Thanks again for creating this super helpful API and addressing this issue! With the repeated delays of the official Schwab API launch, this is literally a life saver for those like me who were using the TDA API but were forced to migrate to Schwab.

from schwab-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.