-
Notifications
You must be signed in to change notification settings - Fork 58
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.2
: Update python client code to place Short-Term orders
#32
Conversation
@@ -20,15 +20,17 @@ class OrderTimeInForce(Flag): | |||
FOK = auto() # Fill or Kill | |||
|
|||
class OrderExecution(Flag): |
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.
This should just be removed since it's confusing people, detailed reasons in this ticket here.
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.
Commented in your ticket
def calculate_good_til_block_time(self, good_til_time_in_seconds: int) -> int: | ||
now = datetime.now() | ||
interval = timedelta(seconds=good_til_time_in_seconds) | ||
future = now + interval | ||
return int(future.timestamp()) | ||
|
||
def validate_good_til_block(self, good_til_block: int) -> None: |
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.
Ideally this code is updated such that it doesn't need to fetch the current block on each order placement. I just hacked this together to get it working for now.
v0.6.2
: Update python client code to place Short-Term orders
v0.6.2
: Update python client code to place Short-Term ordersv0.6.2
: Update python client code to place Short-Term orders
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.
Can you update TS to mirror Python code? Also we will need to update the documentations (which always show both TS and Python) after this is released.
try: | ||
tx = client.place_order( |
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.
Can we have a different function to test place_short_term_order? place_order still need to be tested.
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.
@jonfung-dydx will add this testing in a future PR. I don't think this is important for place_order
since it shouldn't be used by anyone (since frontend uses typescript client), but we will keep this in mind for the Typescript client.
@@ -20,15 +20,17 @@ class OrderTimeInForce(Flag): | |||
FOK = auto() # Fill or Kill | |||
|
|||
class OrderExecution(Flag): |
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.
Commented in your ticket
Synced in person, to accelerate timelines we are going to do this in a separate PR. |
No description provided.