lendborrow

Transfer

Execute an internal transfer of deposited assets between accounts within the protocol. This operation enables you to reassign collateral or reallocate funds without exiting the system, all while optimizing gas usage to keep costs low.

💡 Compute Unit Value: 100 (Fixed)

post/defi/v1/lendborrow/transfer

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/lendborrow/transfer
  • Auth
    API key in header X-API-Key

Request body

lendborrowId'1300' | '1302'

The unique ID to specify the lending and borrowing protocol for routing relevant queries or transactions.

fromstring required

Blockchain address of the sender. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...). This address must hold sufficient balance and will sign the transaction.

assetstring required

Address of the token to be transferred.

tostring required

Blockchain address of the recipient. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...).

amountstring required

Number of tokens, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: 1 WETH (18 decimals) = "1000000000000000000"; 1 USDC (6 decimals) = "1000000".

gasstring

Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.

gasPrioritystring

Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

marketstring

Defines the market or asset standard (e.g., USDC or WETH) to be used in the transaction. If not provided, the default market is set to USDC.

enableFeeboolean

Flag to include a basis points fee transaction alongside the main transaction when set to true.

batchOption'EIP-5792' | 'EIP-7702'

Transaction batching standard to use. Supported values: 'EIP-5792' (wallet-level batching via wallet_sendCalls) or 'EIP-7702' (EOA code delegation via batcherContract). Requires batcherContract when using EIP-7702.

batcherContractstring

The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.

simulateboolean

When true, dry-runs the transaction batch via eth_simulateV1 and returns a simulate field with status and error on each transaction.

Example request

{
  "lendborrowId": "1300",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "amount": "1000000000000000000",
  "gas": "100000",
  "gasPriority": "low",
  "market": "USDC",
  "enableFee": false,
  "batchOption": "EIP-5792",
  "batcherContract": "0x9c933f9d2efd76ce25b0d3dde84d3f94e78a50ca",
  "simulate": false
}

Response

Successful response

statusnumber

Numeric status code indicating success or failure of the API call

msgstring

Human-readable message describing the API result or error

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "1",
    "from": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "to": "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
    "value": "0",
    "gas": "50000",
    "estimationCheck": true,
    "data": "0xa9059cbb0000000000000000000000006fb447ae94f5180254d436a693907a1f5769690000000000000000000000000000000000000000000000000000000000000f4240",
    "referenceId": "327ae3106cf149dd98cd060db515a4ef"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.