# Project description
## Important
**! Arguments' naming has been changed since 0.1.x release. !**
## Disclaimer
This project is **not affilliated** with [MOEX](https://www.moex.com).
You should refer to MOEX's official documents for terms of use the market data.
## Description
The package allows to get quotes and data from [MOEX ISS](https://iss.moex.com/iss/reference/) interface over HTTPS.
[API docs](https://github.com/cdracer/moex-importer/wiki/Documentation) for moeximporter.
## Installation
Install `moeximporter`:
`$ pip install moeximporter`
## Requirements
- pandas
## Examples
### Importing modules
```
# Import required modules
from datetime import date
from moeximporter import MoexImporter, MoexSecurity, MoexCandlePeriods
```
### Initialization
Class `MoexImporter` is used for all https-requests to the ISS API. You should create at least one copy of the class to use for data-requests.
You can pass your own http-header to the class-constructor. `_loadinfo` flag allows to get additional data from the exchange during the class initialization. You may use this data to check available *engines* and *markets*. You do not need to set this flag to `True` if you often create copies of the class to speedup the code. Additional data isn't required for
```
# Create an object to access ISS API requests
mi = MoexImporter()
# Get all traded securities
seclist = mi.getSecuritiesAllTraded()
# Get all traded bonds
seclist = mi.getBondsAllTraded()
# Get all traded shares
seclist = mi.getSharesAllTraded()
# Search for traded security
seclist = mi.searchForSecurityTraded('ОФЗ')
```
### Working with securities
Class `MoexSecuirty` is used to get quotes and additional data for the security. You should pass an appropriate ticker and `MoexImporter` object that you have created before.
```
# Create an object to access sequirity data
sec = MoexSecurity('GAZP', mi)
# Print information about security
print(sec)
# Request quotes as a pandas DataFrame
quotes_df = sec.getHistoryQuotesAsDataFrame(date(2023, 5, 1), date(2023, 9, 20))
# Request quotes as an array of dicts
quotes_arr = sec.getHistoryQuotesAsArray(date(2023, 5, 1), date(2023, 9, 20))
# Request candles as a pandas DataFrame
candles_df = sec.getCandleQuotesAsDataFrame(date(2023, 5, 1), date(2023, 9, 20), interval=MoexCandlePeriods.Period1Hour)
# Request candles as an array of dicts
candles_arr = sec.getCandleQuotesAsArray(date(2023, 5, 1), date(2023, 9, 20), interval=MoexCandlePeriods.Period1Hour)
```
## Licensing
The package is distributed under MIT License. See details in LICENSE.txt file.
Raw data
{
"_id": null,
"home_page": "https://github.com/cdracer/moex-importer",
"name": "moeximporter",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,MOEX,MOEX quotes,finance",
"author": "Konstantin Novik",
"author_email": "<konstantin.novik@gmail.com>",
"download_url": "",
"platform": null,
"description": "# Project description\n\n## Important\n**! Arguments' naming has been changed since 0.1.x release. !**\n\n## Disclaimer\nThis project is **not affilliated** with [MOEX](https://www.moex.com).\n\nYou should refer to MOEX's official documents for terms of use the market data.\n\n## Description\n\nThe package allows to get quotes and data from [MOEX ISS](https://iss.moex.com/iss/reference/) interface over HTTPS.\n\n[API docs](https://github.com/cdracer/moex-importer/wiki/Documentation) for moeximporter.\n\n## Installation\nInstall `moeximporter`:\n\n`$ pip install moeximporter`\n\n## Requirements\n- pandas\n\n## Examples\n### Importing modules\n```\n# Import required modules\nfrom datetime import date\nfrom moeximporter import MoexImporter, MoexSecurity, MoexCandlePeriods\n```\n\n### Initialization\nClass `MoexImporter` is used for all https-requests to the ISS API. You should create at least one copy of the class to use for data-requests.\n\nYou can pass your own http-header to the class-constructor. `_loadinfo` flag allows to get additional data from the exchange during the class initialization. You may use this data to check available *engines* and *markets*. You do not need to set this flag to `True` if you often create copies of the class to speedup the code. Additional data isn't required for\n```\n# Create an object to access ISS API requests\nmi = MoexImporter()\n\n# Get all traded securities\nseclist = mi.getSecuritiesAllTraded()\n\n# Get all traded bonds\nseclist = mi.getBondsAllTraded()\n\n# Get all traded shares\nseclist = mi.getSharesAllTraded()\n\n# Search for traded security\nseclist = mi.searchForSecurityTraded('\u041e\u0424\u0417')\n\n```\n\n### Working with securities\nClass `MoexSecuirty` is used to get quotes and additional data for the security. You should pass an appropriate ticker and `MoexImporter` object that you have created before.\n\n```\n# Create an object to access sequirity data\nsec = MoexSecurity('GAZP', mi)\n\n# Print information about security\nprint(sec)\n\n# Request quotes as a pandas DataFrame\nquotes_df = sec.getHistoryQuotesAsDataFrame(date(2023, 5, 1), date(2023, 9, 20))\n\n# Request quotes as an array of dicts\nquotes_arr = sec.getHistoryQuotesAsArray(date(2023, 5, 1), date(2023, 9, 20))\n\n# Request candles as a pandas DataFrame\ncandles_df = sec.getCandleQuotesAsDataFrame(date(2023, 5, 1), date(2023, 9, 20), interval=MoexCandlePeriods.Period1Hour)\n\n# Request candles as an array of dicts\ncandles_arr = sec.getCandleQuotesAsArray(date(2023, 5, 1), date(2023, 9, 20), interval=MoexCandlePeriods.Period1Hour)\n\n```\n## Licensing\n\nThe package is distributed under MIT License. See details in LICENSE.txt file.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "MOEX Importer package",
"version": "0.2.4",
"project_urls": {
"Homepage": "https://github.com/cdracer/moex-importer"
},
"split_keywords": [
"python",
"moex",
"moex quotes",
"finance"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5aaecb50d0e5bbc7eb61d5da6046e14e1de944a72ce41a80dd15d87268bd9a1f",
"md5": "65401205cf637c4b1b79df3ef420578c",
"sha256": "315a8ba99c39ec0339bdb2798ea5f5a0a2c1481f79bc876236433ccf890a0f6c"
},
"downloads": -1,
"filename": "moeximporter-0.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "65401205cf637c4b1b79df3ef420578c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11454,
"upload_time": "2023-10-23T00:47:34",
"upload_time_iso_8601": "2023-10-23T00:47:34.965716Z",
"url": "https://files.pythonhosted.org/packages/5a/ae/cb50d0e5bbc7eb61d5da6046e14e1de944a72ce41a80dd15d87268bd9a1f/moeximporter-0.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-23 00:47:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cdracer",
"github_project": "moex-importer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "moeximporter"
}