Giter Club home page Giter Club logo

Comments (5)

hxhrtrading avatar hxhrtrading commented on July 24, 2024

错误信息如下: File "/astock/ctp_trade.py", line 121, in wait_trade_task
remote_order_id=self.tds.action.buy_open(price,volume,fakeBar)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/helpers.py", line 378, in wrapper
result = func(*args, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/level.py", line 128, in buy
return self.send_order(req)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/helpers.py", line 118, in wrapper
return func(*args, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/level.py", line 329, in send_order
return self.app.trader.send_order(order, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/interface/ctp/td_api.py", line 599, in send_order
self.on_event(type=EVENT_ORDER, data=order)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/interface/ctp/td_api.py", line 81, in on_event
signal.send(event)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/blinker/base.py", line 263, in send
return [(receiver, receiver(sender, **kwargs))
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/blinker/base.py", line 263, in
return [(receiver, receiver(sender, **kwargs))
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/helpers.py", line 309, in wrapper
d = func(*args, **kwargs)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/record.py", line 134, in process_order_event
self.position_manager.update_order(order)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/data_handle/local_position.py", line 480, in update_order
self[order.local_symbol] = PositionHolding(order.local_symbol, self.app)
File "/home/ubuntu/anaconda3/lib/python3.9/site-packages/ctpbee/data_handle/local_position.py", line 66, in init
raise ValueError("获取合约信息失败, 持仓盈亏计算失败")
ValueError: 获取合约信息失败, 持仓盈亏计算失败

from ctpbee.

somewheve avatar somewheve commented on July 24, 2024

什么版本的的ctpbee 这里是没拿到合约信息出问题了

from ctpbee.

somewheve avatar somewheve commented on July 24, 2024

我估计你这里是 因为没init就下单了 你应该写的是收到tick就发单了 然后账户其实还没初始化好

from ctpbee.

hxhrtrading avatar hxhrtrading commented on July 24, 2024

多谢,我研究下

from ctpbee.

somewheve avatar somewheve commented on July 24, 2024

没有 只有实盘支持群 等你策略写好了再说吧

from ctpbee.

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.