-
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] [CLOB-895] Python short term order explicit TIF enum + examples #40
Conversation
@@ -29,25 +29,26 @@ async def main() -> None: | |||
subaccount = Subaccount(wallet, 0) | |||
ordersParams = loadJson('human_readable_orders.json') |
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.
Basically reverted this file (composite_example_.py
) to what it was before @lucas-dydx modified it with the short term example. There are two place_order calls though, let me know if one should be deleted.
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.
IIRC you can keep them both since it was originally like that
|
||
await asyncio.sleep(5) # wait for placeOrder to complete | ||
|
||
def orderExecutionToTimeInForce(orderExecution: str) -> Order_TimeInForce: |
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 define this in the client itself, rather than in the example? Maybe in v4-client-py/v4_client_py/clients/helpers/chain_helpers.py
?
Also agree with @johnqh that these should probably just be enums, I don't think they should be strings since that makes things like refactors more difficult.
We can punt on this and create a ticket if it takes too much time
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 is just for parsing json in this example. should not be used anywhere else.
@@ -29,25 +29,26 @@ async def main() -> None: | |||
subaccount = Subaccount(wallet, 0) | |||
ordersParams = loadJson('human_readable_orders.json') |
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.
IIRC you can keep them both since it was originally like that
No description provided.