On this page

latest contributor to this doc

Last Edit:

@smk762

my_recent_swaps

my_recent_swaps (from_uuid page_number=1 limit=10 my_coin other_coin from_timestamp to_timestamp)

The my_recent_swaps method returns the data of the most recent atomic swaps executed by the Komodo DeFi Framework API node. Please note that all filters (my_coin, from_timestamp, etc.) are combined using logical AND.

ParameterTypeDescription
my_coinstringOptional. Coin being used by you for the swap/trade.
other_coinstringOptional. Coin you are trading against
from_timestampintegerOptional. Start timestamp in UNIX format
to_timestampintegerOptional. End timestamp in UNIX format
from_uuidstringOptional. The UUID from which to start fetching results
limitintegerOptional. The maximum number fo results to return
page_numberintegerOptional. Offset for paginated results

ParameterTypeDescription
swapsarray of objectsA list of standard SwapStatus objects
from_uuidstringthe from_uuid that was set in the request; this value is null if nothing was set
skippedintegerthe number of skipped records (i.e. the position of from_uuid in the list + 1 or (page_number - 1) * limit; the value is 0 if from_uuid or page_number were not set or page_number is 1)
limitintegerthe limit that was set in the request; note that the actual number of swaps can differ from the specified limit (e.g. on the last page)
totalintegertotal number of swaps available with the selected filters
page_numberintegerthe page_number that was set in the request; if both page_number and from_uuid are not set in request it will default to 1; if from_uuid is present in request this value will be always null
total_pagesintegertotal pages available with the selected filters and limit
found_recordsintegerthe number of returned swaps

POST
my_recent_swaps
{
  "mmrpc": "2.0",
  "userpass": "RPC_UserP@SSW0RD",
  "method": "my_recent_swaps",
  "params": {
    "my_coin": "MARTY",
    "other_coin": "DOC",
    "from_timestamp": 1672531200,
    "to_timestamp": 1734067200,
    "from_uuid": "0a3859ba-0e28-49de-b015-641c050a6409",
    "limit": 5,
    "page_number": 1
  }
}

{
    "error": "rpc:215] dispatcher_legacy:141] lp_swap:1298] UUID parsing failed: invalid length: expected length 32 for simple format, found 64"
}

{
    "error": "rpc:215] dispatcher_legacy:141] lp_swap:1299] my_swaps_storage:102] Unknown SQL error: Query returned no rows"
}