ehdtd-daemon


Nameehdtd-daemon JSON
Version 0.2.19 PyPI version JSON
download
home_pageNone
SummaryDaemon script for ehdtd package
upload_time2025-07-09 00:59:51
maintainerNone
docs_urlNone
authorRicardo Marcelo Alvarez
requires_python<4.0,>=3.11
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# ehdtd-daemon

Daemon script for the [ehdtd](https://github.com/rmalvarezkai/ehdtd) package

## Introduction

The ehdtd-daemon is a Python script designed to collect historic and current data from exchanges and store it into a database (PostgreSQL or MySQL). It works in conjunction with the ehdtd package.

## Installation

```bash
pip install --upgrade pip setuptools # This line is only necesary in some setups
pip install ehdtd_daemon
```

## Usage

```python
python ehdtd_daemon.py [options] command
```

## Example

```python
python ehdtd_daemon.py start
sleep 900
python ehdtd_daemon.py stop
```

## Options

* `-h, --help`:                  Display this help message and exit.
* `-c, --config=CONFIG_FILE`:    Specify an alternative config file, Default is '/etc/ehdtd-daemon/ehdtd-daemon.yaml'

## Commands

* `start`:       Start the daemon
* `stop`:        Stop the daemon

## Configuration File Format

The ehdtd-daemon.yaml configuration file follows a YAML (YAML Ain't Markup Language) format. It consists of several sections and parameters, allowing customization of the daemon's behavior.

### Global Configuration

The global configuration section defines settings that apply to the entire daemon operation.

#### Global Parameters

```yaml
log_dir: The directory path for log files. Default is /var/log/ehdtd-daemon.
run_dir: The directory path for runtime files. Default is /run/ehdtd-daemon.
debug: A boolean flag indicating whether to enable debug mode. Default is false.
```

### Database Configuration

The database configuration section defines parameters for connecting to the database.

#### Database Parameters

```yaml
db_type: The type of database used by the daemon. Supported options are postgresql, pgsql and mysql.
db_name: The name of the database.
db_user: The username used to connect to the database.
db_pass: The password used to authenticate the database user.
db_host: The hostname or IP address of the database server.
db_port: The port number on which the database server is listening.
```

### Exchange Configuration

The exchange configuration section defines parameters specific to each supported exchange.

#### Exchange Parameters

```yaml
trading_type: The type of trading supported by the exchange. Currently, only SPOT trading is supported.
fetch_data: A list of dictionaries, each specifying the symbol and interval for fetching data from the exchange.
```

##### Fetch Data Parameters

```yaml
symbol: The trading pair symbol.
interval: The time interval for fetching data, such as 1m for 1 minute or 5m for 5 minutes.
```

### Example Configuration

```yaml

global:
  log_dir: /var/log/ehdtd-daemon
  run_dir: /run/ehdtd-daemon
  debug: false

db_data:
  db_type: postgresql
  db_name: 'DB_NAME'
  db_user: 'DB_USER'
  db_pass: 'DB_PASS'
  db_host: 'DB_HOST'
  db_port: 'DB_PORT'

exchanges:
  binance:
    trading_type: SPOT

    fetch_data:
      - symbol: BTC/USDT
        interval: '1m'
      - symbol: BNB/USDT
        interval: '1m'
      - symbol: ETH/USDT
        interval: '1m'
      - symbol: LTC/USDT
        interval: '1m'
      - symbol: BTC/USDT
        interval: '5m'
      - symbol: BNB/USDT
        interval: '5m'
      - symbol: ETH/USDT
        interval: '5m'
      - symbol: LTC/USDT
        interval: '5m'
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ehdtd-daemon",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ricardo Marcelo Alvarez",
    "author_email": "rmalvarezkai@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cb/b2/1dfd58febbd5227625f14a8db1307e178ac39f70b7a440c5265339534034/ehdtd_daemon-0.2.19.tar.gz",
    "platform": null,
    "description": "\n# ehdtd-daemon\n\nDaemon script for the [ehdtd](https://github.com/rmalvarezkai/ehdtd) package\n\n## Introduction\n\nThe ehdtd-daemon is a Python script designed to collect historic and current data from exchanges and store it into a database (PostgreSQL or MySQL). It works in conjunction with the ehdtd package.\n\n## Installation\n\n```bash\npip install --upgrade pip setuptools # This line is only necesary in some setups\npip install ehdtd_daemon\n```\n\n## Usage\n\n```python\npython ehdtd_daemon.py [options] command\n```\n\n## Example\n\n```python\npython ehdtd_daemon.py start\nsleep 900\npython ehdtd_daemon.py stop\n```\n\n## Options\n\n* `-h, --help`:                  Display this help message and exit.\n* `-c, --config=CONFIG_FILE`:    Specify an alternative config file, Default is '/etc/ehdtd-daemon/ehdtd-daemon.yaml'\n\n## Commands\n\n* `start`:       Start the daemon\n* `stop`:        Stop the daemon\n\n## Configuration File Format\n\nThe ehdtd-daemon.yaml configuration file follows a YAML (YAML Ain't Markup Language) format. It consists of several sections and parameters, allowing customization of the daemon's behavior.\n\n### Global Configuration\n\nThe global configuration section defines settings that apply to the entire daemon operation.\n\n#### Global Parameters\n\n```yaml\nlog_dir: The directory path for log files. Default is /var/log/ehdtd-daemon.\nrun_dir: The directory path for runtime files. Default is /run/ehdtd-daemon.\ndebug: A boolean flag indicating whether to enable debug mode. Default is false.\n```\n\n### Database Configuration\n\nThe database configuration section defines parameters for connecting to the database.\n\n#### Database Parameters\n\n```yaml\ndb_type: The type of database used by the daemon. Supported options are postgresql, pgsql and mysql.\ndb_name: The name of the database.\ndb_user: The username used to connect to the database.\ndb_pass: The password used to authenticate the database user.\ndb_host: The hostname or IP address of the database server.\ndb_port: The port number on which the database server is listening.\n```\n\n### Exchange Configuration\n\nThe exchange configuration section defines parameters specific to each supported exchange.\n\n#### Exchange Parameters\n\n```yaml\ntrading_type: The type of trading supported by the exchange. Currently, only SPOT trading is supported.\nfetch_data: A list of dictionaries, each specifying the symbol and interval for fetching data from the exchange.\n```\n\n##### Fetch Data Parameters\n\n```yaml\nsymbol: The trading pair symbol.\ninterval: The time interval for fetching data, such as 1m for 1 minute or 5m for 5 minutes.\n```\n\n### Example Configuration\n\n```yaml\n\nglobal:\n  log_dir: /var/log/ehdtd-daemon\n  run_dir: /run/ehdtd-daemon\n  debug: false\n\ndb_data:\n  db_type: postgresql\n  db_name: 'DB_NAME'\n  db_user: 'DB_USER'\n  db_pass: 'DB_PASS'\n  db_host: 'DB_HOST'\n  db_port: 'DB_PORT'\n\nexchanges:\n  binance:\n    trading_type: SPOT\n\n    fetch_data:\n      - symbol: BTC/USDT\n        interval: '1m'\n      - symbol: BNB/USDT\n        interval: '1m'\n      - symbol: ETH/USDT\n        interval: '1m'\n      - symbol: LTC/USDT\n        interval: '1m'\n      - symbol: BTC/USDT\n        interval: '5m'\n      - symbol: BNB/USDT\n        interval: '5m'\n      - symbol: ETH/USDT\n        interval: '5m'\n      - symbol: LTC/USDT\n        interval: '5m'\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Daemon script for ehdtd package",
    "version": "0.2.19",
    "project_urls": {
        "Homepage": "https://github.com/rmalvarezkai/ehdtd_daemon"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b4348333399d999071d05cba7435dfb068686d946cfae91830df15cb0ef9ad10",
                "md5": "f6abec99ecd91859d8c9f75dec8b3fb7",
                "sha256": "226056da3dda92feaa499e159b42198caec5ba34279f1a806863569a99a6f879"
            },
            "downloads": -1,
            "filename": "ehdtd_daemon-0.2.19-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f6abec99ecd91859d8c9f75dec8b3fb7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 10492,
            "upload_time": "2025-07-09T00:59:50",
            "upload_time_iso_8601": "2025-07-09T00:59:50.295995Z",
            "url": "https://files.pythonhosted.org/packages/b4/34/8333399d999071d05cba7435dfb068686d946cfae91830df15cb0ef9ad10/ehdtd_daemon-0.2.19-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cbb21dfd58febbd5227625f14a8db1307e178ac39f70b7a440c5265339534034",
                "md5": "d5b0ebdb60b0992274eab70314cc3cb0",
                "sha256": "a834e04d3e0162a6e3c804da256c20056173fc3ea1bf59cbffaf90b608dd6c69"
            },
            "downloads": -1,
            "filename": "ehdtd_daemon-0.2.19.tar.gz",
            "has_sig": false,
            "md5_digest": "d5b0ebdb60b0992274eab70314cc3cb0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 8988,
            "upload_time": "2025-07-09T00:59:51",
            "upload_time_iso_8601": "2025-07-09T00:59:51.654842Z",
            "url": "https://files.pythonhosted.org/packages/cb/b2/1dfd58febbd5227625f14a8db1307e178ac39f70b7a440c5265339534034/ehdtd_daemon-0.2.19.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 00:59:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rmalvarezkai",
    "github_project": "ehdtd_daemon",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ehdtd-daemon"
}
        
Elapsed time: 0.77531s