Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow httpx versions past 0.23.0, when python 3.6 was dropped #325

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python:
- version: "3.6"
toxenv: py36
- version: "3.7"
toxenv: py37
- version: "3.8"
Expand All @@ -22,6 +20,8 @@ jobs:
toxenv: py39
- version: "3.10"
toxenv: py310
- version: "3.11"
toxenv: py311
runs-on: ${{ matrix.platform }}

steps:
Expand Down
18 changes: 18 additions & 0 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,28 @@ Getting Started
Welcome to ``tda-api``! Read this page to learn how to install and configure
your first TD Ameritrade Python application.


+++++++++++++++++++++++++++++++++++++++++++++++++
Important New About the Charles Schwab Transition
+++++++++++++++++++++++++++++++++++++++++++++++++

Following its 2020 acquisition of TDAmeritrade, Charles Schwab has begun its
transition to TDAmeritrade. Notably for most readers of this page, this means
that API keys are no longer being registered. If you do not already have an API
key, *you cannot use ``tda-api``*. Our apologies.

You can find more information on our :ref:`Charles Schwab transition page
<schwab>`.


++++++++++++++++++++++++
TD Ameritrade API Access
++++++++++++++++++++++++

**Note:** *Now that TDAmeritrade has closed registrations, this section is now
likely impossible to follow. We've left it up just in case we're wrong about
that.*

All API calls to the TD Ameritrade API require an API key. Before we do
anything with ``tda-api``, you'll need to create a developer account with TD
Ameritrade and register an application. By the end of this section, you'll have
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:maxdepth: 2
:caption: Contents:

schwab
getting-started
auth
client
Expand Down
169 changes: 169 additions & 0 deletions docs/schwab.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
.. _schwab:


=====================================
``tda-api`` and the Schwab Transition
=====================================

In 2020, Charles Schwab acquired TDAmeritrade, and in late 2022 they announced
their transition plan. This page outlines the implications for current and
prospective ``tda-api`` users.


**Disclaimer:** This page contains information about a transition in which the
author is merely an observer. It attempts to collect and synthesize information
provided by TDAmeritrade/Charles Schwab, and may be incorrect or out of date.
Please refer to official communications for authoritative information. If you
have a different interpretation of the available information, please `visit our
discord server <https://discord.gg/BEr6y6Xqyv>`__ and share it with us. Use the
information this page at your own risk.

------------------
What is happening?
------------------

Charles Schwab now owns TDAmeritrade. TDAmeritrade appears to be continuing
their operations as a broker, but is transitioning their customers onto new
Charles Schwab accounts. This process was announced in late 2022 and is slated
to happen in 2023.

If you are reading this, you are likely interested in using the TDAmeritrade
REST API. This transition has significant implications for both new and existing
``tda-api`` users. Please keep reading for more.


--------------------------
Existing ``tda-api`` Users
--------------------------

As far as we understand it, the implications of this transition for existing
``tda-api`` users are as follows:

* All accounts will be transitioned to Schwab over the course of 2023.
* Once an account is transitioned to Schwab, it will lose access to the TDAmeritrade REST API. This means all API wrappers will stop working on that account, including ``tda-api``.
* Schwab has announced their intention to provide an API for retail traders, but no such API has materialized yet. They have also `stated that this API will be largely similar to the existing TDAmeritrade API <https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide>`__, with some modifications. Again, details are forthcoming.


+++++++++++++++++++++++++++++++++++++
When will my account be transitioned?
+++++++++++++++++++++++++++++++++++++

We understand this will happen in 2023, although details have no yet been
provided. Schwab advises to `"log in to your TD Ameritrade account and visit the
Schwab Transition Center" <https://welcome.schwab.com/?aff=WKV>`__, although as
of this writing the author has not seen any such option on his brokerage page.


+++++++++++++++++++++++++++++++++++++++++++++++++
Will I control when my account gets transitioned?
+++++++++++++++++++++++++++++++++++++++++++++++++

It seems not. Our understanding is that each account will be assigned a
"transition weekend" on which they will be migrated, and has `provided a
timeline <https://welcome.schwab.com/?aff=WKV>`__ relative to that weekend. How
that weekend is chosen and whether it can be altered by the user is unclear.


+++++++++++++++++++++++++++++++++++++++++++++++++++++
What happens to my app before my account transitions?
+++++++++++++++++++++++++++++++++++++++++++++++++++++

