POST
/
instruction
/
new
curl --request POST \
  --url https://api.otim.com/instruction/new \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "address": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
  "chainId": 11155111,
  "salt": 1234567890,
  "maxExecutions": 10,
  "action": "0x838c90f3e8d4892dCfA67721CbbA7C86D3C059ef",
  "arguments": "0x0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c72380000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "activationSignature": {
    "yParity": 0,
    "r": "0x...",
    "s": "0x..."
  },
  "nickname": "My cool instruction"
}'
{
  "instructionId": "0x97fbe0031494c55eb0e1d182988e110af02f5db3adb95065733e7dc8447581f9"
}

After building your Instruction, you need to:

  1. sign 712 typed hash associated with your chosen Action (check out How to Construct Instruction Activation and Deactivation EIP-712 Hashes)
  2. submit the signature and your Instruction parameters from the build step when calling this endpoint

Below is an example workflow of how to retrieve all parameters needed for activating an end-to-end USDT Sweep Instruction + showing you the designated deposit address to send USDT to:

Authorizations

Authorization
string
header
required

JWT token for API authentication

Body

application/json

Response

201 - application/json

Instruction created successfully

The response is of type object.