Skip to content

@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 โ€‹

ParameterType
baseUrlstring
reqSwapQuoteRequest
opts?FetchSwapQuoteOptions

Returns โ€‹

Promise<SwapQuote>

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub