The address of the coin to swap from
The address of the coin to swap to
The amount of the fromCoin to swap (number, string, or bigint)
Optional
apiKey: stringOptional API key for authentication
Optional
swapOptions: SwapOptionsOptional swap options including baseUrl, dexList, byAmountIn, and depth
Promise - A promise that resolves to a Router object containing the swap route details
Retrieves a swap quote between two coins using the aggregator API
This function communicates with the aggregator API to find the best swap route between two tokens. It supports various parameters including DEX selection, amount specification, and API authentication.