Skip to content

Your organisation's sweeps, with how each last ran

GET
/v1/sweeps
curl --request GET \
--url https://api.sotirea.com/v1/sweeps \
--header 'Authorization: Bearer <token>'

Each sweep gathers what your customers’ deposit vaults hold free into one of your own vaults, every 15 minutes: every vault opened with a reference, or the vaults it names, never the vault it sweeps into. A vault is swept once it holds the minimum, unless one sweep would cost more than the fee ceiling or the gas pool cannot pay; then it waits. Lists active sweeps, proposals waiting for a second person, and recent decisions. A sweep is a payment with purpose sweep; its arrival is a deposit with sweep true, not a customer paying you.

Done.

Media typeapplication/json
object
data
required
Array<object>
object
asset
required

Native, or a token’s contract.

string
chain_id
required
string
chain_name
required
string
coin_decimals
required
integer
coin_symbol
required

The network’s coin, which pays the fees.

string
decided_at
required
Any of:
string format: date-time
decided_by
string
decimals

The asset’s decimals; absent for a token whose contract has not been read.

integer
destination_vault_id
required
integer
destination_vault_name
required
string
every_referenced_vault
required

Whether it sweeps every vault opened with a reference: each customer’s deposit vault, including those opened later.

boolean
fee_ceiling
required

The most one sweep may cost in network fees, in the network coin’s smallest unit.

string
id
required
integer
last_run
required
Any of:
object
at
required
string format: date-time
detail

What happened, vault by vault, in words.

string
outcome
required

Swept; nothing (no vault held the minimum); skipped (every sweep worth making was held back: the fee above the ceiling, or the gas pool unable to pay); or failed.

string
skipped_since

When the current run of skips began. After a day, the people who manage sweeps are emailed once.

string format: date-time
min_amount
required

The least a vault must hold free before it is swept, in the asset’s smallest unit.

string
proposed_at
required
string format: date-time
proposed_by
required

The person’s name, or the API key’s when a key proposed it.

string
proposed_by_api_key
required

Whether an API key proposed it. Nobody who has held that key’s secret may confirm it.

boolean
replaces_id

The rule a proposal changes or retires.

integer
retire
required

A proposal to stop the rule it replaces.

boolean
sole_manager
required

Confirmed by its proposer alone, because nobody else in your organisation manages sweeps.

boolean
source_vaults
required

The vaults it sweeps when it names them; empty when it sweeps every vault opened with a reference. Never the destination.

Array<object>
object
id
required
integer
name
required
string
state
required

Active, proposed (waiting for a second person), declined or retired.

string
symbol
required
string
meta
object
request_id

Quote it when asking about a request; it is in the X-Request-Id header too.

string
success
required

Example

{
"success": true
}

Refused or failed, in words a person can act on.

Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
meta
object
request_id

Quote it when asking about a request.

string
success
required

Example

{
"success": false
}