Skip to main content

GenAI based Trading Package

Project description

GenTrade

The python GenTrade package provide the core functions, model and data to support GenAI based algorithms trading.

For a quick testing, please

  • Install the python package

    pip install gentrade
    
  • Then try:

    • Demos: command line based app to show market OHLCV data
    • Tests: test cases for the API and utilities
    • Apps: the application or microservices based on gentrade.

App and Services

OHLCV Data Service

  • Start Server

    # Pull image
    docker pull registry.cn-hangzhou.aliyuncs.com/kenplusplus/gentrade_data_serv
    
    # Create .env file from .env_template
    
    # Run OHLCV datahub service
    docker run -p 8000:8000 \
        --env-file=.env -v <data folder>:/app/cache \
        registry.cn-hangzhou.aliyuncs.com/kenplusplus/gentrade_data_serv
    
  • Client Test

    # Get all supported markets
    curl -X 'GET' \
      'http://127.0.0.1:8000/markets/?market_type=all' \
      -H 'accept: application/json'
    
    # Get all available assets from a specific market
    curl -X 'GET' \
      'http://127.0.0.1:8000/assets/?market_id=b13a4902-ad9d-11ef-a239-00155d3ba217&start=0&max_count=1000' \
      -H 'accept: application/json'
    
    # Get OHLCV for a specific asset
    curl -X 'GET' \
      'http://127.0.0.1:8000/asset/get_ohlcv?market_id=b13a4902-ad9d-11ef-a239-00155d3ba217&asset=BTC_USDT&timeframe=1m&since=-1&limit=10' \
      -H 'accept: application/json'
    
    # Start OHLCV collector threading in the background
    curl -X 'POST' \
      'http://127.0.0.1:8000/asset/start_collect?market_id=b13a4902-ad9d-11ef-a239-00155d3ba217&asset=DOGE_USDT&timeframe=1h&since=1732809600' \
      -H 'accept: application/json' \
      -d ''
    

The cached data can be found at this directory

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gentrade-0.0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gentrade-0.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file gentrade-0.0.1.tar.gz.

File metadata

  • Download URL: gentrade-0.0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for gentrade-0.0.1.tar.gz
Algorithm Hash digest
SHA256 ddd06d3ce7e2c08fd90d95797098c99dbffa95c81fba1c644a0769aa440e61ae
MD5 91df064e3683e7aa18bd49a43def3ad9
BLAKE2b-256 6eee7787d6fccd8ec9f813019f7a24177c014e47c19584eeb9d9994ba262b1ba

See more details on using hashes here.

File details

Details for the file gentrade-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gentrade-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for gentrade-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 06b4f96b8a22a872db94de0610c3b0bea6f38085bf7f730a8a329089737ce55a
MD5 60706e40456b16d0f05eb297eb02c3b5
BLAKE2b-256 3f4287f0f19f9fdf8cfabebbcfa75aa54562ed1726a87c9abe83660658de6407

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page