qesdk


Nameqesdk JSON
Version 0.1.19 PyPI version JSON
download
home_page
SummaryQuantease SDK for quants
upload_time2024-01-16 03:31:59
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2022 quantease Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

## Project Description

- Provide history market quotation of futures and options in Chinese market for inquiry.
- Output pandas.DataFrame format data which is easy to use.
-  Support three frequency data: 'daily'/'mintue'/'tick'



## Installation

```
pip install qesdk
```



## Upgrade

```
pip install -U qesdk 
```



## Quick Start



#### Daily frequency

```
from qesdk import *
get_price('ZN2210.SFE','2022-07-11', '2022-07-24','daily')
```

return:

```
               open    close     high      low  volume         money  \
time                                                                   
2022-07-11  22890.0  22730.0  23095.0  22710.0    6622  7.586028e+08   
2022-07-12  22875.0  22825.0  23265.0  22570.0    6976  7.926840e+08   
2022-07-13  22825.0  22015.0  22830.0  21885.0    9616  1.090028e+09   
2022-07-14  21900.0  21385.0  22035.0  21175.0   17883  1.935010e+09   
2022-07-15  21400.0  21050.0  21505.0  20980.0   11737  1.242712e+09   
2022-07-18  21300.0  21780.0  21870.0  21215.0   10991  1.180527e+09   
2022-07-19  22120.0  22095.0  22230.0  22060.0    9348  1.035372e+09   
2022-07-20  21750.0  21970.0  22005.0  21600.0    8816  9.613756e+08   
2022-07-21  22300.0  22000.0  22300.0  21855.0    8543  9.477114e+08   
2022-07-22  21900.0  21925.0  21965.0  21770.0   13236  1.446647e+09   

            position  upperlimit  lowerlimit  presett  preclose   settle  
time                                                                      
2022-07-11   23345.0     25730.0     20215.0  22975.0   22890.0  22870.0  
2022-07-12   24395.0     25610.0     20125.0  22870.0   22950.0  22885.0  
2022-07-13   27160.0     25630.0     20135.0  22885.0   22825.0  22430.0  
2022-07-14   26170.0     25120.0     19735.0  22430.0   22015.0  21600.0  
2022-07-15   27301.0     24190.0     19005.0  21600.0   21385.0  21220.0  
2022-07-18   27857.0     23765.0     18670.0  21220.0   21050.0  21760.0  
2022-07-19   29230.0     24370.0     19145.0  21760.0   21985.0  21915.0  
2022-07-20   30704.0     24540.0     19285.0  21915.0   21660.0  21960.0  
2022-07-21   35460.0     24595.0     19320.0  21960.0   22095.0  22065.0  
2022-07-22   37524.0     24710.0     19415.0  22065.0   22000.0  21965.0  
```



#### Minute frequency

```
from qesdk import *
get_price('ZN2210.SFE','2022-07-11', '2022-07-24','minute')
```

return:

```
                        open    close     high      low  volume       money
time                                                                       
2022-07-11 09:01:00  22785.0  22760.0  22785.0  22700.0     163  18534950.0
2022-07-11 09:02:00  22760.0  22725.0  22760.0  22685.0     195  22134500.0
2022-07-11 09:03:00  22715.0  22720.0  22725.0  22700.0      39   4427900.0
2022-07-11 09:04:00  22720.0  22710.0  22720.0  22680.0      63   7152150.0
2022-07-11 09:05:00  22710.0  22700.0  22725.0  22690.0      47   5335800.0
...                      ...      ...      ...      ...     ...         ...
2022-07-23 00:56:00  22375.0  22360.0  22375.0  22360.0      13   1453650.0
2022-07-23 00:57:00  22375.0  22365.0  22375.0  22355.0      29   3242625.0
2022-07-23 00:58:00  22360.0  22355.0  22365.0  22355.0      25   2794725.0
2022-07-23 00:59:00  22355.0  22380.0  22385.0  22355.0      13   1454125.0
2022-07-23 01:00:00  22380.0  22400.0  22400.0  22375.0      69   7723875.0

[4170 rows x 6 columns]
```



#### Tick frequecy

```
from qesdk import *
get_ticks('ZN2210.SFE','2022-08-21', '2022-08-24',fields=['current', 'position','volume'])
```

return:

