lendborrow

Set User E-Mode

Configure your E-Mode (efficiency mode) settings within the lending protocol. By selecting the appropriate category (such as default or stablecoin mode), you can optimize your borrowing power and interest rates. Customizable gas settings ensure that the adjustment is processed quickly and efficiently.

💡 Compute Unit Value: 115 (Fixed)

post/defi/v1/lendborrow/setuseremode

Request

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

Request body

lendborrowId'1200' | '1208' | '1203' | '1204' | '1205' | '1206' | '1207'

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

categoryId'0' | '1' required

Specifies the E-Mode category. Use 0 for default mode and 1 for stablecoins.

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.

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": "1200",
  "categoryId": "0",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gas": "100000",
  "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": "0x829bFB482331b9Dc2BEcb5483ecA79c0578c3A45",
    "to": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
    "value": "0",
    "estimationCheck": true,
    "gas": "408298",
    "data": "0x28530a470000000000000000000000000000000000000000000000000000000000000001",
    "referenceId": "85e2f3fd6c904f2bb55305c1d9075ee3"
  }
}

Changes

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