getSwapQuote
function is used to get a quote for a swap between two Tokens.
Before using them, make sure to obtain a Client API Key from Coinbase Developer Platform.
Returns
Promise<GetSwapQuoteResponse>
Parameters
GetSwapQuoteParams
Types
Body
application/json
Response
200 - application/json
Successful response
Indicates which side is the reference for amounts (e.g., “from”)
Chain ID for this quote
Amount of “from” token (in smallest unit)
USD equivalent of the “from” amount
Amount of “to” token (in smallest unit)
USD equivalent of the “to” amount
Estimated price impact (as a string)
Whether the price impact is considered high
Allowed slippage percentage (as a string)