lendborrow

Enter Market

Initiate the approval process required for participating in a specific lending market. For example, in Compound, entering a market is a prerequisite before depositing assets and borrowing funds. This endpoint configures your account with the necessary permissions using customizable gas parameters to ensure a smooth setup.

💡 Compute Unit Value: 90 (Fixed)

post/defi/v1/lendborrow/entermarket

Request

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

Request body

lendborrowId'1100'

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

assetstring required

Token symbol for the asset to be approved.

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.

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.

enableFeeboolean

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

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": "1100",
  "asset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gas": "100000",
  "enableFee": false,
  "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": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
    "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
    "value": "0",
    "gas": "298800",
    "estimationCheck": true,
    "data": "0xc2998238000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
    "referenceId": "b2975c19e2594dcabbf193d25b4b6100"
  }
}

Changes

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