@lelantos-org/sdk / services/quoter / fetchSwapQuote
Function: fetchSwapQuote() โ
ts
function fetchSwapQuote(
baseUrl,
req,
opts?
): Promise<SwapQuote>;Defined in: @lelantos-org/sdk/dist/services/quoter/client.d.ts:65
Fetch the best route from MetaQuoter. baseUrl should be the root the service is mounted on (no trailing /v1/quotes).
Throws NetworkError (QUOTER_TIMEOUT / QUOTER_FAILED) on transport failure and WireFormatError on a response that does not match the contract above โ both WalletErrors, so isWalletError sees them.
Parameters โ
| Parameter | Type |
|---|---|
baseUrl | string |
req | SwapQuoteRequest |
opts? | FetchSwapQuoteOptions |
Returns โ
Promise<SwapQuote>