{ "info": { "author": "Rob Blackbourn", "author_email": "rob.blackbourn@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development", "Topic :: Software Development :: Libraries" ], "description": "# iex_parser\n\nParser for IEX pcap DEEP and TOPS files.\n\n## Overview\n\nAt the time of writing the IEX exchange provides two file downloads for\nhistorical data: DEEP and TOPS. This data is provided as a `pcap` file\nwhich is a dump of the network activity.\n\nThis package provides an API for extracting the data from these files.\n\n## Installation\n\nInstall from PyPi.\n\n```bash\npip install iex_parser\n```\n\n## Example\n\nThe following code processes the TOPS sample file downloaded from IEX. Note the file doesn't have to be unzipped.\n\n```python\nfrom iex_parser import Parser, TOPS_1_6\n\nTOPS_SAMPLE_DATA_FILE = 'data_feeds_20180127_20180127_IEXTP1_TOPS1.6.pcap.gz'\n\nwith Parser(TOPS_SAMPLE_DATA_FILE, TOPS_1_6) as reader:\n for message in reader:\n print(message)\n```\nThe result looks like this:\n\n```python\n{'type': 'trading_status', 'status': b'T', 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 40, 490473, tzinfo=datetime.timezone.utc), 'symbol': b'SPEM', 'reason': b''}\n{'type': 'trading_status', 'status': b'H', 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 42, 95642, tzinfo=datetime.timezone.utc), 'symbol': b'INCO', 'reason': b'NA'}\n{'type': 'trading_status', 'status': b'H', 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 42, 852349, tzinfo=datetime.timezone.utc), 'symbol': b'CHSCN', 'reason': b'NA'}\n{'type': 'price_level_update', 'side': b'S', 'flags': 1, 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 44, 856983, tzinfo=datetime.timezone.utc), 'symbol': b'ATLO', 'size': 8755, 'price': Decimal('38.95')}\n{'type': 'price_level_update', 'side': b'S', 'flags': 0, 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 44, 856983, tzinfo=datetime.timezone.utc), 'symbol': b'ATLO', 'size': 37222, 'price': Decimal('48')}\n{'type': 'price_level_update', 'side': b'S', 'flags': 1, 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 44, 856987, tzinfo=datetime.timezone.utc), 'symbol': b'ATLO', 'size': 8958, 'price': Decimal('38.95')}\n{'type': 'price_level_update', 'side': b'S', 'flags': 0, 'timestamp': datetime.datetime(2018, 1, 27, 15, 23, 44, 856987, tzinfo=datetime.timezone.utc), 'symbol': b'ATLO', 'size': 37019, 'price': Decimal('48')}\n```\n\nThe following code processes the DEEP sample file downloaded from IEX.\n\n```python\nfrom iex_parser import Parser, DEEP_1_0\n\nDEEP_SAMPLE_DATA_FILE = 'data_feeds_20180127_20180127_IEXTP1_DEEP1.0.pcap.gz'\n\nwith Parser(DEEP_SAMPLE_DATA_FILE, DEEP_1_0) as reader:\n for message in reader:\n print(message)\n```\n\n## Messages\n\nThe messages are returned as dictionaries.\n\n### Security Directive\n\n```python\n{\n 'type': 'security_directive',\n 'flags': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'round_lot_size': int,\n 'adjusted_poc_close': decimal.Decimal,\n 'luld_tier': int\n}\n```\n\n### Trading Status\n\n```python\n{\n 'type': 'trading_status',\n 'status': bytes,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'reason': bytes\n}\n```\n\n### Operational Halt\n\n```python\n{\n 'type': 'operational_halt',\n 'halt_status': bytes,\n 'timestamp': datetime.datetime,\n 'symbol': bytes\n}\n```\n\n### Short Sale Price Test Status\n\n```python\n{\n 'type': 'short_sale_price_test_status',\n 'status': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'detail': bytes\n}\n```\n\n### Quote Update\n\n```python\n{\n 'type': 'quote_update',\n 'flags': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'bid_size': int,\n 'bid_price': decimal.Decimal,\n 'ask_size': int,\n 'ask_price': decimal.Decimal\n}\n```\n\n### Trade Report\n\n```python\n{\n 'type': 'trade_report',\n 'flags': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'size': int,\n 'price': decimal.Decimal,\n 'trade_id': int\n}\n```\n\n### Official Price\n\n```python\n{\n 'type': 'official_price',\n 'price_type': bytes,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'price': deccimal.Decimal\n}\n```\n\n### Trade Break\n\n```python\n{\n 'type': 'trade_break',\n 'flags': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'size': int,\n 'price': decimal.Decimal,\n 'trade_id': int\n}\n```\n\n### Auction Information\n\n```python\n{\n 'type': 'auction_information',\n 'auction_type': bytes,\n 'timestamp': decimal.Decimal,\n 'symbol': bytes,\n 'paired_shares': int,\n 'reference_price': decimal.Decmal,\n 'indicative_clearing_price': decimal.Decimal,\n 'imbalance_shares': int,\n 'imbalance_side': bytes,\n 'extension_number': int,\n 'scheduled_auction_time': datetime.datetime,\n 'auction_book_clearing_price': decimal.Decimal,\n 'collar_reference_price': decimal.Decimal,\n 'lower_auction_collar_price': decimal.Decimal,\n 'upper_auction_collar_price': decimal.Decimal\n}\n```\n\n### Price Level Update\n\n```python\n{\n 'type': 'price_level_update',\n 'side': bytes,\n 'flags': int,\n 'timestamp': datetime.datetime,\n 'symbol': bytes,\n 'size': int,\n 'price': decimal.Decimal\n}\n```\n\n### Secrity Event\n\n```python\n{\n 'type': 'security_event',\n 'security_event': bytes,\n 'timestamp': datetime.datetime,\n 'symbol': bytes\n}\n```\n\n## Notes\n\nBecuase the data is distributed as a dump of network packets, there are a lot of \"empty\" \npackets. These take time to read and slow the delivery of the real data. To handle this\nthe packets are read on a separate python thread and queued. The size of the queue is an\noptional parameter to the `Parser`, and has been set by experimentation to 25000.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rob-blackbourn/iex_parser", "keywords": "IEX parser pcap", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "iex-parser", "package_url": "https://pypi.org/project/iex-parser/", "platform": "", "project_url": "https://pypi.org/project/iex-parser/", "project_urls": { "Homepage": "https://github.com/rob-blackbourn/iex_parser" }, "release_url": "https://pypi.org/project/iex-parser/1.1.0/", "requires_dist": [ "scapy (~=2.4)" ], "requires_python": "", "summary": "Parser for IEX data files", "version": "1.1.0" }, "last_serial": 5242488, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8a9b8402e8b3e58b7be576c01dfe7709", "sha256": "36238800c7af71eaf0d2eba3643b20161971560eeb543ed4e475d824183399d3" }, "downloads": -1, "filename": "iex_parser-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "8a9b8402e8b3e58b7be576c01dfe7709", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9957, "upload_time": "2019-05-06T09:13:06", "url": "https://files.pythonhosted.org/packages/b0/b7/5c1a62aa1dc6f5883fa10dbdc4f32f160b758afc0a71b0b39bbd603dd254/iex_parser-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8889eb5c6549a6e2699bf0fa85505c00", "sha256": "02c8ddca9d862cb59d5f167694822dfe7a0707198012b8faeb1722ae863b8977" }, "downloads": -1, "filename": "iex_parser-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8889eb5c6549a6e2699bf0fa85505c00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5360, "upload_time": "2019-05-06T09:13:08", "url": "https://files.pythonhosted.org/packages/49/6b/b9cf73521b0ea8124e0d708ae08d5a0e0939b9fccfb4663610fce231f7f6/iex_parser-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "ee3ba7ab62a94ca2a9bca7d3bf25da14", "sha256": "510c70711f588247b91e8d73f13c5947789cfcd34ff5aa1518715ecd29dbbb57" }, "downloads": -1, "filename": "iex_parser-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee3ba7ab62a94ca2a9bca7d3bf25da14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10986, "upload_time": "2019-05-08T11:37:49", "url": "https://files.pythonhosted.org/packages/2a/10/49d8a2f6ab7081bbe0441645ca16feb0c398dc8d3dc3a62ff0797ec5d5f7/iex_parser-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "130e7306fd23eaa5ec0029aee8b254e2", "sha256": "b3b5f49cdc87f49f1c17cd5ae8a8dde010740bb7c3a33ab5fcc6f00e88e89193" }, "downloads": -1, "filename": "iex_parser-1.1.0.tar.gz", "has_sig": false, "md5_digest": "130e7306fd23eaa5ec0029aee8b254e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7285, "upload_time": "2019-05-08T11:37:50", "url": "https://files.pythonhosted.org/packages/96/7f/2064946ab8ce123dd2a764e901297dba42cb174a618b11ee8a3f70aab04f/iex_parser-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee3ba7ab62a94ca2a9bca7d3bf25da14", "sha256": "510c70711f588247b91e8d73f13c5947789cfcd34ff5aa1518715ecd29dbbb57" }, "downloads": -1, "filename": "iex_parser-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ee3ba7ab62a94ca2a9bca7d3bf25da14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10986, "upload_time": "2019-05-08T11:37:49", "url": "https://files.pythonhosted.org/packages/2a/10/49d8a2f6ab7081bbe0441645ca16feb0c398dc8d3dc3a62ff0797ec5d5f7/iex_parser-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "130e7306fd23eaa5ec0029aee8b254e2", "sha256": "b3b5f49cdc87f49f1c17cd5ae8a8dde010740bb7c3a33ab5fcc6f00e88e89193" }, "downloads": -1, "filename": "iex_parser-1.1.0.tar.gz", "has_sig": false, "md5_digest": "130e7306fd23eaa5ec0029aee8b254e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7285, "upload_time": "2019-05-08T11:37:50", "url": "https://files.pythonhosted.org/packages/96/7f/2064946ab8ce123dd2a764e901297dba42cb174a618b11ee8a3f70aab04f/iex_parser-1.1.0.tar.gz" } ] }