Skip to main content
POST
/
ramp
/
evm
/
approve
curl --request POST \
  --url https://api.etherfuse.com/ramp/evm/approve \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "blockchain": "base",
  "wallet": "0xf82567432381D1326484E5A9140ABCa4294f82D0",
  "assetId": "0xcC77c598d42f2f78Beb42C91d12B9d4041a5cE29"
}
'
{
  "transaction": "{\"to\":\"0xcC77c598...\",\"data\":\"0x095ea7b3...\",\"value\":\"0\",\"gasLimit\":\"51861\",\"nonce\":39,\"gasPrice\":\"6000000\",\"chainId\":84532}",
  "message": "Approve transaction for gasless offramps on base"
}

Authorizations

Authorization
string
header
required

API key for authentication. Pass the key directly (e.g., Authorization: your-api-key). Do not use a Bearer prefix.

Body

application/json
blockchain
enum<string>
required

The EVM chain to approve on

Available options:
base
Example:

"base"

wallet
string
required

The user's EVM wallet address

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0xf82567432381D1326484E5A9140ABCa4294f82D0"

assetId
string
required

The token contract address to approve

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0xcC77c598d42f2f78Beb42C91d12B9d4041a5cE29"

amount
string

Amount to approve in base units (token smallest denomination). For a token with 6 decimals, 10000000 = 10 tokens. If omitted, approves for the maximum amount (recommended for one-time approval).

Example:

"10000000"

Response

Approve transaction generated (or already approved)

transaction
string | null

JSON-serialized unsigned transaction for the user to sign. Null if the user has already approved a sufficient amount.

message
string

Human-readable status message

currentAllowance
string

Current token allowance (only present when already approved)