Flows

Flows automate actions on a vault or account, triggered either by an event or a cron schedule.

Flows let you automate actions on a vault or account. Instead of manually reacting to payments or running trades on a schedule, you define a flow once and it runs automatically when the right conditions are met.

A flow has two parts:

  • A trigger — what starts it (an incoming payment, or a time schedule)
  • Steps — what actions to take when it fires (e.g: placing a trade)

Flows can be scoped to a vault (applies to all accounts unless overridden) or to a specific account.

Lifecycle

Flows are created inactive. Once configured, activate them explicitly — this is especially important for scheduled flows, which compute their next run time on activation.

StateMeaning
active: falseFlow exists but will not execute
active: trueFlow is live and will execute on trigger

Activating and deactivating

POST /api/v1/flows/:uuid/activate
POST /api/v1/flows/:uuid/deactivate

No request body needed. Returns the updated flow. For scheduled flows, activation computes next_run_at; deactivation clears it.


Executions

Every time a flow runs, an execution record is created. You can use this to see what happened, debug failures, and review trade results.

GET /api/v1/flows/:uuid/executions?page=1&per_page=20

Results are paginated, most recent first.

Execution status

StatusMeaning
pendingFlow was triggered and is being processed
completedAll steps ran successfully
failedSomething went wrong — check error_message

Vault vs account precedence

Account-level flows take priority. If an account has any flow (active or not) for a given trigger_source, vault-level flows are skipped entirely for that source on that account.