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)
Metadata
Release files for newEasytrader 0.23.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| neweasytrader-0.23.1.tar.gz | 42.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| newEasytrader-0.23.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.2 kB
Release files / neweasytrader-0.23.1.tar.gz
| Download URL | neweasytrader-0.23.1.tar.gz |
|---|---|
| Size | 42.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7b18ec6212c8e8567346d375935d5d1c68d23075fa720557defa96d3dc91e599
|
|
BLAKE2b-256 checksum How to use checksums |
0714d7cb6ed62dedbfba2e7a53dacf6ad5a05b622340429b38c5f0d16fe00be7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / newEasytrader-0.23.1-py3-none-any.whl
| Download URL | newEasytrader-0.23.1-py3-none-any.whl |
|---|---|
| Size | 51.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
19545ecb861fac5a633739274f15fdc3f1a07f4f94924d42664d8e7bf5abdd19
|
|
BLAKE2b-256 checksum How to use checksums |
614507b1cc3ee58229c6731cc0a2416777a2fc548898fbeb353fd8b3771456a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|