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

[PY] v0.6.6 only cancel Short-Term orders, break stateful order cancellations #38

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v4-client-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package-dir = {"" = "v4_client_py"}

[tool.poetry]
name = "v4-client-py"
version = "0.6.5"
version = "0.6.6"
description = "dYdX v4 Client"
authors = ["John Huang <contact@dydx.exchange>"]
license = "BSL-1.1"
Expand Down
3 changes: 1 addition & 2 deletions v4-client-py/v4_client_py/clients/composer.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ def compose_msg_cancel_order(
)
return MsgCancelOrder(
order_id=order_id,
good_til_block=good_til_block,
good_til_block_time=good_til_block_time
good_til_block=good_til_block
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To avoid overwriting the good_til_block attribute, the good_til_block_time attribute is unset.

This temporarily breaks stateful order cancellations, the tradeoff is considered worth it since the Python client shouldn't be used for stateful order placements or cancellations.

Copy link

@teddyding teddyding Sep 20, 2023

Choose a reason for hiding this comment

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

Is there a discussion thread somewhere? If so can you link
Do we have a tracking item to fix stateful order cancellations?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in the slack thread. This python client isn't used for stateful order cancellations at all, it should only be used by programmatic traders.

)

def compose_msg_transfer(
Expand Down