GET
/
api
/
v0
/
swap
/
{tokenPair}
/
{amount}
Swap token amount
curl --request GET \
  --url https://jupiter.dial.to/api/v0/swap/{tokenPair}/{amount}
{
  "icon": "<string>",
  "label": "<string>",
  "title": "<string>",
  "description": "<string>",
  "disabled": true,
  "error": {
    "message": "<string>"
  },
  "links": {
    "actions": [
      {
        "type": "<string>",
        "label": "<string>",
        "href": "<string>",
        "parameters": [
          {
            "name": "<string>",
            "label": "<string>"
          }
        ]
      }
    ]
  }
}

Path Parameters

tokenPair
string
default:SOL-Bonk
required

Token pair in format input-output. Input and output are token symbols or addresses.

Example:

"SOL-Bonk"

amount
number
default:0.01
required

Amount of the input token to swap. If the input token is SOL, this is in SOL, otherwise, this is in USD equivalent of input.

Required range: x >= 0
Example:

0.01

Response

200
application/json

Successful response with fixed amount swap action details

The response is of type object.