Skip to main content
POST
/
orchestration
/
build
/
settlement
cURL
curl --request POST \
  --url https://api.otim.com/orchestration/build/settlement \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "params": {
    "settlement": {
      "acceptedTokens": {},
      "settlementChainId": 123,
      "settlementToken": "<string>",
      "settlementAmount": 123,
      "recipientAddress": "<string>"
    }
  },
  "payerAddress": "<string>",
  "metadata": {},
  "dueDate": "2023-11-07T05:31:56Z",
  "maxRuns": 123
}
'
{
  "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subOrgId": "<string>",
  "walletId": "<string>",
  "ephemeralWalletAddress": "<string>",
  "completionInstructions": [
    {
      "address": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
      "chainId": 11155111,
      "salt": 1234567890,
      "maxExecutions": 10,
      "action": "0x838c90f3e8d4892dCfA67721CbbA7C86D3C059ef",
      "arguments": "0x0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c72380000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "actionName": "sweepDepositERC4626"
    }
  ],
  "instructions": [
    {
      "address": "0xa0Ee7A142d267C1f36714E4a8F75612F20a79720",
      "chainId": 11155111,
      "salt": 1234567890,
      "maxExecutions": 10,
      "action": "0x838c90f3e8d4892dCfA67721CbbA7C86D3C059ef",
      "arguments": "0x0000000000000000000000001c7d4b196cb0c7b01d743fbc6116a902379c72380000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000a0Ee7A142d267C1f36714E4a8F75612F20a79720000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "actionName": "sweepDepositERC4626"
    }
  ]
}
Build a settlement orchestration with ephemeral instructions. This endpoint automatically builds settlement orchestration instructions from simplified inputs: accepted tokens (grouped by chain), settlement amount, chain, and token, and recipient address.

Authorizations

Authorization
string
header
required

JWT token for API authentication

Body

application/json
params
object
required

Settlement orchestration type and parameters (oneOf Settlement, VaultWithdrawSettlement, or SettlementVaultDeposit)

payerAddress
string<address> | null

Address of the payer

metadata
object

Orchestration metadata as arbitrary JSON

dueDate
string<date-time> | null

Due date for the orchestration

maxRuns
integer<uint64> | null

Maximum number of times the orchestration can be executed

Response

201 - application/json

Settlement orchestration built successfully

requestId
string<uuid>
required

Orchestration ID

subOrgId
string
required

Turnkey sub-organization ID

walletId
string
required

Turnkey wallet ID

ephemeralWalletAddress
string<address>
required

Ephemeral wallet address

completionInstructions
object[]
required

Completion instructions

instructions
object[]
required

Instructions