On this page

latest contributor to this doc

Last Edit:

@smk762

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.

ParameterTypeRequiredDefaultDescription
limitnumber10Limits the number of returned swaps. The default is 10.
from_uuidstring-Skips records until this uuid, skipping the from_uuid as well. Useful for infinite scrolling implementation.
page_numbernumber1Returns limit swaps from the selected page. Ignored if from_uuid is set.
my_coinstring-Return only swaps that match the swap.my_coin = request.my_coin condition.
other_coinstring-Return only swaps that match the swap.other_coin = request.other_coin condition.
from_timestampnumber (timestamp in seconds)-Return only swaps that match the swap.started_at >= request.from_timestamp condition.
to_timestampnumber (timestamp in seconds)-Return only swaps that match the swap.started_at < request.to_timestamp condition.

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
skippednumberThe number of skipped records (i.e. the position of from_uuid in the list + 1 or (page_number - 1) * limit; 0 if not set)
limitnumberThe limit that was set in the request; actual number of swaps can differ from the specified limit (e.g. on the last page)
totalnumberTotal number of swaps available with the selected filters
page_numbernumberThe page_number that was set in the request; defaults to 1 if not set
total_pagesnumberTotal pages available with the selected filters and limit
found_recordsnumberThe 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"
}