-
Notifications
You must be signed in to change notification settings - Fork 11
Got the error "InsufficientFunds" #32
Comments
You also must have approved the token prior to being able to place an order. We have a task pending for giving a better error message in this case. |
Thanks for the reply. But I believe this is not the case because I did approve the token and I had swapped them successfully from cowswap. Should I need to approve WETH too? Will it be the problem about the signature? Yes, more details about the error are quite necessary. |
If you have approved GNO then likely something is wrong with the signature which will lead to our backend recovering a different signer address. To double check that, I'd advise to also add the optional This will throw a different error in case the address recovered from the signature doesn't match the one that the backend recovered. |
It helps, thanks! However, the problem is that I missed the parameter "receiver" when I placed the order. I think the backend should report the parameters are incomplete and the tutorial (https://docs.gnosis.io/protocol/docs/tutorial-api-order/) should be updated. |
Thanks for the feedback! I updated the json blob in https://docs.cowswap.exchange/tutorials/how-to-submit-orders-via-the-api/5.-placing-the-order to contain the missing fields. Note that |
I had successfully swap GNO to WETH from Cowswap, but I cannot swap the tokens from my scripts.
The paras I posted are like ( I need to swap 1GNO to WETH):
params: {"sellToken":"0x6810e776880c02933d47db1b9fc05908e5386b96","buyToken":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2","sellAmount":"896936549560389504","buyAmount":"72349153448856840","validTo":1633511944,"appData":"0xf785fae7a7c5abc49f3cd6a61f6df1ff26433392b066ee9ff2240ff1eb7ab6e4","feeAmount":"103063450439610496","kind":"sell","partiallyFillable":false,"signature": $$$my signature,"signingScheme":"ethsign","sellTokenBalance":"erc20","buyTokenBalance":"erc20"}
The server returns:
{"errorType":"InsufficientFunds","description":"order owner must have funds worth at least x in his account"}
but I have definitely more than 1GNO
Any idea? Thanks!
The text was updated successfully, but these errors were encountered: