Skip to main content
POST
/
v2
/
swap
/
bytecode
Generate transaction bytecode
curl --request POST \
  --url https://api.deframe.io/v2/swap/bytecode \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "quoteId": "550e8400-e29b-41d4-a716-446655440000",
  "originAddress": "0xb794F5eA0ba39494cE839613fffBA74279579268",
  "destinationAddress": "0xb794F5eA0ba39494cE839613fffBA74279579268",
  "rawQuote": "<unknown>"
}
'
{
  "id": "65f1a2b3c4d5e6f789012345",
  "chainId": 1,
  "transactionData": [
    {
      "chainId": 1,
      "to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
      "data": "0x...",
      "value": "0",
      "from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.deframe.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain from your Deframe dashboard.

Body

application/json
quoteId
string
required

Quote ID from /v2/swap/quote

Example:

"550e8400-e29b-41d4-a716-446655440000"

originAddress
string
required

Address executing the swap on origin chain

Example:

"0xb794F5eA0ba39494cE839613fffBA74279579268"

destinationAddress
string
required

Address receiving tokens on destination chain

Example:

"0xb794F5eA0ba39494cE839613fffBA74279579268"

rawQuote
any | null

Provider-specific raw quote data from the quote response. Pass this when the quote includes it.

Response

Bytecode generated successfully

id
string
required

ID created for execution tracking

Example:

"65f1a2b3c4d5e6f789012345"

chainId
number
required
Example:

1

transactionData
object
required

Transaction data for execution