Start building awesome DeFi application in under 10 minutes
/v1/quote
endpoint. It’s recommended to start with the below example request and then explore more customization options in the Router API Reference
POST
request to the /v1/quote
endpoint. It is recommended to start with the below example request and apply more customization from (here)[/docs/router/quote]
/quote
response, you can use any web3 library (eg: ethers.js, web3.js, web3.py) to build, sign and send the transaction. The key fields you’ll need are:
calldata
: ABI encoded function call for the routervalue
: Native token amount to attach (if input is a native token)computationUnits
: Simulated gas estimate (recommended - gasLimit = computationUnits × 1.3
)Token Swap
Vault Entry
Lending
Staking
Crosschain
POST
request to the root /
endpoint. It is recommended to start with the below example request and apply more customization from (here)[/api-reference/exchange-rate-api/post-price]
<GlueXWidget />
properties and default values