Skip to content
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 #638

Merged
merged 4 commits into from
Jun 16, 2021
Merged

Counterparty offer #638

merged 4 commits into from
Jun 16, 2021

Conversation

mar-heaven
Copy link
Contributor

No description provided.


def _check_subscribe(self, order):
if self._env.config.base.frequency == "tick" and order.order_book_id not in self._env.get_universe():
raise RuntimeError("{} should be subscribed when frequency is tick".format(order.order_book_id))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

错误信息加上中文翻译

self._b_volume[order_book_id] = self._env.price_board.get_bid_vols(order_book_id)
def _pre_tick(self, event):
order_book_id = event.tick.order_book_id
self._a_volume[order_book_id] = self._env.price_board.get_ask_vols(order_book_id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event 中应该带有 tick?
没必要从 price_board 中再取一遍了

@Cuizi7 Cuizi7 merged commit 2afd22c into ricequant:develop Jun 16, 2021
@coveralls
Copy link

coveralls commented Jun 16, 2021

Coverage Status

Coverage increased (+0.6%) to 65.039% when pulling 1275bdd on mar-heaven:counterparty_offer into 5ce13b9 on ricequant:develop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants