Available actions: create, update, delete
Each client can have one and only one automation policy per chain ID.
Client should sign a message and sends it to backend to create, update. or delete an automation registry.
Method: POST
Endpoint: /v1/automations/registries/:address
Request Body:
{
"signer": "[address]",
"signature": "[signature]",
"data": {
"domain": {
"chainId": "1"
},
"message": {
"timestamp": 1713777104,
"clientId": "{string}",
"feeInBPS": 15,
"safeExecutor": "{address}",
"eoaExecutor": "{address}",
"inputTokens": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7",
"outputTokens": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7",
"swapVenues": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7",
"action": "create"
}
}
}
Response:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"client_id": "client_12345",
"chain_id": 1001,
"feeInBPS": 50,
"input_tokens": [
"token1",
"token2"
],
"output_tokens": [
"token3"
],
"swap_venues": [
"Uniswap",
"SushiSwap"
],
"safe_executor": "executor_67890",
"signature": "0xabcdef1234567890",
"signer": "0x1234567890abcdef",
"console_address": "0xabcdef1234567890abcdef1234567890abcdef12",
"created_at": 1625097600,
"updated_at": 1625184000
}
To update an existing client registry-
Method: PATCH
Endpoint: /v1/automations/registries/:consoleAddress
Request Body:
{
"signer": "[eoa-address]",
"signature": "[signature]",
"data": {
"domain": {
"chainId": "1"
},
"message": {
"timestamp": 1713777104,
"id": "050a0987-303b-4c4a-b1a3-28762374f3dd",
"clientId": "{string}",
"feeInBPS": 15,
"safeExecutor": "{address}",
"eoaExecutor": "{address}",
"inputTokens": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7",
"outputTokens": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7",
"swapVenues": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0xdac17f958d2ee523a2206206994597c13d831ec7"
"action": "update"
}
}
}
Client can update client ID, input tokens, output tokens, swap venues, safe executor, and eoa executor.