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

how to get final order info (like order status , swap amount and matchPrice) #91

Open
sh7ning opened this issue Dec 19, 2024 · 5 comments

Comments

@sh7ning
Copy link

sh7ning commented Dec 19, 2024

If I use this api:https://portal.1inch.dev/documentation/apis/swap/intent-swap/swagger/relayer?method=post&path=%2Fv2.0%2F1%2Forder%2Fsubmit to place orders of the same amount and tokens,
but this api has no response body of order info, if one of them succeed and the others fail,
how can I get the final order info? If I use the transaction events on the chain, how do I know which one is successful?

Or does it mean that after this api responds successfully, the transaction will definitely be executed?
does the complete transaction depend on the allowPartialFills field in the swap quotation result?

@1inch 1inch deleted a comment Dec 19, 2024
@Tanz0rz
Copy link
Collaborator

Tanz0rz commented Dec 19, 2024

Good questions. Each order has a unique order hash that can be used to get information about them. I will add in functionality to get that order hash so you can query it while it is executing.

In some cases, orders will not fill or will only partially fill. It depends on liquidity and the settings provided in the original order.

@sh7ning
Copy link
Author

sh7ning commented Dec 20, 2024

Thanks for your reply.
At the same time, we hope that you will provide order hash in the response and provide api to batch query order information by the order hash array ^_^

@Tanz0rz
Copy link
Collaborator

Tanz0rz commented Dec 20, 2024

You can checkout main, update it, and work from there again.

@sh7ning
Copy link
Author

sh7ning commented Dec 21, 2024

Thank you so much!

@sh7ning
Copy link
Author

sh7ning commented Dec 21, 2024

So cool, good job. and I do a successfull test just now.

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

No branches or pull requests

2 participants