schwabdev


Nameschwabdev JSON
Version 2.1.0 PyPI version JSON
download
home_pageNone
SummarySchwab API Python Client (unofficial)
upload_time2024-06-21 20:45:32
maintainerNone
docs_urlNone
authorTyler Bowers
requires_python>=3.11
licenseMIT
keywords python schwab api client finance trading stocks equities options forex futures
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Schwab-API-Python
![PyPI - Version](https://img.shields.io/pypi/v/schwabdev) ![Discord](https://img.shields.io/discord/1076596998150561873?logo=discord) ![PyPI - Downloads](https://img.shields.io/pypi/dm/schwabdev) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?business=8VDFKHMBFSC2Q&no_recurring=0&currency_code=USD) ![YouTube Video Views](https://img.shields.io/youtube/views/kHbom0KIJwc?style=flat&logo=youtube)  
This is an unofficial python program to access the Schwab api.  
[Discord](https://discord.gg/m7SSjr9rs9), [PyPI](https://pypi.org/project/schwabdev/), [Youtube](https://youtube.com/playlist?list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8), [Github](https://github.com/tylerebowers/Schwab-API-Python).

## Installation 
`pip install schwabdev requests websockets`  
*You may need to use `pip3` instead of `pip`*

## Quick setup
1. Setup your Schwab developer account [here](https://beta-developer.schwab.com/).
   - Create a new Schwab individual developer app with callback url "https://127.0.0.1" (case sensitive) 
   - Wait until the status is "Ready for use", note that "Approved - Pending" will not work.
   - Enable TOS (Thinkorswim) for your Schwab account, it is needed for orders and other api calls.
2. Install packages
   - Install schwabdev and requirements `pip install schwabdev requests websockets`
   - *You may need to use `pip3` instead of `pip`*
3. Examples on how to use the client are in `tests/api_demo.py` | `tests/stream_demo.py` (add your keys in the .env file)  
   - The first time you run you will have to sign in to your Schwab account using the generated link in the terminal. After signing in, agree to the terms, and select account(s). Then you will have to copy the link in the address bar and paste it into the terminal. 
   - Questions? - join the [Discord group](https://discord.gg/m7SSjr9rs9).  
```py
import schwabdev #import the package

client = schwabdev.Client('Your app key', 'Your app secret')  #create a client

client.update_tokens_auto() #start the auto access token updater

print(client.account_linked().json()) #make api calls
```

## What can this program do?
 - Authenticate and access the api 
 - Functions for all api functions (examples in `tests/api_demo.py`)
 - Auto "access token" updates (`client.update_tokens_auto()`)
 - Stream real-time data with customizable response handler (examples in `tests/stream_demo.py`)
 ### TBD 
 - Automatic refresh token updates. (Waiting for Schwab implementation)

## Notes

The schwabdev folder contains code for main operations:     
 - `api.py` contains functions relating to api calls, requests, and automatic token checker threads.
 - `stream.py` contains functions for streaming data from websockets.
 - `color_print.py` contains functions to print to the terminal with color.

## Youtube Tutorials
1. [Authentication and Requests](https://www.youtube.com/watch?v=kHbom0KIJwc&ab_channel=TylerBowers) *Github code has significantly changed since this video*
2. [Streaming Real-time Data](https://www.youtube.com/watch?v=t7F2dUecgWc&list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8&index=2&ab_channel=TylerBowers)

## License (MIT)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "schwabdev",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "python, schwab, api, client, finance, trading, stocks, equities, options, forex, futures",
    "author": "Tyler Bowers",
    "author_email": "tylerebowers@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d1/9e/8e0315d89201bfd6356bb8494af499f042009383d10e5d17597044be2ec8/schwabdev-2.1.0.tar.gz",
    "platform": null,
    "description": "# Schwab-API-Python\n![PyPI - Version](https://img.shields.io/pypi/v/schwabdev) ![Discord](https://img.shields.io/discord/1076596998150561873?logo=discord) ![PyPI - Downloads](https://img.shields.io/pypi/dm/schwabdev) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/donate/?business=8VDFKHMBFSC2Q&no_recurring=0&currency_code=USD) ![YouTube Video Views](https://img.shields.io/youtube/views/kHbom0KIJwc?style=flat&logo=youtube)  \nThis is an unofficial python program to access the Schwab api.  \n[Discord](https://discord.gg/m7SSjr9rs9), [PyPI](https://pypi.org/project/schwabdev/), [Youtube](https://youtube.com/playlist?list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8), [Github](https://github.com/tylerebowers/Schwab-API-Python).\n\n## Installation \n`pip install schwabdev requests websockets`  \n*You may need to use `pip3` instead of `pip`*\n\n## Quick setup\n1. Setup your Schwab developer account [here](https://beta-developer.schwab.com/).\n   - Create a new Schwab individual developer app with callback url \"https://127.0.0.1\" (case sensitive) \n   - Wait until the status is \"Ready for use\", note that \"Approved - Pending\" will not work.\n   - Enable TOS (Thinkorswim) for your Schwab account, it is needed for orders and other api calls.\n2. Install packages\n   - Install schwabdev and requirements `pip install schwabdev requests websockets`\n   - *You may need to use `pip3` instead of `pip`*\n3. Examples on how to use the client are in `tests/api_demo.py` | `tests/stream_demo.py` (add your keys in the .env file)  \n   - The first time you run you will have to sign in to your Schwab account using the generated link in the terminal. After signing in, agree to the terms, and select account(s). Then you will have to copy the link in the address bar and paste it into the terminal. \n   - Questions? - join the [Discord group](https://discord.gg/m7SSjr9rs9).  \n```py\nimport schwabdev #import the package\n\nclient = schwabdev.Client('Your app key', 'Your app secret')  #create a client\n\nclient.update_tokens_auto() #start the auto access token updater\n\nprint(client.account_linked().json()) #make api calls\n```\n\n## What can this program do?\n - Authenticate and access the api \n - Functions for all api functions (examples in `tests/api_demo.py`)\n - Auto \"access token\" updates (`client.update_tokens_auto()`)\n - Stream real-time data with customizable response handler (examples in `tests/stream_demo.py`)\n ### TBD \n - Automatic refresh token updates. (Waiting for Schwab implementation)\n\n## Notes\n\nThe schwabdev folder contains code for main operations:     \n - `api.py` contains functions relating to api calls, requests, and automatic token checker threads.\n - `stream.py` contains functions for streaming data from websockets.\n - `color_print.py` contains functions to print to the terminal with color.\n\n## Youtube Tutorials\n1. [Authentication and Requests](https://www.youtube.com/watch?v=kHbom0KIJwc&ab_channel=TylerBowers) *Github code has significantly changed since this video*\n2. [Streaming Real-time Data](https://www.youtube.com/watch?v=t7F2dUecgWc&list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8&index=2&ab_channel=TylerBowers)\n\n## License (MIT)\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Schwab API Python Client (unofficial)",
    "version": "2.1.0",
    "project_urls": {
        "PyPI": "https://pypi.org/project/schwabdev/",
        "Source": "https://github.com/tylerebowers/Schwab-API-Python",
        "Youtube": "https://www.youtube.com/playlist?list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8"
    },
    "split_keywords": [
        "python",
        " schwab",
        " api",
        " client",
        " finance",
        " trading",
        " stocks",
        " equities",
        " options",
        " forex",
        " futures"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c885a25307fc86b092ca8010ac885caf90baa5cb1c181f0c1da742938386285c",
                "md5": "80fa680bd397e012ef9d6ef8146bc3e9",
                "sha256": "4c0a66993f89544ec5456d4075cea6ebf3ba8d15d1b8cc96dff8076cbf2f6c8e"
            },
            "downloads": -1,
            "filename": "schwabdev-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80fa680bd397e012ef9d6ef8146bc3e9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 14579,
            "upload_time": "2024-06-21T20:45:31",
            "upload_time_iso_8601": "2024-06-21T20:45:31.161230Z",
            "url": "https://files.pythonhosted.org/packages/c8/85/a25307fc86b092ca8010ac885caf90baa5cb1c181f0c1da742938386285c/schwabdev-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d19e8e0315d89201bfd6356bb8494af499f042009383d10e5d17597044be2ec8",
                "md5": "836dae2a408940ab88f23f2c3643637c",
                "sha256": "82cc061b17ce5feae6a1e5ab30d380446742826443d736a4e1ddb814cedcd2fd"
            },
            "downloads": -1,
            "filename": "schwabdev-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "836dae2a408940ab88f23f2c3643637c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 15740,
            "upload_time": "2024-06-21T20:45:32",
            "upload_time_iso_8601": "2024-06-21T20:45:32.329167Z",
            "url": "https://files.pythonhosted.org/packages/d1/9e/8e0315d89201bfd6356bb8494af499f042009383d10e5d17597044be2ec8/schwabdev-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-21 20:45:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tylerebowers",
    "github_project": "Schwab-API-Python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "schwabdev"
}
        
Elapsed time: 0.26818s