Step 2: Get a contract-call quote
Retrieving a valid quote from contract-call-supported routes.
The full API reference for our
/quote
endpoint can be found in the API reference section.
This is the first prerequisite step for any transaction on the Swing API. We want to determine which route provides us with the best quote based on our needs.
Our quoting system requires all the following required information:
- Source chain
- Destination chain
- Source Token on the Source chain
- Destination Token on the Destination chain
- The amount you want to send
- Contract Call flag
- Source Wallet Address to pull funds from
We can query our /quote
endpoint in the following manner given all the necessary information:
The results for our quote will include the routes
property which will have all the possible routes that can support the requested transaction. Each route also includes the fees associated with that route learn more about fees.
The results for our quote will look like this for a cross-chain transaction: