Skip to main content

ehdtd-daemon

Daemon script for the 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

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

Usage

python ehdtd_daemon.py [options] command

Example

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

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

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

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
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

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'

Release files for ehdtd-daemon 0.2.34

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ehdtd-daemon 0.2.34
File Size Uploaded
ehdtd_daemon-0.2.34.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ehdtd-daemon 0.2.34
File Interpreter ABI Platform
ehdtd_daemon-0.2.34-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / ehdtd_daemon-0.2.34.tar.gz

Download URL ehdtd_daemon-0.2.34.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9157ea4acc7ca045ecb03d72c5c653b87b3d3f4ca4e9b444a16007777e9ca068
BLAKE2b-256 checksum
How to use checksums
7cc4109f34d4c5475906ffa42b93b8747c0092797d88aac57c37bbf7f9b0f25d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / ehdtd_daemon-0.2.34-py3-none-any.whl

Download URL ehdtd_daemon-0.2.34-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29de239682fa6b0aed6b7171081eda484606646dc054c7e65aa1f9274327e194
BLAKE2b-256 checksum
How to use checksums
4088c4f1ef69377019c2647b808d89083bc523dccf6127759327f6fc9413d9fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.2.34 This release

2 release files

0.2.33

2 release files

0.2.32

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.25

2 release files

0.2.23

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.14

2 release files

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page