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"
}'
{
  "actionName": "sweepDepositAccountERC20",
  "salt": "0x1df631942ef919",
  "maxExecutions": "0x2",
  "action": "0x4aa3bce8f633d68cfc066f7b7db78443bcfe1b95",
  "actionArguments": {
    "sweepDepositAccountERC20": {
      "token": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
      "depositor": "0x70997970c51812dc3a010c7d01b50e0d17dc79c8",
      "recipient": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
      "threshold": "0x0",
      "fee": {
        "token": "0xaa8e23fb1079ea71e0a56f48a2aa51851d8433d0",
        "maxBaseFeePerGas": "0x0",
        "maxPriorityFeePerGas": "0x124f80",
        "executionFee": "0x186a0"
      }
    }
  },
  "nickname": "My Instruction",
  "lastExecutedUnix": 0,
  "lastInstructedValue": "0x0",
  "totalInstructedValue": "0x0",
  "instructedTokenAddress": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
  "lastErrorCode": 0,
  "lastErrorMessage": "Insufficient funds",
  "executionStatus": "Active",
  "isDeactivation": false,
  "chainId": 11155111,
  "chain": "sepolia"
}

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
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
string<bytes>
required

Salt to ensure Instruction is unique

Example:

"0x1df631942ef919"

maxExecutions
string<bytes>
required

Maximum number of times the Instruction can be executed

Example:

"0x2"

action
string<address>
required

Action contract address

Example:

"0x4aa3bce8f633d68cfc066f7b7db78443bcfe1b95"

lastExecutedUnix
integer
required

Unix timestamp of last execution

Example:

0

lastInstructedValue
string<bytes>
required

Last instructed value

Example:

"0x0"

totalInstructedValue
string<bytes>
required

Total instructed value

Example:

"0x0"

executionStatus
enum<string>
required

Execution status of the instruction

Available options:
PendingActivation,
Active,
PendingDeactivation,
Deactivated,
Completed,
Errored
Example:

"Active"

isDeactivation
boolean
required

Whether this is a deactivation instruction

Example:

false

chainId
integer
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>

Name of the action

Available options:
refuelERC20,
refuel,
transfer,
transferERC20,
sweepDepositAccount,
sweepDepositAccountERC20,
uniswapV3ExactInput
Example:

"sweepDepositAccountERC20"

actionArguments
object
  • RefuelERC20
  • Refuel
  • TransferERC20
  • Transfer
  • SweepDepositAccount
  • SweepDepositAccountERC20
  • UniswapV3ExactInput
nickname
string | null

Instruction nickname

Example:

"My Instruction"

instructedTokenAddress
string<address> | null

Address of the instructed token

Example:

"0xa0Ee7A142d267C1f36714E4a8F75612F20a79720"

lastErrorCode
integer

Code from the last execution error

Example:

0

lastErrorMessage
string | null

Message from the last execution error

Example:

"Insufficient funds"