pub struct SwapListQuery {Show 13 fields
pub user_id: String,
pub limit: u32,
pub offset: u32,
pub is_active: Option<bool>,
pub swap_type: Option<String>,
pub status: Option<String>,
pub error_type: Option<String>,
pub created_after: Option<u64>,
pub created_before: Option<u64>,
pub min_amount: Option<u64>,
pub max_amount: Option<u64>,
pub search: Option<String>,
pub with_create_request: bool,
}Expand description
Filters for GET /v1/swap. They intersect, and all of them apply before
limit and offset, so Pagination::total counts what they matched. A
filter sent with nothing in it means the same as one left out.
Fields§
§user_id: String§limit: u32Page size, at most 100. A larger one is rejected, not clamped.
offset: u32§is_active: Option<bool>true keeps only active swaps, false only finished ones; omit for both.
swap_type: Option<String>Keeps only swaps of this type: SwapIn, SwapOut, or SwapChain.
status: Option<String>Comma-separated FSM statuses to keep, e.g. Claimed,Refunded.
error_type: Option<String>Comma-separated cancellation reasons to keep, e.g. UserCanceled,Timeout.
Only a cancelled swap has one, so this filters out every other swap too.
created_after: Option<u64>Keeps swaps created at or after this unix timestamp, in seconds.
created_before: Option<u64>Keeps swaps created at or before this unix timestamp, in seconds.
min_amount: Option<u64>Keeps swaps whose receive_amount is at least this many sats.
max_amount: Option<u64>Keeps swaps whose receive_amount is at most this many sats.
search: Option<String>Keeps swaps where swap_id, payment_hash, claim_invoice,
source_txid, dest_txid, or user_claim_address equals this value.
The match ignores case but is exact, not a prefix.
with_create_request: booltrue carries each swap’s create_request_* fields as
GET /v1/swap/{id} does; a page omits them otherwise.