marketwatchdata


Namemarketwatchdata JSON
Version 0.0.16 PyPI version JSON
download
home_pagehttps://github.com/yacper/marketwatchdata
Summaryretrieve data from MarketWatch.com
upload_time2023-07-24 11:18:14
maintainer
docs_urlNone
authoryacper
requires_python>=3.8
licenseMIT
keywords stock option futures fund bond index air finance spider quant quantitative investment trading algotrading data
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # marketwatchdata


[![pypi](https://img.shields.io/pypi/v/marketwatchdata.svg)](https://pypi.org/project/marketwatchdata/)
[![downloads](https://pepy.tech/badge/marketwatchdata)](https://pepy.tech/project/marketwatchdata)
[![documentation status](https://readthedocs.org/projects/marketwatchdata/badge/?version=latest)](https://marketwatchdata.readthedocs.io/en/latest/?badge=latest)
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![actions status](https://github.com/yacper/marketwatchdata/actions/workflows/check.yml/badge.svg)](https://github.com/yacper/marketwatchdata/actions)
[![mit licence](https://camo.githubusercontent.com/14a9abb7e83098f2949f26d2190e04fb1bd52c06/68747470733a2f2f626c61636b2e72656164746865646f63732e696f2f656e2f737461626c652f5f7374617469632f6c6963656e73652e737667)](https://github.com/yacper/marketwatchdata/blob/main/license)

## overview

[marketwathdata](https://github.com/yacper/marketwatchdata) retrieve datas from marketwatch.com.

- documentation: [文档](https://marketwatchdata.readthedocs.io/)


## installation

### general

```shell
pip install marketwatchdata --upgrade
```

### china

```shell
pip install marketwatchdata -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com  --upgrade
```
#### test

```python
import marketwatchdata as mw

print(mw.__version__)
```

## usage

### data

code

```python
import marketwatchdata as mw

df = mw.ohlc('stock/us/xnas/aapl', 'p1d', 'p1y')
print(df)
```

output

```
                open     high      low   close       volume
date
2022-07-25  154.010  155.040  152.280  152.95   53623953.0
2022-07-26  152.265  153.085  150.800  151.60   55138688.0
2022-07-27  152.580  157.330  152.160  156.79   78620688.0
2022-07-28  156.980  157.640  154.410  157.35   81378727.0
2022-07-29  161.240  163.630  159.500  162.51  101786898.0
...             ...      ...      ...     ...          ...
2023-07-17  191.900  194.320  191.810  193.99   50520160.0
2023-07-18  193.350  194.330  192.415  193.73   48353770.0
2023-07-19  193.100  198.230  192.650  195.10   80507320.0
2023-07-20  195.090  196.470  192.495  193.13   59581199.0
2023-07-21  194.100  194.970  191.230  191.94   71951683.0

[250 rows x 5 columns]
```

### plot

code

```python
import marketwatchdata as mw
import mplfinance as mpf  # please install mplfinance as follows: pip install mplfinance

df = mw.ohlc('stock/us/xnas/aapl', 'p1d', 'p1y')
mpf.plot(df, type='candle', mav=(3, 6, 9), volume=true, show_nontrading=false)
```

output

![](https://user-images.githubusercontent.com/668255/255549764-1665d2e5-f50d-462d-a4a6-ed04e7f7517a.png)

## acknowledgement

thanks for the data provided by [marketwatch](http://www.marketwatch.com/);

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yacper/marketwatchdata",
    "name": "marketwatchdata",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "stock,option,futures,fund,bond,index,air,finance,spider,quant,quantitative,investment,trading,algotrading,data",
    "author": "yacper",
    "author_email": "yacper@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/17/d0/2071c4d0c55fbd9dd2c6f11243bf13ce080e01f35ab569abd5792f08a48b/marketwatchdata-0.0.16.tar.gz",
    "platform": null,
    "description": "# marketwatchdata\n\n\n[![pypi](https://img.shields.io/pypi/v/marketwatchdata.svg)](https://pypi.org/project/marketwatchdata/)\n[![downloads](https://pepy.tech/badge/marketwatchdata)](https://pepy.tech/project/marketwatchdata)\n[![documentation status](https://readthedocs.org/projects/marketwatchdata/badge/?version=latest)](https://marketwatchdata.readthedocs.io/en/latest/?badge=latest)\n[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![actions status](https://github.com/yacper/marketwatchdata/actions/workflows/check.yml/badge.svg)](https://github.com/yacper/marketwatchdata/actions)\n[![mit licence](https://camo.githubusercontent.com/14a9abb7e83098f2949f26d2190e04fb1bd52c06/68747470733a2f2f626c61636b2e72656164746865646f63732e696f2f656e2f737461626c652f5f7374617469632f6c6963656e73652e737667)](https://github.com/yacper/marketwatchdata/blob/main/license)\n\n## overview\n\n[marketwathdata](https://github.com/yacper/marketwatchdata) retrieve datas from marketwatch.com.\n\n- documentation: [\u6587\u6863](https://marketwatchdata.readthedocs.io/)\n\n\n## installation\n\n### general\n\n```shell\npip install marketwatchdata --upgrade\n```\n\n### china\n\n```shell\npip install marketwatchdata -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com  --upgrade\n```\n#### test\n\n```python\nimport marketwatchdata as mw\n\nprint(mw.__version__)\n```\n\n## usage\n\n### data\n\ncode\n\n```python\nimport marketwatchdata as mw\n\ndf = mw.ohlc('stock/us/xnas/aapl', 'p1d', 'p1y')\nprint(df)\n```\n\noutput\n\n```\n                open     high      low   close       volume\ndate\n2022-07-25  154.010  155.040  152.280  152.95   53623953.0\n2022-07-26  152.265  153.085  150.800  151.60   55138688.0\n2022-07-27  152.580  157.330  152.160  156.79   78620688.0\n2022-07-28  156.980  157.640  154.410  157.35   81378727.0\n2022-07-29  161.240  163.630  159.500  162.51  101786898.0\n...             ...      ...      ...     ...          ...\n2023-07-17  191.900  194.320  191.810  193.99   50520160.0\n2023-07-18  193.350  194.330  192.415  193.73   48353770.0\n2023-07-19  193.100  198.230  192.650  195.10   80507320.0\n2023-07-20  195.090  196.470  192.495  193.13   59581199.0\n2023-07-21  194.100  194.970  191.230  191.94   71951683.0\n\n[250 rows x 5 columns]\n```\n\n### plot\n\ncode\n\n```python\nimport marketwatchdata as mw\nimport mplfinance as mpf  # please install mplfinance as follows: pip install mplfinance\n\ndf = mw.ohlc('stock/us/xnas/aapl', 'p1d', 'p1y')\nmpf.plot(df, type='candle', mav=(3, 6, 9), volume=true, show_nontrading=false)\n```\n\noutput\n\n![](https://user-images.githubusercontent.com/668255/255549764-1665d2e5-f50d-462d-a4a6-ed04e7f7517a.png)\n\n## acknowledgement\n\nthanks for the data provided by [marketwatch](http://www.marketwatch.com/);\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "retrieve data from MarketWatch.com",
    "version": "0.0.16",
    "project_urls": {
        "Homepage": "https://github.com/yacper/marketwatchdata"
    },
    "split_keywords": [
        "stock",
        "option",
        "futures",
        "fund",
        "bond",
        "index",
        "air",
        "finance",
        "spider",
        "quant",
        "quantitative",
        "investment",
        "trading",
        "algotrading",
        "data"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0378e3c2681ae4cd4258fda06071c3f95ef42527cc29446a51f9bdc1f1a22f1b",
                "md5": "047f3e959397574d09b37bcf3b31e7bf",
                "sha256": "064da7295c75566a95ccc5610c3060568756feeb9635fdf432bf36dbd70404f3"
            },
            "downloads": -1,
            "filename": "marketwatchdata-0.0.16-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "047f3e959397574d09b37bcf3b31e7bf",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6334,
            "upload_time": "2023-07-24T11:18:12",
            "upload_time_iso_8601": "2023-07-24T11:18:12.191069Z",
            "url": "https://files.pythonhosted.org/packages/03/78/e3c2681ae4cd4258fda06071c3f95ef42527cc29446a51f9bdc1f1a22f1b/marketwatchdata-0.0.16-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17d02071c4d0c55fbd9dd2c6f11243bf13ce080e01f35ab569abd5792f08a48b",
                "md5": "06ca42aa45805c410215d1680ddb008c",
                "sha256": "79c6729b9160685f56008d5457f4180c2c108d3075e3fd8ce19f6623f23c528d"
            },
            "downloads": -1,
            "filename": "marketwatchdata-0.0.16.tar.gz",
            "has_sig": false,
            "md5_digest": "06ca42aa45805c410215d1680ddb008c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5689,
            "upload_time": "2023-07-24T11:18:14",
            "upload_time_iso_8601": "2023-07-24T11:18:14.499470Z",
            "url": "https://files.pythonhosted.org/packages/17/d0/2071c4d0c55fbd9dd2c6f11243bf13ce080e01f35ab569abd5792f08a48b/marketwatchdata-0.0.16.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-24 11:18:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yacper",
    "github_project": "marketwatchdata",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "marketwatchdata"
}
        
Elapsed time: 0.10996s