Skip to main content
POST
/
earn
/
actions
TypeScript
const response: Promise<FireblocksResponse<CreateEarnActionResponse>> = fireblocks.earnBeta.createEarnAction(earnBetaApiCreateEarnActionRequest);
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "CREATED"
}

Documentation Index

Fetch the complete documentation index at: https://fireblocks-43c4b3ee-chore-add-cli.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Idempotency-Key
string

A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.

Body

application/json
action
enum<string>
required

Whether to deposit into or withdraw from the lending opportunity.

Available options:
DEPOSIT,
WITHDRAW
Example:

"DEPOSIT"

opportunityId
string
required

Identifier of the vault or market (lending opportunity).

Example:

"morpho-usdc-vault-1"

vaultAccountId
string
required

Fireblocks vault account that will execute the action.

Example:

"12345"

amount
string
required

Human-readable token amount (e.g. "1.6") or the keyword "max" for the full position or available balance.

Example:

"1000.0"

Response

OK

id
string
required

ActionIntent UUID for tracking the lending action workflow.

Example:

"550e8400-e29b-41d4-a716-446655440000"

status
enum<string>
required

Lifecycle status (e.g. CREATED, IN_PROGRESS, COMPLETED).

Available options:
CREATED,
IN_PROGRESS,
COMPLETED,
CANCELED,
FAILED
Example:

"CREATED"