---
title: "Approve"
method: POST
path: "/defi/v1/fungibletoken/approve"
tags: ["fungibletoken"]
---

# Approve

`POST /defi/v1/fungibletoken/approve`

## Request

- Base URL: `https://svc.blockdaemon.com`
- URL: `https://svc.blockdaemon.com/defi/v1/fungibletoken/approve`
- Auth: API key in header `X-API-Key`

This endpoint is used to grant permission for a designated spender to withdraw tokens from a user's ERC-20 token balance. By invoking the standard ERC-20 approve function, it sets an allowance that enables the spender to access up to a specified number of tokens on behalf of the user.

> 💡 
**Compute Unit Value:** `80` (Fixed)

## Request body

- FungibletokenApproveRequest: The request body for a /defi/v1/fungibletoken/approve
  - `from` string, 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.
  - `tokenAddress` string, required: Address of the token.
  - `amount` string, 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".
  - `to` string, required: Blockchain address of the recipient. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...).
  - `gas` string: 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.
  - `chainId` '1' | '56' | '43114' | '137' | '900' | '901' | '250' | '10' | '11155420' | '42161' | '421614' | '25' | '338' | '84532' | '8453' | '43113' | '97' | '80002' | '300' | '324' | '5000' | '5003': The unique ID to direct queries or transactions to the correct blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-chains).
  - `chainSymbol` string: The abbreviated chain name for queries or transactions.
  - `gasPriority` string: Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost. Defaults to 'medium'.
  - `enableFee` boolean: Flag to include a basis points fee transaction alongside the main transaction when set to true.
  - `simulate` boolean: When true, dry-runs the transaction batch via eth_simulateV1 and returns a simulate field with status and error on each transaction.

## Response `200`

Successful response

- object
  - `status` number
  - `msg` string
  - `data` object
    - `chainId` string, required
    - `from` string, required
    - `to` string, required
    - `gas` string
    - `value` string, required
    - `data` string, required
    - `estimationCheck` boolean, required
    - `referenceId` string, required
    - `simulate` object: Present when the request used `simulate: true`; eth_simulateV1 summary (omitted when simulation was not run).
      - `status` 'success' | 'failure', required
      - `error` string, nullable, required: Failure reason when status is failure; null when status is success

---

[API](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api.md) - [All operations](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/llms.txt) - [OpenAPI document](https://skmtc.dev/blockdaemon/apis/blockdaemon-defi-api/revisions/ec053b7c8041?raw)
