Learn how to use the getQuote JSON-RPC method.
getQuote
getQuote
calculates and returns the quote price for the swap (the amount of toTokenAddress
tokens you’ll receive) alongside details about the swap. It takes:
address
- string.fromTokenAddress
- string.toTokenAddress
- string.amount
- string.Basic authentication header of the form Basic <encoded-value>
, where <encoded-value>
is the base64-encoded string username:password
.
Request to get a quote for a token swap.
The body is of type object
.
Successful response with swap quote.
The response is of type object
.