There do not appear to be any changes to existing TDAmeritrade accounts,
including access to the REST API. This suggests that ``tda-api`` should continue
to work as normal until your account is transitioned.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++
What happens to the ``tda-api`` app after I transition?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++

It stops working. You will need to migrate your app to the upcoming Schwab API,
once it becomes available.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
What if I transition before the new Schwab API becomes available?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

While not confirmed, it appears your account may be transitioned to Schwab
before the new Schwab API is made available. If this happens, our understanding
is that you will not have access to either the previous TDAmeritrade API (and
``tda-api`` as well) or to the as-yet-unreleased Schwab API.

It's important to note that this scenario is still hypothetical. For all we
know, the Schwab API will be made available before your account is transitioned,
and your access to a retail trading API will not be interrupted. However, this
scenario has not been ruled out, either. TDAmeritrade's/Schwab's `integration
guide
<https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide>`__
says *"It is possible that a TDA brokerage account may not be migrated to Schwab
brokerage before Schwab endpoints are live,"* although we're frankly at a loss
for how to interpret that statement.


+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
How do I migrate my ``tda-api`` app to this new Schwab API?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Until the new Schwab API becomes available, there is nothing you can do. Once it
becomes available, the maintainers of ``tda-api`` will evaluate the situation
and decide how to move forward. Our tentative plan is as follows, although note
this is based on preliminary information and subject to change at any time:

* Schwab has announced that their new API will resemble the old TDAmeritrade API, with some modifications. Notably, it appears all functionality will be carried forward except for saved orders and watchlists. It seems there will be some changes to the authentication flow as well.
* The ``tda-api`` authors currently intend to implement a new API wrapper to support this new API. Wherever possible, the functionality and interface of ``tda-api`` will be kept intact.
* This new library will be a separate package from ``tda-api``. We are in the process of constructing placeholders and registering PyPI packages.
* Your app will almost certainly need to be modified to use this new library, although we aim to minimize the work required to do so.
* TDAmeritrade/Schwab has also confirmed that you will need to register a new
application, i.e. receive a new API key. Schwab has announced this will happen
in `"early 2023."
<https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide>`__


---------------------
New ``tda-api`` Users
---------------------

Unfortunately, as part of this transition, TDAmeritrade has closed registration
of new applications. This means you cannot get a API key for your application,
so if you're not currently a ``tda-api`` user, you cannot become one. This is an
unfortunate state of affairs, but we are powerless to change it.


++++++++++++++++++++++++++++++++++++
Can I borrow someone else's API key?
++++++++++++++++++++++++++++++++++++

According to the ``tda-api`` authors' interpretation of `the TDAmeritrade API's
terms of service <https://developer.tdameritrade.com/legal>`__, no. In fact,
they explicitly say *"All API Keys assigned to you are unique to you and are
solely for your own use in connection with your participation in the Program.
You may not provide any third party with access to any API Key."* We're not
lawyers, so take our advice with a grain of salt, but that seems pretty
unambiguous to us.

We are enforcing this interpretation on our discord server. Your first request
for a third-party API key will be met with a warning, and subsequent requests
will result in your being banned from the server.


++++++++++++++++++++++++++++++++++++++++++++++++
Wait, so I'm locked out of the TDAmeritrade API?
++++++++++++++++++++++++++++++++++++++++++++++++

Sadly, it would appear so. We still recommend `joining our discord server
<https://discord.gg/BEr6y6Xqyv>`__ to discuss trading with like-minded people
and learn about temporary alternatives. Once a replacement is made available,
members of that server will be the first to learn about it.


----------------
More information
----------------

You can get more information directly from TDAmeritrade and Charles Schwab at
the following links:

* `TDAmeritrade Transition Overview <https://welcome.schwab.com/?aff=WKV>`__ at Charles Schwab
* `TDAmeritrade & Charles Schwab: What to Know <https://www.tdameritrade.com/why-td-ameritrade/td-ameritrade-charles-schwab.html>`__ at TDAmeritrade
* `Trader API Schwab Integration Guide <https://developer.tdameritrade.com/content/trader-api-schwab-integration-guide>`__ at TDAmeritrade's developer portal
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'Operating System :: OS Independent',
'Topic :: Office/Business :: Financial :: Investment',
],
python_requires='>=3.6',
python_requires='>=3.7',
install_requires=[
'authlib',
'autopep8',
Expand Down