GET /swaps

GET /swaps | Auth: Required

Retrieve a paginated list of your past swaps. Optionally filter by status.

Request

Query Parameters

Field
Type
Required
Default
Description

status

string

No

--

Filter by swap status: "submitted", "pending", "completed", or "failed"

limit

integer

No

20

Number of results per page (max 100)

offset

integer

No

0

Number of results to skip for pagination

Example Request

GET /swaps?status=completed&limit=10&offset=0

Response

Field
Type
Description

success

boolean

Whether the request succeeded

swaps

array

List of swap objects

pagination

object

Pagination metadata

Swap Object

Field
Type
Description

swap_id

integer

Unique swap identifier

status

string

"submitted", "pending", "completed", or "failed"

tx_hash

string | null

Transaction hash

from_token

string

Source token symbol

to_token

string

Destination token symbol

Pagination Object

Field
Type
Description

total

integer

Total number of matching swaps

limit

integer

Current page size

offset

integer

Current offset

has_more

boolean

Whether more results exist beyond this page

Example Response

Errors

Status
Error
Cause

400

"Invalid status filter"

The status value is not one of the accepted statuses

400

"limit must be between 1 and 100"

The limit parameter is out of range

401

"Unauthorized"

Missing or invalid API key

Code Examples

curl

Python

TypeScript

Last updated