You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if someone places a limit order from the Python SDK in a public entry context there is no immediate feedback providing them with the order ID of the order they just submitted. For them to get this info:
Before placing a trade call the view function to get active market order IDs, then place trade, then call the view function again and get the diff (but note this only works for orders that post)
Alternatively just call the relevant event handle and check the order ID described in the last emitted event (the events endpoint accepts an int saying how many events to return, it would be ideal if passing “1” just returned the most recent one)
This does mean that orders need to be serialized, for example submit three orders then get the last 3 events emitted
Some alternative solutions
Allow client to provide a client order ID, and if the transaction succeeds, they will know the assigned order ID
Store data on user account with a list of order IDs, for example, in the order that they were submitted, to be queried by a view function
The text was updated successfully, but these errors were encountered:
Currently, if someone places a limit order from the Python SDK in a public entry context there is no immediate feedback providing them with the order ID of the order they just submitted. For them to get this info:
This does mean that orders need to be serialized, for example submit three orders then get the last 3 events emitted
Some alternative solutions
The text was updated successfully, but these errors were encountered: