-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Counterparty offer #637
Counterparty offer #637
Conversation
c412b9a
to
3b15fb5
Compare
rqalpha/interface.py
Outdated
""" | ||
raise NotImplementedError | ||
|
||
def get_ask_price(self, order_book_id): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_ask_prices
rqalpha/interface.py
Outdated
def get_ask_vols(self, order_book_id): | ||
# type: (str) -> list | ||
""" | ||
获取合约的1-5档卖方交易量 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
获取合约的多档卖方申报量
rqalpha/interface.py
Outdated
def get_ask_price(self, order_book_id): | ||
# type: (str) -> list | ||
""" | ||
获取合约的1-5档卖价 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
获取合约的多档卖方申报价
rqalpha/model/order.py
Outdated
@@ -257,6 +258,15 @@ def frozen_price(self): | |||
raise RuntimeError("Frozen price of order {} is not supposed to be nan.".format(self.order_id)) | |||
return self._frozen_price | |||
|
|||
@property | |||
def frozen_cash(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
订单状态变动的时候 frozen_cash 也需要更新
rqalpha/portfolio/account.py
Outdated
else: | ||
self._frozen_cash -= self._frozen_cash_of_order(event.order) | ||
self._frozen_cash -= order.frozen_cash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下文 apply_trade 中也有解冻资金的逻辑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
也需要做对应改动
No description provided.