{"id":15442857,"url":"https://github.com/timkpaine/tdameritrade","last_synced_at":"2025-05-15T23:08:14.574Z","repository":{"id":38804549,"uuid":"140734665","full_name":"timkpaine/tdameritrade","owner":"timkpaine","description":"Python interface to TD Ameritrade (https://developer.tdameritrade.com)","archived":false,"fork":false,"pushed_at":"2024-11-19T00:03:09.000Z","size":1122,"stargazers_count":516,"open_issues_count":21,"forks_count":199,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-14T16:00:01.509Z","etag":null,"topics":["algorithmic-trading","finance","python","python3","tdameritrade","tdameritrade-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timkpaine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-12T15:51:31.000Z","updated_at":"2025-05-07T19:52:23.000Z","dependencies_parsed_at":"2023-12-12T01:26:59.049Z","dependency_job_id":"fb5fdd08-7793-4b20-98cd-23976ec27cc7","html_url":"https://github.com/timkpaine/tdameritrade","commit_stats":{"total_commits":195,"total_committers":23,"mean_commits":8.478260869565217,"dds":0.5435897435897437,"last_synced_commit":"95e77e6328815c8a65af406b0180d2248ae97825"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Ftdameritrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Ftdameritrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Ftdameritrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timkpaine%2Ftdameritrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timkpaine","download_url":"https://codeload.github.com/timkpaine/tdameritrade/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436949,"owners_count":22070947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithmic-trading","finance","python","python3","tdameritrade","tdameritrade-api"],"created_at":"2024-10-01T19:30:49.911Z","updated_at":"2025-05-15T23:08:08.600Z","avatar_url":"https://github.com/timkpaine.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tdameritrade\nPython interface to TD Ameritrade Api\n\n[![Build Status](https://github.com/timkpaine/tdameritrade/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/timkpaine/tdameritrade/actions?query=workflow%3A%22Build+Status%22)\n[![Coverage](https://codecov.io/gh/timkpaine/tdameritrade/branch/main/graph/badge.svg)](https://codecov.io/gh/timkpaine/tdameritrade)\n[![License](https://img.shields.io/github/license/timkpaine/tdameritrade.svg)](https://pypi.python.org/pypi/tdameritrade/)\n[![PyPI](https://img.shields.io/pypi/v/tdameritrade.svg)](https://pypi.python.org/pypi/tdameritrade/)\n\n\n\n## Getting Started\n\n### Install\nInstall from pip\n\n`pip install tdameritrade`\n\nor from source\n\n`python setup.py install`\n\n\n### Docs\nMajor changes in the v0.1.0 update to the way tokens are handled.  \nYou will still need the original authentication instructions, but the TDClient now takes the refresh token and client\nid, not the access token. A new session class handles token expiration and will automatically call a new token as\nneeded. \n\nIt is recommended that you store these as environmental variables.  \n\n```\nclient_id = os.getenv('TDAMERITRADE_CLIENT_ID')\naccount_id = os.getenv('TDAMERITRADE_ACCOUNT_ID')\nrefresh_token = os.getenv('TDAMERITRADE_REFRESH_TOKEN')\n\ntdclient = tdameritrade.TDClient(client_id=client_id, refresh_token=refresh_token, account_ids=[account_id])\n``` \n\nSee the tests\\test_client.py file for examples on current usage. \n\nAll functionality is available as methods on the `TDClient` object. For most methods, there is a convenience method to return the result as a pandas DataFrame.\n\n![](https://raw.githubusercontent.com/timkpaine/tdameritrade/main/docs/img/client/client.png)\n\nMost data fetching methods accept the symbol as argument. For equities, this is just the ticker.\n\n![](https://raw.githubusercontent.com/timkpaine/tdameritrade/main/docs/img/client/quote.png)\n\nFor different assets, utilize the `search` and `instrument` methods to lookup symbols. For options, you can utilize the options method.\n\n![](https://raw.githubusercontent.com/timkpaine/tdameritrade/main/docs/img/options.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Ftdameritrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimkpaine%2Ftdameritrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimkpaine%2Ftdameritrade/lists"}