POST
/
api
/
v0
/
swap
/
{tokenPair}
/
{amount}
Swap token amount
curl --request POST \
  --url https://jupiter.dial.to/api/v0/swap/{tokenPair}/{amount} \
  --header 'Content-Type: application/json' \
  --data '{
  "account": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
}'
{
  "type": "<string>",
  "transaction": "<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

Body

application/json

Response

200
application/json

Successful swap transaction

The response is of type object.