```
                         current  position  volume
time                                              
2022-08-22 09:00:00.500  24720.0   92068.0   61019
2022-08-22 09:00:01.000  24725.0   92054.0   61044
2022-08-22 09:00:01.500  24735.0   92052.0   61063
2022-08-22 09:00:02.000  24745.0   92071.0   61111
2022-08-22 09:00:02.500  24745.0   92067.0   61142
...                          ...       ...     ...
2022-08-23 23:59:54.000  24920.0   97685.0   42997
2022-08-23 23:59:54.500  24920.0   97685.0   42997
2022-08-23 23:59:55.500  24920.0   97685.0   42997
2022-08-23 23:59:59.500  24920.0   97685.0   42997
2022-08-24 00:00:00.000  24920.0   97685.0   42997

[8314 rows x 3 columns]
```



## More details

The detail document could be obtained on https://quantease.cn/newdoc/qesdk.html

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "qesdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "Scott Zhang <scott2011@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/b9/25/5f2c5780c645173f64a753c80b1d7536aa754630616246e37473de0c12b5/qesdk-0.1.19.tar.gz",
    "platform": null,
    "description": "\r\n\r\n## Project Description\r\n\r\n- Provide history market quotation of futures and options in Chinese market for inquiry.\r\n- Output pandas.DataFrame format data which is easy to use.\r\n-  Support three frequency data: 'daily'/'mintue'/'tick'\r\n\r\n\r\n\r\n## Installation\r\n\r\n```\r\npip install qesdk\r\n```\r\n\r\n\r\n\r\n## Upgrade\r\n\r\n```\r\npip install -U qesdk \r\n```\r\n\r\n\r\n\r\n## Quick Start\r\n\r\n\r\n\r\n#### Daily frequency\r\n\r\n```\r\nfrom qesdk import *\r\nget_price('ZN2210.SFE','2022-07-11', '2022-07-24','daily')\r\n```\r\n\r\nreturn:\r\n\r\n```\r\n               open    close     high      low  volume         money  \\\r\ntime                                                                   \r\n2022-07-11  22890.0  22730.0  23095.0  22710.0    6622  7.586028e+08   \r\n2022-07-12  22875.0  22825.0  23265.0  22570.0    6976  7.926840e+08   \r\n2022-07-13  22825.0  22015.0  22830.0  21885.0    9616  1.090028e+09   \r\n2022-07-14  21900.0  21385.0  22035.0  21175.0   17883  1.935010e+09   \r\n2022-07-15  21400.0  21050.0  21505.0  20980.0   11737  1.242712e+09   \r\n2022-07-18  21300.0  21780.0  21870.0  21215.0   10991  1.180527e+09   \r\n2022-07-19  22120.0  22095.0  22230.0  22060.0    9348  1.035372e+09   \r\n2022-07-20  21750.0  21970.0  22005.0  21600.0    8816  9.613756e+08   \r\n2022-07-21  22300.0  22000.0  22300.0  21855.0    8543  9.477114e+08   \r\n2022-07-22  21900.0  21925.0  21965.0  21770.0   13236  1.446647e+09   \r\n\r\n            position  upperlimit  lowerlimit  presett  preclose   settle  \r\ntime                                                                      \r\n2022-07-11   23345.0     25730.0     20215.0  22975.0   22890.0  22870.0  \r\n2022-07-12   24395.0     25610.0     20125.0  22870.0   22950.0  22885.0  \r\n2022-07-13   27160.0     25630.0     20135.0  22885.0   22825.0  22430.0  \r\n2022-07-14   26170.0     25120.0     19735.0  22430.0   22015.0  21600.0  \r\n2022-07-15   27301.0     24190.0     19005.0  21600.0   21385.0  21220.0  \r\n2022-07-18   27857.0     23765.0     18670.0  21220.0   21050.0  21760.0  \r\n2022-07-19   29230.0     24370.0     19145.0  21760.0   21985.0  21915.0  \r\n2022-07-20   30704.0     24540.0     19285.0  21915.0   21660.0  21960.0  \r\n2022-07-21   35460.0     24595.0     19320.0  21960.0   22095.0  22065.0  \r\n2022-07-22   37524.0     24710.0     19415.0  22065.0   22000.0  21965.0  \r\n```\r\n\r\n\r\n\r\n#### Minute frequency\r\n\r\n```\r\nfrom qesdk import *\r\nget_price('ZN2210.SFE','2022-07-11', '2022-07-24','minute')\r\n```\r\n\r\nreturn:\r\n\r\n```\r\n                        open    close     high      low  volume       money\r\ntime                                                                       \r\n2022-07-11 09:01:00  22785.0  22760.0  22785.0  22700.0     163  18534950.0\r\n2022-07-11 09:02:00  22760.0  22725.0  22760.0  22685.0     195  22134500.0\r\n2022-07-11 09:03:00  22715.0  22720.0  22725.0  22700.0      39   4427900.0\r\n2022-07-11 09:04:00  22720.0  22710.0  22720.0  22680.0      63   7152150.0\r\n2022-07-11 09:05:00  22710.0  22700.0  22725.0  22690.0      47   5335800.0\r\n...                      ...      ...      ...      ...     ...         ...\r\n2022-07-23 00:56:00  22375.0  22360.0  22375.0  22360.0      13   1453650.0\r\n2022-07-23 00:57:00  22375.0  22365.0  22375.0  22355.0      29   3242625.0\r\n2022-07-23 00:58:00  22360.0  22355.0  22365.0  22355.0      25   2794725.0\r\n2022-07-23 00:59:00  22355.0  22380.0  22385.0  22355.0      13   1454125.0\r\n2022-07-23 01:00:00  22380.0  22400.0  22400.0  22375.0      69   7723875.0\r\n\r\n[4170 rows x 6 columns]\r\n```\r\n\r\n\r\n\r\n#### Tick frequecy\r\n\r\n```\r\nfrom qesdk import *\r\nget_ticks('ZN2210.SFE','2022-08-21', '2022-08-24',fields=['current', 'position','volume'])\r\n```\r\n\r\nreturn:\r\n\r\n```\r\n                         current  position  volume\r\ntime                                              \r\n2022-08-22 09:00:00.500  24720.0   92068.0   61019\r\n2022-08-22 09:00:01.000  24725.0   92054.0   61044\r\n2022-08-22 09:00:01.500  24735.0   92052.0   61063\r\n2022-08-22 09:00:02.000  24745.0   92071.0   61111\r\n2022-08-22 09:00:02.500  24745.0   92067.0   61142\r\n...                          ...       ...     ...\r\n2022-08-23 23:59:54.000  24920.0   97685.0   42997\r\n2022-08-23 23:59:54.500  24920.0   97685.0   42997\r\n2022-08-23 23:59:55.500  24920.0   97685.0   42997\r\n2022-08-23 23:59:59.500  24920.0   97685.0   42997\r\n2022-08-24 00:00:00.000  24920.0   97685.0   42997\r\n\r\n[8314 rows x 3 columns]\r\n```\r\n\r\n\r\n\r\n## More details\r\n\r\nThe detail document could be obtained on https://quantease.cn/newdoc/qesdk.html\r\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 quantease  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Quantease SDK for quants",
    "version": "0.1.19",
    "project_urls": {
        "Bug Tracker": "https://github.com/quantease/qesdk/issues",
        "Homepage": "https://github.com/quantease/qesdk"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af75b5b395573f8c3d180ea6e52d3d7c2828edee47b8b630b0587c577f5f2f5d",
                "md5": "5ce42a8727532aa941437a444112ea96",
                "sha256": "0a3553b52fc290428a258b10192f941d5f05a641e82048bbe68c9775e00bcd80"
            },
            "downloads": -1,
            "filename": "qesdk-0.1.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ce42a8727532aa941437a444112ea96",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 16285,
            "upload_time": "2024-01-16T03:31:58",
            "upload_time_iso_8601": "2024-01-16T03:31:58.402152Z",
            "url": "https://files.pythonhosted.org/packages/af/75/b5b395573f8c3d180ea6e52d3d7c2828edee47b8b630b0587c577f5f2f5d/qesdk-0.1.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9255f2c5780c645173f64a753c80b1d7536aa754630616246e37473de0c12b5",
                "md5": "69b4d3fdf67202a47e37b3cba26ee853",
                "sha256": "b5c794180240f743dd8c36ee1b5212c5ce8954a1ca16c281c45099e22ff19889"
            },
            "downloads": -1,
            "filename": "qesdk-0.1.19.tar.gz",
            "has_sig": false,
            "md5_digest": "69b4d3fdf67202a47e37b3cba26ee853",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 15686,
            "upload_time": "2024-01-16T03:31:59",
            "upload_time_iso_8601": "2024-01-16T03:31:59.802106Z",
            "url": "https://files.pythonhosted.org/packages/b9/25/5f2c5780c645173f64a753c80b1d7536aa754630616246e37473de0c12b5/qesdk-0.1.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-16 03:31:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "quantease",
    "github_project": "qesdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "qesdk"
}
        
Elapsed time: 0.16975s