Skip to main content
POST
/
execute
Execute Transaction
curl --request POST \
  --url https://api.jup.ag/swap/v2/execute \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "signedTransaction": "<string>",
  "requestId": "<string>",
  "lastValidBlockHeight": "<string>"
}
'
{
  "status": "Success",
  "signature": "<string>",
  "slot": "<string>",
  "error": "<string>",
  "code": 123,
  "totalInputAmount": "<string>",
  "totalOutputAmount": "<string>",
  "inputAmountResult": "<string>",
  "outputAmountResult": "<string>",
  "swapEvents": [
    {
      "inputMint": "<string>",
      "inputAmount": "<string>",
      "outputMint": "<string>",
      "outputAmount": "<string>"
    }
  ]
}

Authorizations

x-api-key
string
header
required

Get API key via https://portal.jup.ag

Body

application/json
signedTransaction
string
required

Base64-encoded signed transaction

requestId
string
required

The requestId from the /order response

lastValidBlockHeight
string

Optional block height for nonce validation

Response

Execution result

status
enum<string>
Available options:
Success,
Failed
signature
string

Transaction signature

slot
string

Confirmed slot

error
string

Error message (present if Failed)

code
number
  • Error code. 0 = success.
  • Ultra: -1 (missing cached order), -2 (invalid signed tx), -3 (invalid message bytes).
  • Aggregator: -1000 (failed to land), -1001 (unknown), -1002 (invalid tx), -1003 (not fully signed), -1004 (invalid block height).
  • RFQ: -2000 (failed to land), -2001 (unknown), -2002 (invalid payload), -2003 (quote expired), -2004 (swap rejected).
totalInputAmount
string

Total input token amount before fees

totalOutputAmount
string

Total output token amount after fees

inputAmountResult
string

Amount of input token used for the swap

outputAmountResult
string

Amount of output token received from the swap

swapEvents
object[]