Skip to main content
GET
/
instruction
/
details
cURL
curl --request GET \
  --url https://api.otim.com/instruction/details \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "address": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
  "chainId": 11155111,
  "instructionId": "0x97fbe0031494c55eb0e1d182988e110af02f5db3adb95065733e7dc8447581f9"
}
'
{
  "salt": 1234567890,
  "maxExecutions": 10,
  "action": "0x4aa3bce8f633d68cfc066f7b7db78443bcfe1b95",
  "lastExecutedUnix": 0,
  "lastErrorCode": 0,
  "executionStatus": "Active",
  "isDeactivation": false,
  "chainId": 11155111,
  "chain": "sepolia",
  "actionName": "sweepDepositERC4626",
  "actionArguments": {
    "sweepDepositERC4626": {
      "vault": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
      "recipient": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
      "threshold": 1000000000000000000,
      "endBalance": 500000000000000000,
      "minTotalAssets": 1000000000000000000,
      "fee": {
        "token": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
        "maxBaseFeePerGas": 0,
        "maxPriorityFeePerGas": 12000000,
        "executionFee": 100000
      }
    }
  },
  "nickname": "My Instruction",
  "lastErrorMessage": "Insufficient funds"
}

Authorizations

Authorization
string
header
required

JWT token for API authentication

Body

application/json
address
string<address>
required

Address of the user

Example:

"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"

chainId
integer<uint64>
required

Chain ID of the instruction

Example:

11155111

instructionId
string<bytes32>
required

Instruction ID

Example:

"0x97fbe0031494c55eb0e1d182988e110af02f5db3adb95065733e7dc8447581f9"

Response

200 - application/json

Instruction details retrieved successfully

salt
integer<uint256>
required

Salt to ensure Instruction is unique

Example:

1234567890

maxExecutions
integer<uint256>
required

Maximum number of times the Instruction can be executed

Example:

10

action
string<address>
required

Action contract address

Example:

"0x4aa3bce8f633d68cfc066f7b7db78443bcfe1b95"

lastExecutedUnix
integer<int64>
required

Unix timestamp of last execution

Example:

0

lastErrorCode
integer<int32>
required

Code from the last execution error

Example:

0

executionStatus
enum<string>
required

Execution status of the instruction

Available options:
PendingActivation,
Active,
PendingDeactivation,
Deactivated,
Completed,
Errored,
UserNotDelegated,
EphemeralPendingActivation,
EphemeralActive,
EphemeralCancelled
Example:

"Active"

isDeactivation
boolean
required

Whether this is a deactivation instruction

Example:

false

chainId
integer<uint64>
required

Chain ID where the instruction exists

Example:

11155111

chain
string
required

Name of the chain where the instruction exists

Example:

"sepolia"

actionName
enum<string> | null

Name of the action

Available options:
refuelERC20,
refuel,
transferERC20,
transfer,
uniswapV3ExactInput,
deactivateInstruction,
sweepCCTP,
transferCCTP,
sweep,
sweepERC20,
sweepUniswapV3,
depositERC4626,
sweepDepositERC4626,
withdrawERC4626,
sweepWithdrawERC4626,
callOnce
Example:

"sweepDepositERC4626"

actionArguments
RefuelERC20 · object
Example:
{
  "sweepDepositERC4626": {
    "vault": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
    "recipient": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
    "threshold": 1000000000000000000,
    "endBalance": 500000000000000000,
    "minTotalAssets": 1000000000000000000,
    "fee": {
      "token": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
      "maxBaseFeePerGas": 0,
      "maxPriorityFeePerGas": 12000000,
      "executionFee": 100000
    }
  }
}
nickname
string | null

Instruction nickname

Example:

"My Instruction"

lastErrorMessage
string | null

Message from the last execution error

Example:

"Insufficient funds"