{"id":13700050,"url":"https://github.com/datawrestler/after-hours","last_synced_at":"2025-05-04T18:34:07.228Z","repository":{"id":55135552,"uuid":"41433966","full_name":"datawrestler/after-hours","owner":"datawrestler","description":"Obtain pre market and after hours stock prices for a given symbol","archived":true,"fork":false,"pushed_at":"2021-01-07T22:18:07.000Z","size":70,"stargazers_count":34,"open_issues_count":6,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T04:17:06.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datawrestler.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-26T15:35:09.000Z","updated_at":"2024-09-25T09:36:16.000Z","dependencies_parsed_at":"2022-08-14T13:00:53.487Z","dependency_job_id":null,"html_url":"https://github.com/datawrestler/after-hours","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawrestler%2Fafter-hours","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawrestler%2Fafter-hours/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawrestler%2Fafter-hours/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datawrestler%2Fafter-hours/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datawrestler","download_url":"https://codeload.github.com/datawrestler/after-hours/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252382860,"owners_count":21739229,"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":[],"created_at":"2024-08-02T20:00:47.835Z","updated_at":"2025-05-04T18:34:02.938Z","avatar_url":"https://github.com/datawrestler.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Data Sources","数据来源"],"readme":".. image:: https://travis-ci.org/datawrestler/after-hours.svg?branch=master\n    :target: https://travis-ci.org/datawrestler/after-hours\n\n.. image:: https://badge.fury.io/py/afterhours.svg\n    :target: https://badge.fury.io/py/afterhours\n\n.. image:: https://img.shields.io/badge/python-2.7-blue.svg\n    :target: https://badge.fury.io/py/afterhours\n\n.. image:: https://img.shields.io/badge/python-3.5-blue.svg\n    :target: https://badge.fury.io/py/afterhours\n\n.. image:: https://img.shields.io/badge/python-3.6-blue.svg\n    :target: https://badge.fury.io/py/afterhours\n\n\n********************************\nRead me for afterhours package\n********************************\n\nPython module afterhours can retrieve pre-market and after-hours trading prices from Nasdaq for a given stock symbol\n\n-Created by Jason Lewris\n\n-License: The MIT License\n\n-Developer Home Page: 'https://github.com/datawrestler'\n\n----\n\n\nDependencies\n~~~~~~~~~~~~~~~\n- Python (\u003e=2.6 or \u003e= 3.5)\n- beautifulsoup4 (\u003e= 4.6.0)\n- requests (\u003e= 2.18.4)\n- pandas (\u003e= 0.20.3)\n- lxml (\u003e= 4.1.0)\n\nValuable Links\n~~~~~~~~~~~~~~~~\n- Official source code repo: https://github.com/datawrestler/after-hours\n- Issue tracking: https://github.com/datawrestler/after-hours/issues\n- Download releases: https://pypi.python.org/pypi/afterhours\n\nMethod Overview\n----------------\n\n                                    +--------------------------------------+--------------------------------------+\n                                    |       Method Name                    |          Description                 |\n                                    +======================================+======================================+\n                                    |       AH.getdata(datatype='highprice)| Returns high market price            |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.getdata(datatype='lowprice')| Returns low market price             |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.getdata(datatype='volume')  | Returns total market volume          |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.getdata(datatype='hightime')| Returns datetime of high price       |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.getdata(datatype='lowtime') | Returns datetime of low price        |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.getdata(datatype='mktclose')| Returns market close price           |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.secure_all()                | Returns dataframe with all activity  |\n                                    +--------------------------------------+--------------------------------------+\n                                    |       AH.run_every()                 | Updates all data points continuosly  |\n                                    +--------------------------------------+--------------------------------------+\n\n\nInstallation\n**************\n\nInstallation is done using pip install:\n\n    .. code-block::\n\n        pip install afterhours\n\nAlternative installation can be done by downloading the source files directly from github, navigating to the directory through terminal and running the following:\n\n    .. code-block:: python\n\n        python setup.py install\n\n    .. note:: The source file can be downloaded here: https://github.com/datawrestler/after-hours/tarball/0.2.1\n\n\nAfter installation, the package is ready for use. Simply import it into your python script with the following:\n\n    .. code-block:: python\n\n        from afterhours.afterhours import AfterHours\n\n\nSource\n~~~~~~~~~~~~\n\nThe latest source code can be checked out with the following command:\n\n    .. code-block::\n    git clone https://github.com/datawrestler/after-hours.git\n\n\nExamples\n~~~~~~~~~~~~\n\n.. code-block:: python\n\n        from afterhours.afterhours import AfterHours\n\n        # AFTER HOURS TRADING DATA\n        AH = AfterHours('aapl', typeof = 'after')\n\n        # get the low price from after hours trading\n        print(AH.getdata(datatype='lowprice'))\n        # 102.18\n\n        # get the high price of after hours trading\n        print(AH.getdata(datatype='highprice'))\n        # 109.055\n\n        # get the timestamp of after hours high trade\n        print(AH.getdata(datatype='hightime'))\n        # '12/15/2017 18:58:46 PM'\n\n        print(AH.getdata(datatype='lowtime'))\n        # '12/15/2017 19:58:46 PM'\n\n        # get all data points for after hours trading\n        print(AH.secure_all())\n        # Pandas DataFrame\n\n        # PRE HOURS TRADING DATA\n        # get pre hours trading info for apple\n        AH = AfterHours('aapl', typeof='pre')\n\n        # get the low price from pre hours trading\n        print(AH.getdata(datatype='lowprice'))\n        # 102.18\n\n        # get the high price from pre hours trading\n        print(AH.getdata(datatype='highprice'))\n        # 109.055\n\n        # get the timestamp for lowest trade\n        print(AH.getdata(datatype='lowtime'))\n        # '12/15/2017 18:58:46 PM'\n\n        # get the timestamp for highest time trade\n        print(AH.getdata(datatype='hightime'))\n        # '12/15/2017 19:58:46 PM'\n\n        # secure all pre hours trading data\n        print(AH.secure_all())\n        # Pandas DataFrame\n\nPlease add any questions, comments, concerns to the issues tab on Github for the project! I look forward to seeing this package built out further in future releases.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawrestler%2Fafter-hours","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatawrestler%2Fafter-hours","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatawrestler%2Fafter-hours/lists"}