ODOS_GET_QUOTE
Retrieve a token swap quote for decentralized exchanges, specifying blockchain, input/output tokens, and amount, with optional formatting for clarity.
Instructions
Get a quote for a swap or exchange operation
Input Schema
Name | Required | Description | Default |
---|---|---|---|
amount | Yes | The amount of tokens to swap, in wei. | |
chain | No | The blockchain network to execute the transaction on. uses fraxtal as default | fraxtal |
fromToken | Yes | The token to swap from (address). | |
prettyFormat | No | Whether to pretty format the quote. | |
toToken | Yes | The token to swap to (address). |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"amount": {
"description": "The amount of tokens to swap, in wei.",
"pattern": "^\\d+$",
"type": "string"
},
"chain": {
"default": "fraxtal",
"description": "The blockchain network to execute the transaction on. uses fraxtal as default",
"type": "string"
},
"fromToken": {
"description": "The token to swap from (address).",
"type": "string"
},
"prettyFormat": {
"default": true,
"description": "Whether to pretty format the quote.",
"type": "boolean"
},
"toToken": {
"description": "The token to swap to (address).",
"type": "string"
}
},
"required": [
"fromToken",
"toToken",
"amount"
],
"type": "object"
}