Skip to main content
GET
/
strategies
/
{strategyId}
/
bytecode
Generate strategy transaction bytecode
curl --request GET \
  --url https://api.deframe.io/strategies/{strategyId}/bytecode \
  --header 'x-api-key: <api-key>'
{
  "feeCharged": "1000000000000000000",
  "id": "6a04f2f75bf7233c6220b3ca",
  "chainIdIn": 8453,
  "chainIdOut": 42161,
  "crossChain": {
    "isCrossChain": true,
    "chainIdIn": 8453,
    "chainIdOut": 42161
  },
  "quote": "<unknown>",
  "bytecode": [
    {
      "chainId": 1,
      "to": "0xb794F5eA0ba39494cE839613fffBA74279579268",
      "data": "0x...",
      "value": "0",
      "from": "0xb794F5eA0ba39494cE839613fffBA74279579268"
    }
  ],
  "userOperation": "<unknown>",
  "transactionData": "<unknown>",
  "transaction": "<string>",
  "instructions": [
    null
  ],
  "lutsByAddress": "<unknown>"
}

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.

Path Parameters

strategyId
string
required

Strategy ID or slug

Query Parameters

action
enum<string>
required

Strategy action type

Available options:
lend,
request-lend,
withdraw,
request-withdraw,
quick-withdraw,
claim-airdrop,
borrow,
repay
amount
string
required

Amount in token smallest unit

Example:

"1000000000000000000"

wallet
string
required

User wallet address

chainIdIn
number

Source chain ID alias for cross-chain deposits

Example:

8453

fromChainId
number

Source chain ID for cross-chain deposits

Example:

8453

fromTokenAddress
string

Source token for same-chain swap or cross-chain deposit

Example:

"0xb794F5eA0ba39494cE839613fffBA74279579268"

chainIdOut
number

Destination chain ID alias for cross-chain withdrawals

Example:

8453

toChainId
number

Destination chain ID for cross-chain withdrawals

Example:

8453

toTokenAddress
string

Destination token for cross-chain withdrawals

Example:

"0xb794F5eA0ba39494cE839613fffBA74279579268"

destinationAddress
string

Destination wallet address when different from wallet

Example:

"0xb794F5eA0ba39494cE839613fffBA74279579268"

output
enum<string>
default:bytecode

Response format

Available options:
bytecode,
userOperation,
fireblocks,
instructions
accountId
string

Fireblocks vault account ID. Required when output=fireblocks.

Example:

"12"

reserveAddress
string

Solana reserve address for supported borrow/repay operations

Response

Bytecode generated successfully

feeCharged
string
required

Large integer represented as string (for amounts with decimals)

Example:

"1000000000000000000"

id
string
required

ID created for execution tracking

Example:

"6a04f2f75bf7233c6220b3ca"

chainIdIn
number
Example:

8453

chainIdOut
number
Example:

42161

crossChain
object

Canonical source and destination chain route

quote
any | null

Bridge or swap quote metadata when the strategy action includes a swap or bridge

bytecode
object[]
userOperation
any | null

User operation when output=userOperation

transactionData
any | null

Fireblocks transaction request when output=fireblocks

transaction
string

Base64 Solana transaction when output=bytecode on Solana

instructions
null[]

Solana instructions when output=instructions

lutsByAddress
any | null

Solana lookup tables keyed by address