binance-archiver


Namebinance-archiver JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttp://youtube.com
SummaryA package for archiving Binance data
upload_time2024-09-25 12:59:21
maintainerNone
docs_urlNone
authorDaniel Lasota
requires_python>=3.11
licenseNone
keywords binance archiver quant data sprzedam opla
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Real-time market data listener and archiver in python. 
Saves raw binance data in zipped jsons on azure blob

# Handles: 
spot, futures usd-m, futures coin-m
Level 2 orderbook deltas stream
trade stream
orderbook snapshots with configured trigger interval 
24-hour WebSocket lifecycle. At the end of the WebSocket's lifespan, it initiates a new WebSocket to ensure the continuity of data flow is maintained seamlessly.

Configured to use contenerised on Azure with Azure blob and keyvault

![image](https://github.com/user-attachments/assets/a9461c8d-b5a7-43de-b1cc-96ef5df72f40)

![image](https://github.com/user-attachments/assets/93a9cece-21fd-406c-8555-fbb774188265)

![Zrzut ekranu 2024-06-02 230137](https://github.com/DanielLasota/Binance-Archiver/assets/127039319/b400f859-60ef-4995-936d-d68ecab82ddf)



## Installation

```bash
# to be announced
```

## Usage

import the `run_stonks_analysis` function from the `stonks` module and run the script:

```python
from binance_archiver import launch_data_sink

if __name__ == '__main__':
    config = {
        "instruments": {
            "spot": ["BTCUSDT", "ETHUSDT", "BNBUSDT", "SOLUSDT", "XRPUSDT", "DOTUSDT"],
            "usd_mfutures": ["BTCUSDT", "ETHUSDT", "BNBUSDT", "SOLUSDT", "XRPUSDT", "DOTUSDT"],
            "coin_m_futures": ["BTCUSD_PERP", "ETHUSD_PERP", "BNBUSD_PERP", "SOLUSD_PERP", "XRPUSD_PERP", "DOTUSD_PERP"]
        },
        "file_duration_seconds": 300,
        "snapshot_fetcher_interval_seconds": 300,
        "websocket_life_time_seconds": 600,
        "save_to_json": False,
        "save_to_zip": False,
        "send_zip_to_blob": False
    }

    azure_blob_parameters_with_key = 'some azure blob parameters with key'
    container_name = 'some-azure-container-name'

    data_sink = launch_data_sink(
        config,
        azure_blob_parameters_with_key=azure_blob_parameters_with_key,
        container_name=container_name
    )

    time.sleep(2115)
    data_sink.shutdown()

```

            

Raw data

            {
    "_id": null,
    "home_page": "http://youtube.com",
    "name": "binance-archiver",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "binance archiver quant data sprzedam opla",
    "author": "Daniel Lasota",
    "author_email": "grossmann.root@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2f/e9/560c396dde7b0ce77ecb523641e8c6127fb83f9be71e5dad654fb895969e/binance-archiver-0.0.2.tar.gz",
    "platform": null,
    "description": "# Real-time market data listener and archiver in python. \r\nSaves raw binance data in zipped jsons on azure blob\r\n\r\n# Handles: \r\nspot, futures usd-m, futures coin-m\r\nLevel 2 orderbook deltas stream\r\ntrade stream\r\norderbook snapshots with configured trigger interval \r\n24-hour WebSocket lifecycle. At the end of the WebSocket's lifespan, it initiates a new WebSocket to ensure the continuity of data flow is maintained seamlessly.\r\n\r\nConfigured to use contenerised on Azure with Azure blob and keyvault\r\n\r\n![image](https://github.com/user-attachments/assets/a9461c8d-b5a7-43de-b1cc-96ef5df72f40)\r\n\r\n![image](https://github.com/user-attachments/assets/93a9cece-21fd-406c-8555-fbb774188265)\r\n\r\n![Zrzut ekranu 2024-06-02 230137](https://github.com/DanielLasota/Binance-Archiver/assets/127039319/b400f859-60ef-4995-936d-d68ecab82ddf)\r\n\r\n\r\n\r\n## Installation\r\n\r\n```bash\r\n# to be announced\r\n```\r\n\r\n## Usage\r\n\r\nimport the `run_stonks_analysis` function from the `stonks` module and run the script:\r\n\r\n```python\r\nfrom binance_archiver import launch_data_sink\r\n\r\nif __name__ == '__main__':\r\n    config = {\r\n        \"instruments\": {\r\n            \"spot\": [\"BTCUSDT\", \"ETHUSDT\", \"BNBUSDT\", \"SOLUSDT\", \"XRPUSDT\", \"DOTUSDT\"],\r\n            \"usd_mfutures\": [\"BTCUSDT\", \"ETHUSDT\", \"BNBUSDT\", \"SOLUSDT\", \"XRPUSDT\", \"DOTUSDT\"],\r\n            \"coin_m_futures\": [\"BTCUSD_PERP\", \"ETHUSD_PERP\", \"BNBUSD_PERP\", \"SOLUSD_PERP\", \"XRPUSD_PERP\", \"DOTUSD_PERP\"]\r\n        },\r\n        \"file_duration_seconds\": 300,\r\n        \"snapshot_fetcher_interval_seconds\": 300,\r\n        \"websocket_life_time_seconds\": 600,\r\n        \"save_to_json\": False,\r\n        \"save_to_zip\": False,\r\n        \"send_zip_to_blob\": False\r\n    }\r\n\r\n    azure_blob_parameters_with_key = 'some azure blob parameters with key'\r\n    container_name = 'some-azure-container-name'\r\n\r\n    data_sink = launch_data_sink(\r\n        config,\r\n        azure_blob_parameters_with_key=azure_blob_parameters_with_key,\r\n        container_name=container_name\r\n    )\r\n\r\n    time.sleep(2115)\r\n    data_sink.shutdown()\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A package for archiving Binance data",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "http://youtube.com"
    },
    "split_keywords": [
        "binance",
        "archiver",
        "quant",
        "data",
        "sprzedam",
        "opla"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04300abd2dd57899093fb94356fa296f596c082f543f469eea2fe30fe2057c7b",
                "md5": "f84849cfc9520bb489f33af1a8f4a340",
                "sha256": "0ae73e33598c57d2d9b2c67dbe80181516365c0e9a43b91324251c7c57ce57c0"
            },
            "downloads": -1,
            "filename": "binance_archiver-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f84849cfc9520bb489f33af1a8f4a340",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 57852,
            "upload_time": "2024-09-25T12:59:19",
            "upload_time_iso_8601": "2024-09-25T12:59:19.371743Z",
            "url": "https://files.pythonhosted.org/packages/04/30/0abd2dd57899093fb94356fa296f596c082f543f469eea2fe30fe2057c7b/binance_archiver-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2fe9560c396dde7b0ce77ecb523641e8c6127fb83f9be71e5dad654fb895969e",
                "md5": "c4a7f124860f270a28cbcb74883e8881",
                "sha256": "9826256939f147510be0e4cc41d5a0f7dbcfcf4310aa80ab8f97238251c3c42f"
            },
            "downloads": -1,
            "filename": "binance-archiver-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "c4a7f124860f270a28cbcb74883e8881",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 50556,
            "upload_time": "2024-09-25T12:59:21",
            "upload_time_iso_8601": "2024-09-25T12:59:21.031580Z",
            "url": "https://files.pythonhosted.org/packages/2f/e9/560c396dde7b0ce77ecb523641e8c6127fb83f9be71e5dad654fb895969e/binance-archiver-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-25 12:59:21",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "binance-archiver"
}
        
Elapsed time: 1.72331s