After some time I made it to sign and send Swap API requests with Python. Unfortunately I have the problem that every second transaction fails with an error (losing the high transaction fee of course…).
Since I never got failing transactions from the UI interface I guess I do something wrong with the parameters.
I only use high liquidity pairs like BUSD/BTCB. This is one request which sometimes fails:
Transaction which failed with “ORDER_UNFILLABLE” or “Return amount is not enough”:
I sign and send those transaction as is. I don’t change the estimated gas of the transaction or anything. I don’t wait, I send them immediately.
Do you have any tips for my API calls which could reduce the likelyness of failing?