Parameter name | Type | Description |
---|---|---|
amount * | string | amount of a token to sell, for 1 ETH set as 1000000000000000000 |
tokenInAddress * | string | contract address of a token to sell e.g.: 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7 |
tokenOutAddress * | string | contract address of a token to buy e.g.: 0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5eb06f3ecf368a8 |
reverse | boolean | Default false . it’s not supported yet. |
direct | boolean | Default false . If it’s true direct route |
excludeProtocols | [string] | The protocol ID |
Parameter name | Type | Description |
---|---|---|
success | boolean | It is a boolean value that serves as a status indicator for the API call. |
inputToken | Token | details of a token to sell |
inputAmount | string | details of a token to buy |
outputToken | Token | details of a token to buy |
route | [Route] | the best route for the swap |
time | number | execute time |
bestQuotesByProtocols | [string] | quotes from supported AMMs |