I get this error when i'm trying to get a quote for uni to weth swap. https://goerli.api.0x.org/swap/v1/quote?sellToken=0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984&buyToken=0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6&sellAmount=100000000000000&takerAddress=0x5c02eb7f74a0fa914fd27d7bc065c52796f05e11
1 Answer
it means you are exceeding the amount that you did not approve for spending. let say if you have 100 tokens and you approved 50 tokens for spending and trying to transfering 60 tokens. thats why the error is coming. you did not have sufficient allownce for the tokens to exectue the transaction
:transferFrom: transfer amount exceeds spender allowance