schwabdev


Nameschwabdev JSON
Version 2.4.4 PyPI version JSON
download
home_pagehttps://github.com/tylerebowers/Schwab-API-Python
SummaryAn easy and lightweight wrapper for using the Charles Schwab API.
upload_time2024-11-10 18:53:17
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 package is not affiliated with or endorsed by Schwab, it is maintained by [Tyler Bowers](https://github.com/tylerebowers) & Contributors.   
It is licensed under the MIT license, and acts in accordance with Schwab's API terms and conditions.  
[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`  
*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"
   - Make a new app with **both** API products: "Accounts and Trading Production" and "Market Data Production".  
   - Wait until the app 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 `pip install schwabdev`
   - *You may need to use `pip3` instead of `pip`*
3. Examples on how to use the client are in the `examples/` folder (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) or consult the `/docs` folder.  
```py
import schwabdev #import the package

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

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

## What can this program do?
 - Authenticate and access the full api. 
 - Automatic token management and "access token" refreshes.
 - Functions for all api functions (examples in `examples/api_demo.py`)
 - Stream real-time data with a customizable response handler (examples in `examples/stream_demo.py`)
 - Place orders and get order details (examples in `examples/orders_demo.py`)
 - Option for capture of callback urls when callback has a port (starts webserver on this port).
 - Option for automatic starting/stopping of streamer when market opens/closes.
 - Streaming stability with automatic restarts if the streamer crashes.

### Notes
The schwabdev folder contains code for main operations:   
 - `__init__.py` linker to client class.
 - `client.py` contains functions relating to api calls and requests.
 - `tokens.py` contains functions relating to token management.
 - `stream.py` contains functions for streaming data from websockets.

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

## MIT License

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": "https://github.com/tylerebowers/Schwab-API-Python",
    "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/e2/37/3c76804c295bd0c415faffc451e89aa47742ae9fedb4c0dc255467047123/schwabdev-2.4.4.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 package is not affiliated with or endorsed by Schwab, it is maintained by [Tyler Bowers](https://github.com/tylerebowers) & Contributors.   \nIt is licensed under the MIT license, and acts in accordance with Schwab's API terms and conditions.  \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`  \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\"\n   - Make a new app with **both** API products: \"Accounts and Trading Production\" and \"Market Data Production\".  \n   - Wait until the app 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 `pip install schwabdev`\n   - *You may need to use `pip3` instead of `pip`*\n3. Examples on how to use the client are in the `examples/` folder (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. \n   - 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) or consult the `/docs` folder.  \n```py\nimport schwabdev #import the package\n\nclient = schwabdev.Client('Your app key', 'Your app secret')  #create a client\n\nprint(client.account_linked().json()) #make api calls\n```\n\n## What can this program do?\n - Authenticate and access the full api. \n - Automatic token management and \"access token\" refreshes.\n - Functions for all api functions (examples in `examples/api_demo.py`)\n - Stream real-time data with a customizable response handler (examples in `examples/stream_demo.py`)\n - Place orders and get order details (examples in `examples/orders_demo.py`)\n - Option for capture of callback urls when callback has a port (starts webserver on this port).\n - Option for automatic starting/stopping of streamer when market opens/closes.\n - Streaming stability with automatic restarts if the streamer crashes.\n\n### Notes\nThe schwabdev folder contains code for main operations:   \n - `__init__.py` linker to client class.\n - `client.py` contains functions relating to api calls and requests.\n - `tokens.py` contains functions relating to token management.\n - `stream.py` contains functions for streaming data from websockets.\n\n## Youtube Tutorials\n*Github code has changed since these videos*\n1. [Authentication and Requests](https://www.youtube.com/watch?v=kHbom0KIJwc&ab_channel=TylerBowers) \n2. [Streaming Real-time Data](https://www.youtube.com/watch?v=t7F2dUecgWc&list=PLs4JLWxBQIxpbvCj__DjAc0RRTlBz-TR8&index=2&ab_channel=TylerBowers) \n\n## MIT License\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": "An easy and lightweight wrapper for using the Charles Schwab API.",
    "version": "2.4.4",
    "project_urls": {
        "Homepage": "https://github.com/tylerebowers/Schwab-API-Python",
        "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": "525c71e2b869ac1a7df1d9f37672fa89489d6eca607b3defe64c680e1e62efc4",
                "md5": "64b3cbe75c32d2677103f8abaa6575ca",
                "sha256": "47737e3a733bfe008d9cda552304dcfd3e942f368b04ece899891a895e48125c"
            },
            "downloads": -1,
            "filename": "schwabdev-2.4.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "64b3cbe75c32d2677103f8abaa6575ca",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 19080,
            "upload_time": "2024-11-10T18:53:16",
            "upload_time_iso_8601": "2024-11-10T18:53:16.389731Z",
            "url": "https://files.pythonhosted.org/packages/52/5c/71e2b869ac1a7df1d9f37672fa89489d6eca607b3defe64c680e1e62efc4/schwabdev-2.4.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2373c76804c295bd0c415faffc451e89aa47742ae9fedb4c0dc255467047123",
                "md5": "ac7f4f86f27a950be975b73280debe42",
                "sha256": "ce65496398d973b3963b1df0aa70c2659fd997badc5176b1fdf43ded4a1ebadc"
            },
            "downloads": -1,
            "filename": "schwabdev-2.4.4.tar.gz",
            "has_sig": false,
            "md5_digest": "ac7f4f86f27a950be975b73280debe42",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 19912,
            "upload_time": "2024-11-10T18:53:17",
            "upload_time_iso_8601": "2024-11-10T18:53:17.917476Z",
            "url": "https://files.pythonhosted.org/packages/e2/37/3c76804c295bd0c415faffc451e89aa47742ae9fedb4c0dc255467047123/schwabdev-2.4.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-10 18:53:17",
    "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.42577s