Skip to main content

我的交易库

Project description

trade-lib

自己的交易常用库

pip install trade-lib

使用

import trade_lib

# load exchange config from ~/.config/exchange.yaml
config = trade_lib.get_exchange_config(exname)

# set_dingding
dingding_config = {'robot_id':'', 'secret':''}
trade_lib.set_dingding(dingding_config)
trade_lib.dinding_send('ding...')

upload to pypi

python3 setup.py sdist bdist_wheel

twine upload dist/*

api

1、 取 venus.io 上的借贷利率

from trade_lib.venus import get_apy

supply_apy, borrow_apy = get_apy('BNB')
print(supply_apy, borrow_apy)

howto install

pip install peotry
poetry build 
poetry publish

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

trade_lib-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

trade_lib-0.2.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file trade_lib-0.2.1.tar.gz.

File metadata

  • Download URL: trade_lib-0.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.13 Darwin/23.5.0

File hashes

Hashes for trade_lib-0.2.1.tar.gz
Algorithm Hash digest
SHA256 73b5a53d14847551486d3f9b606f2f1a6687ef1b8c615c81d171eaeefc453b8f
MD5 c4c0f02398f056c1ea383e89fbcf6728
BLAKE2b-256 809a701cb26e1e43fbb351303c03a4c99714c58c23a4f37b1182acc8e74bd48a

See more details on using hashes here.

File details

Details for the file trade_lib-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: trade_lib-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.9.13 Darwin/23.5.0

File hashes

Hashes for trade_lib-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2fcbd89104bb08bdcb88d788dbe14fd23d4e1efb39b8c64b2334f58871ef7894
MD5 5e4033da59fb1ac9254b371981154d30
BLAKE2b-256 78748baa9ec81dc919a62c285bacb6b1ff7c4b650dbd92486873383473509e62

See more details on using hashes here.

Supported by

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