https://api.fibrous.finance/scroll

Request Parameters

Parameter nameTypeDescription
amount *stringamount of a token to sell, for 1 ETH set as 1000000000000000000
tokenInAddress *stringcontract address of a token to sell e.g.: 0x5300000000000000000000000000000000000004
tokenOutAddress *stringcontract address of a token to buy e.g.: 0x06eFdBF3B1ab11D8CDE82B0FA792D4cE44dBE550
reversebooleanDefault false. It’s not supported yet.
directbooleanDefault false. If it’s true direct route
excludeProtocols[string]The protocol ID

Additional Information

excludeProtocols: This is where you list the IDs of the AMMs you don’t want to include. For example, if there are certain AMMs you prefer not to use due to high fees or other reasons, you simply put their unique IDs in this list.

supportPairs: This function returns a list of supported AMMs, along with the AMM IDs.

Description of response parameters

Parameter nameTypeDescription
successbooleanIt is a boolean value that serves as a status indicator for the API call.
inputTokenTokendetails of a token to sell
inputAmountstringdetails of a token to buy
outputTokenTokendetails of a token to buy
route[Route]the best route for the swap
timenumberexecute time
bestQuotesByProtocols[string]quotes from supported AMMs