Code Monkey home page Code Monkey logo

Comments (5)

lyghid avatar lyghid commented on July 20, 2024

好像是上海证券账号不对,交易提交给了另一个上海账号,可是我也没地方设置上海账号啊

from easytrader.

shidenggui avatar shidenggui commented on July 20, 2024

如果你有多个上海帐号的话,可能默认的帐号会选择错误,这时候你需要在代码里面手动指定你对应的沪深帐号

from easytrader.

lyghid avatar lyghid commented on July 20, 2024

怎样手动选择?代码里那个位置改?

from easytrader.

shidenggui avatar shidenggui commented on July 20, 2024

自己查看相关源码

from easytrader.

lyghid avatar lyghid commented on July 20, 2024

蒙食灯鬼大神提示,解决了华泰上海默认账户错误,谢谢大神。修改如下:
httrader.py中:
def __set_trade_need_info(self, json_data):
"""设置交易所需的一些基本参数
:param json_data:登录成功返回的json数据
"""
for account_info in json_data['item']:
if account_info['stock_account'].startswith('A'):
####### 沪 A 股东代码以 A 开头,同时需要是数字,沪 B 帐号以 C 开头
if account_info['exchange_type'].isdigit():
self.__sh_exchange_type = account_info['exchange_type']
self.__sh_stock_account = account_info['stock_account']
if account_info['stock_account']== 'A111111111':#此处为我新添加,账号为原错误默认账号
self.__sh_stock_account ='A222222222' #此处为我添加,账号为实际交易账号
log.debug('sh_A stock account %s' % self.__sh_stock_account)

from easytrader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.