Skip to main content

A utility for China Stock Trade

Project description

  • easy to use to trade in China Stock

Installation

pip install easytrader

Upgrade

pip install easytrader –upgrade

Quick Start

import easytrader

user = easytrader.use('ht')

user.prepare('account.json')

user.balance

return:

[{ 'asset_balance': '资产总值',
   'current_balance': '当前余额',
   'enable_balance': '可用金额',
   'market_value': '证券市值',
   'money_type': '币种',
   'pre_interest': '预计利息' ]}

user.position

return:

[{'cost_price': '摊薄成本价',
   'current_amount': '当前数量',
   'enable_amount': '可卖数量',
   'income_balance': '摊薄浮动盈亏',
   'keep_cost_price': '保本价',
   'last_price': '最新价',
   'market_value': '证券市值',
   'position_str': '定位串',
   'stock_code': '证券代码',
   'stock_name': '证券名称'}]

user.entrust

return:

[{'business_amount': '成交数量',
  'business_price': '成交价格',
  'entrust_amount': '委托数量',
  'entrust_bs': '买卖方向',
  'entrust_no': '委托编号',
  'entrust_price': '委托价格',
  'entrust_status': '委托状态',  # 废单 / 已报
  'report_time': '申报时间',
  'stock_code': '证券代码',
  'stock_name': '证券名称'}]

user.buy('162411', price=5.55)

user.sell('16411', price=5.65)

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

easytrader-0.23.0.tar.gz (38.7 kB view details)

Uploaded Source

Built Distribution

easytrader-0.23.0-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file easytrader-0.23.0.tar.gz.

File metadata

  • Download URL: easytrader-0.23.0.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for easytrader-0.23.0.tar.gz
Algorithm Hash digest
SHA256 28b414674f512a70f9e2d012c986d41208c6c8cc150c8a13818f03d69fd829ad
MD5 23d76607f5e29f03d0d5abe413e363f2
BLAKE2b-256 b2afd1836bb9125070ea59dc910368fad223c90444635ec6b1e174e9d16dcedc

See more details on using hashes here.

File details

Details for the file easytrader-0.23.0-py3-none-any.whl.

File metadata

  • Download URL: easytrader-0.23.0-py3-none-any.whl
  • Upload date:
  • Size: 51.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for easytrader-0.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b35573634dd565d7139724a7cb24f595ac3e8209586c9e9b521eae4099452561
MD5 871f2ec9ba8f2a21bedb095d3d382153
BLAKE2b-256 433bb67cbdddf41c428586f0678b8cf58500efbb4bfe532bc1dd804ac5bde080

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