Onchain Actions

public/get_onchain_action_history

Changed on

Returns the lifecycle of onchain actions submitted via OnchainActionManager.sol. Public endpoint.

Onchain actions are either applied directly or with a fallback flag. Each onchain action is affected by the fallback flag uniquely:

  • Deposits: sequencer moved the deposit into the fallback_subaccount
  • SetSessionKey: no-op
  • Admin actions: no-op

The onchain action can have several states:

  • applied: action was successfully applied by the sequencer
  • applied_with_fallback: action was applied by the sequencer with fallback=true
  • instant_fallback: action failed its initial attempt, will be re-submitted with fallback=true
  • retry_then_fallback: action failed its initial attempt, will be re-submitted with fallback=false until the retry budget is exceeded, then re-submitted with fallback=true
  • never_escalate: action failed its initial attempt but will retry until successful, never with fallback=true

A failed attempt is recorded in error_code, error_message and error_data, and kept once the action is applied. error_code is a catalogued error code; error_data carries the specifics, and is null for an internal error.

post/public/get_onchain_action_history

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    none declared

Request body

GetOnchainActionHistoryParams required
action_type, integer nullable

On-chain actionType id.

end_timestamp, integer nullable
page, integer nullable
page_size, integer nullable
start_timestamp, integer nullable
wallet, string nullable

L1 sender of the action (any hex casing).

Response

Success

GetOnchainActionHistoryResponse required
actions, OnchainActionHistoryEntry[] required
pagination, Pagination required

Response envelope for paginated RPCs.

Changes