My Recent Swaps
API-v1my_recent_swaps
The my_recent_swaps
method returns the data of the most recent atomic swaps executed by the Komodo DeFi Framework API node. All filters (my_coin, from_timestamp, etc.) are combined using logical AND.
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
limit | number | ✗ | 10 | Limits the number of returned swaps. The default is 10 . |
from_uuid | string | ✗ | - | Skips records until this uuid, skipping the from_uuid as well. Useful for infinite scrolling implementation. |
page_number | number | ✗ | 1 | Returns limit swaps from the selected page. Ignored if from_uuid is set. |
my_coin | string | ✗ | - | Return only swaps that match the swap.my_coin = request.my_coin condition. |
other_coin | string | ✗ | - | Return only swaps that match the swap.other_coin = request.other_coin condition. |
from_timestamp | number (timestamp in seconds) | ✗ | - | Return only swaps that match the swap.started_at >= request.from_timestamp condition. |
to_timestamp | number (timestamp in seconds) | ✗ | - | Return only swaps that match the swap.started_at < request.to_timestamp condition. |
Parameter | Type | Description |
---|---|---|
swaps | array of objects | A list of standard SwapStatus objects |
from_uuid | string | The from_uuid that was set in the request; this value is null if nothing was set |
skipped | number | The number of skipped records (i.e. the position of from_uuid in the list + 1 or (page_number - 1) * limit ; 0 if not set) |
limit | number | The limit that was set in the request; actual number of swaps can differ from the specified limit (e.g. on the last page) |
total | number | Total number of swaps available with the selected filters |
page_number | number | The page_number that was set in the request; defaults to 1 if not set |
total_pages | number | Total pages available with the selected filters and limit |
found_records | number | The number of returned swaps |
my_recent_swaps
POST
my_recent_swaps{
"userpass": "RPC_UserP@SSW0RD",
"method": "my_recent_swaps",
"limit": 2,
"my_coin": "DOC",
"other_coin": "MARTY"
}