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.4.8.tar.gz
(43.5 kB
view hashes)
Built Distribution
easytrader-0.4.8-py3-none-any.whl
(68.4 kB
view hashes)
Close
Hashes for easytrader-0.4.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c242b8e83a406461ab483ee3e99c9e67e64ff88821daf5f8bac9aa112e1c20f |
|
MD5 | b0545601794410a6a805d2a75de7e7a8 |
|
BLAKE2b-256 | 273af4216424af3c5a11f9142ee7ec8adf56c2e35f670af79bd12aea079bb954 |