Skip to main content

A utility for China Stock Trade

Project description

  • easy to use to trade in China Stock

Installation

pip install sctrader

Upgrade

pip install sctrader –upgrade

Quick Start

import sctrader

user = sctrader.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


Download files

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

Source Distribution

sctrader-1.0.1.tar.gz (41.3 kB view details)

Uploaded Source

Built Distribution

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

sctrader-1.0.1-py3-none-any.whl (51.5 kB view details)

Uploaded Python 3

File details

Details for the file sctrader-1.0.1.tar.gz.

File metadata

  • Download URL: sctrader-1.0.1.tar.gz
  • Upload date:
  • Size: 41.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for sctrader-1.0.1.tar.gz
Algorithm Hash digest
SHA256 e21fdad40a3b82dad74ae18f8856ac39d4bb833398352970b07a67142d53e595
MD5 1a8c4492246c1ca8fde29937e9947eb6
BLAKE2b-256 9b84a5856e723a2e7bd543b1f7ed4a6f155927e84e2be2e73644e19de04d64af

See more details on using hashes here.

File details

Details for the file sctrader-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sctrader-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 51.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.16

File hashes

Hashes for sctrader-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 85d9b7784ab01ad33f7b2e7c96714b7465ffc8040cafe7d6d9e82cec583d2705
MD5 fd45bfb46759fc2ccca7828522b80aad
BLAKE2b-256 c49285eb9a912c9e434970258323980413e07457771788a123c72247d7c360cf

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