{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.com/jborchma/qtrade.svg?branch=master)](https://travis-ci.com/jborchma/qtrade)\n\n# Qtrade\n\nThis is a very basic Python 3 wrapper for the [Questrade API](https://www.questrade.com/api/documentation/getting-started), a Canadian low cost broker.\n\n## Usage\n\n\n### Token management\n\nThe central class can be initialized via\n\n```python\nfrom qtrade import Questrade\n\nqtrade = Questrade(access_code='')\nqtrade.get_access_token()\n```\nwhere `` is the token that one gets from the Questrade API portal. It is called\n`access_code` since this initial token is used to get the full token data that will include\n```python\n{'access_token': ,\n 'api_server': '',\n 'expires_in': 1234,\n 'refresh_token': ,\n 'token_type': 'Bearer'}\n ```\n\nThe first call initializes the class and the second call gets the full token.\n\nAnother way to initialize the class is to use a token yaml-file via:\n```python\nqtrade = Questrade(token_yaml='')\n```\nwhere the yaml-file would have the general form\n```yaml\naccess_token: \napi_server: \nexpires_in: 1234\nrefresh_token: \ntoken_type: Bearer\n```\n\nIf the token is expired, one can use\n```python\nqtrade.refresh_token()\n```\nto refresh the access token using the saved refresh token.\n\nOnce the tokens are set correctly, I have currently added methods to get ticker quotes, the\ncurrent status of all positions in any Questrade account that is associated with the tokens,\nany account activities such as trades and dividend payments as well as historical data for\ntickers that are supported by Questrade.\n\n### Basic functionality\n\nThere currently exists some basic functionality to get stock information via\n\n```python\naapl, amzn = qtrade.ticker_information(['AAPL', 'AMZN'])\n```\n\nand current stock quotes can be obtained via\n\n```python\naapl, amzn = qtrade.get_quote(['AAPL', 'AMZN'])\n```\n\nIn addition, one can get historical stock quotes via\n\n```python\naapl_history = = qtrade.get_historical_data('AAPL', '2018-08-01', '2018-08-21','OneHour')\n```\n\nHere, the last input parameter is the interval between quotes. Another option could be `'OneDay'`. For more options, see the [Questrade API description](http://www.questrade.com/api/documentation/rest-operations/enumerations/enumerations#historical-data-granularity).\n\n### Account information\n\nIn addition, the Questrade API gives access to account information about the accounts connected to\nthe token. The accounts IDs can be accessed via\n\n```python\naccount_ids = qtrade.get_account_id()\n```\n\nBy using the correct account ID, one can get the positions of the accounts via\n\n```python\npositions = qtrade.get_account_positions(account_id=123456)\n```\n\nFinally, there exists a method to get all account activities (trades, dividends recieved, etc.) of\nan account in a certain time frame via\n\n```python\nactivities = qtrade.get_account_activities(123456, '2018-08-01', '2018-08-16')\n```\n\n\n## Contributors\n\nThere is a test suite that can be run via `python -m pytest`.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jborchma/qtrade", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "qtrade", "package_url": "https://pypi.org/project/qtrade/", "platform": "", "project_url": "https://pypi.org/project/qtrade/", "project_urls": { "Homepage": "https://github.com/jborchma/qtrade" }, "release_url": "https://pypi.org/project/qtrade/0.1/", "requires_dist": [ "PyYAML (>=3.12)" ], "requires_python": "", "summary": "Questrade API wrapper for Python", "version": "0.1" }, "last_serial": 4871903, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "37301f7329bc1710163c1a887c061d62", "sha256": "6aff08b03a67e7b5c06fa4bc798ee09b146891a89ee05ce6da11f1bf0dde7ae2" }, "downloads": -1, "filename": "qtrade-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "37301f7329bc1710163c1a887c061d62", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7357, "upload_time": "2019-02-26T23:56:12", "url": "https://files.pythonhosted.org/packages/74/27/18169da50507eaeac5efe1b84bfa1a1c534ede70b5a0ef6b49e9c26053e0/qtrade-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef542c1ba3ccb38ba038b0c1b0ab580c", "sha256": "26e2505b6265e8edf95333f024e69d069ab8a04212ed54e4f852db04addd085e" }, "downloads": -1, "filename": "qtrade-0.1.tar.gz", "has_sig": false, "md5_digest": "ef542c1ba3ccb38ba038b0c1b0ab580c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5939, "upload_time": "2019-02-26T23:56:14", "url": "https://files.pythonhosted.org/packages/eb/15/3f85ddf7df390894532dbf7735481c372ebf73f79a94e7218a9ed2c0ba80/qtrade-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "37301f7329bc1710163c1a887c061d62", "sha256": "6aff08b03a67e7b5c06fa4bc798ee09b146891a89ee05ce6da11f1bf0dde7ae2" }, "downloads": -1, "filename": "qtrade-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "37301f7329bc1710163c1a887c061d62", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7357, "upload_time": "2019-02-26T23:56:12", "url": "https://files.pythonhosted.org/packages/74/27/18169da50507eaeac5efe1b84bfa1a1c534ede70b5a0ef6b49e9c26053e0/qtrade-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ef542c1ba3ccb38ba038b0c1b0ab580c", "sha256": "26e2505b6265e8edf95333f024e69d069ab8a04212ed54e4f852db04addd085e" }, "downloads": -1, "filename": "qtrade-0.1.tar.gz", "has_sig": false, "md5_digest": "ef542c1ba3ccb38ba038b0c1b0ab580c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5939, "upload_time": "2019-02-26T23:56:14", "url": "https://files.pythonhosted.org/packages/eb/15/3f85ddf7df390894532dbf7735481c372ebf73f79a94e7218a9ed2c0ba80/qtrade-0.1.tar.gz" } ] }