lendborrow

Exit Market

Process your exit from a lending market. By executing this transaction, you effectively remove your participation (and any associated collateral) from the market, thereby ceasing deposit or borrowing operations on that asset. The endpoint supports customizable gas settings to optimize the exit process.

💡 Compute Unit Value: 10 (Fixed)

post/defi/v1/lendborrow/exitmarket

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/lendborrow/exitmarket
  • 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's symbol to exit the market.

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.

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.

gasPrioritystring

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

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",
  "gas": "100000",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gasPriority": "low",
  "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": "0x6Fb447Ae94F5180254D436A693907a1f57696900",
    "to": "0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b",
    "value": "0",
    "gas": "40000",
    "data": "0xede4edd00000000000000000000000005d3a536e4d6dbd6114cc1ead35777bab948e3643",
    "estimationCheck": true,
    "referenceId": "2a7d6bd372b14b20b4d854daa01487b3"
  }
}

Changes

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