# all_swaps_uuids_by_filter
all_swaps_uuids_by_filter (my_coin other_coin from_timestamp to_timestamp)
The all_swaps_uuids_by_filter
method returns all uuids of swaps that match the selected filters. Please note that all filters (my_coin, from_timestamp, etc.) are combined using logical AND.
# Arguments
Structure | Type | Description |
---|---|---|
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 |
# Response
Structure | Type | Description |
---|---|---|
result | result object | |
result.uuids | array of strings | uuids of swaps that match the selected filters |
result.my_coin | string | my_coin that was set in request |
result.other_coin | string | other_coin that was set in request |
result.from_timestamp | number | from_timestamp that was set in request |
result.to_timestamp | number | to_timestamp that was set in request |
result.records_found | number | the number of found uuids |
# 📌 Examples
# Command (select swaps uuids that have my_coin = RICK and other_coin = MORTY)
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"all_swaps_uuids_by_filter\",\"my_coin\":\"RICK\",\"other_coin\":\"MORTY\"}"
# Command (select swaps uuids that have my_coin = RICK and started_at >= 1611705600 (January 27, 2021 0:00:00 GMT))
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"all_swaps_uuids_by_filter\",\"my_coin\":\"RICK\",\"from_timestamp\":1611705600}"
# Command (select swaps uuids that have started_at >= 1611705600 (January 27, 2021 0:00:00 GMT) and started_at < 1611792001 (January 28, 2021 0:00:01 GMT))
curl --url "http://127.0.0.1:7783" --data "{\"userpass\":\"$userpass\",\"method\":\"all_swaps_uuids_by_filter\",\"my_coin\":\"RICK\",\"from_timestamp\":1611705600,\"to_timestamp\":1611792001}"