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.
Parameter | Type | Description |
---|---|---|
my_coin | string | Optional. Coin being used by you for the swap/trade. |
other_coin | string | Optional. Coin you are trading against |
from_timestamp | integer | Optional. Start timestamp in UNIX format |
to_timestamp | integer | Optional. End timestamp in UNIX format |
from_uuid | string | Optional. The UUID from which to start fetching results |
limit | integer | Optional. The maximum number fo results to return |
page_number | integer | Optional. Offset for paginated results |
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 | integer | the 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) |
limit | integer | the 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) |
total | integer | total number of swaps available with the selected filters |
page_number | integer | the 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_pages | integer | total pages available with the selected filters and limit |
found_records | integer | the 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
}
}
{
"result": {
"swaps": [
{
"type": "Taker",
"uuid": "0a3859ba-0e28-49de-b015-641c050a6409",
"my_order_uuid": "0a3859ba-0e28-49de-b015-641c050a6409",
"events": [
{
"timestamp": 1725849334423,
"event": {
"type": "Started",
"data": {
"taker_coin": "MARTY",
"maker_coin": "DOC",
"maker": "15d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732",
"my_persistent_pub": "03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2",
"lock_duration": 7800,
"maker_amount": "2.4",
"taker_amount": "2.4",
"maker_payment_confirmations": 1,
"maker_payment_requires_nota": false,
"taker_payment_confirmations": 1,
"taker_payment_requires_nota": false,
"taker_payment_lock": 1725857133,
"uuid": "0a3859ba-0e28-49de-b015-641c050a6409",
"started_at": 1725849333,
"maker_payment_wait": 1725852453,
"maker_coin_start_block": 724378,
"taker_coin_start_block": 738955,
"fee_to_send_taker_fee": {
"coin": "MARTY",
"amount": "0.00001",
"paid_from_trading_vol": false
},
"taker_payment_trade_fee": {
"coin": "MARTY",
"amount": "0.00001",
"paid_from_trading_vol": false
},
"maker_payment_spend_trade_fee": {
"coin": "DOC",
"amount": "0.00001",
"paid_from_trading_vol": true
},
"maker_coin_htlc_pubkey": "03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2",
"taker_coin_htlc_pubkey": "03d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2",
"p2p_privkey": null
}
}
},
{
"timestamp": 1725849338425,
"event": {
"type": "Negotiated",
"data": {
"maker_payment_locktime": 1725864931,
"maker_pubkey": "000000000000000000000000000000000000000000000000000000000000000000",
"secret_hash": "91ddaac214398b0b728d652af8d86f2e06fbbb34",
"maker_coin_swap_contract_addr": null,
"taker_coin_swap_contract_addr": null,
"maker_coin_htlc_pubkey": "0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732",
"taker_coin_htlc_pubkey": "0315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732"
}
}
},
{
"timestamp": 1725849339829,
"event": {
"type": "TakerFeeSent",
"data": {
"tx_hex": "0400008085202f890101280d9a0703a25cdd553babd5430708f303fe3d446cd79555a53619c987d7b3000000006a47304402205805ecb3fad4c69e27061a35197c470e6a72a2b762269d3ef6b249c835396cd5022046b710dd5b6bdda75cc32a2cb9511ca51c754e4f2bcac8cd0f2757728a1671c6012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff0290b60400000000001976a914ca1e04745e8ca0c60d8c5881531d51bec470743f88aca0e4dc11000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88acfb5ede66000000000000000000000000000000",
"tx_hash": "614d3b1ef3666799d71f54ea242f2cb839646be3bfc81d8f1cfce26747cb9892"
}
}
},
{
"timestamp": 1725849341830,
"event": {
"type": "TakerPaymentInstructionsReceived",
"data": null
}
},
{
"timestamp": 1725849341831,
"event": {
"type": "MakerPaymentReceived",
"data": {
"tx_hex": "0400008085202f8901175391f3922ffcf7dc8929b9795c2fec8d82ed1649e0f3926e04709993dc35a6020000006a4730440220363ea815a237b46c5dd305809fcc103793bb4f620325c12caccb0c88f320e81c02205df417a4b806f3c3d50aa058c4d6a30203868ba786f2a1bd3b3b12917b3882ff01210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ffffffff03001c4e0e0000000017a914944cf7300280e31374b3994422a252bce1fcbd10870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34083d6aff050000001976a9141462c3dd3f936d595c9af55978003b27c250441f88acfc5ede66000000000000000000000000000000",
"tx_hash": "70f6078b9d3312f14dff45fc1e56e503b01d33e22cac8ebd195e4951d468dca6"
}
}
},
{
"timestamp": 1725849341832,
"event": {
"type": "MakerPaymentWaitConfirmStarted"
}
},
{
"timestamp": 1725849465809,
"event": {
"type": "MakerPaymentValidatedAndConfirmed"
}
},
{
"timestamp": 1725849469603,
"event": {
"type": "TakerPaymentSent",
"data": {
"tx_hex": "0400008085202f89019298cb4767e2fc1c8f1dc8bfe36b6439b82c2f24ea541fd7996766f31e3b4d61010000006a4730440220526bd1e2114642b2624cb283bada8dbeb734d3fae9184f6833e0eca87b20fffe0220554a3b38ecde2b8a521b681f5ac3e3940e08f45cc35a2fc19eeaeae513368a6c012103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ffffffff03001c4e0e0000000017a9141036c1fcbdf2b3e2d8b65913c78ab7412422cf17870000000000000000166a1491ddaac214398b0b728d652af8d86f2e06fbbb34b8c48e03000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ac7a5fde66000000000000000000000000000000",
"tx_hash": "ffe2fe025d470996c3057dc561bd79d0a09f2aa5a14b25fb8e444b49394e5ad8"
}
}
},
{
"timestamp": 1725849469604,
"event": {
"type": "WatcherMessageSent",
"data": [
[
4,
...
0
]
]
}
},
{
"timestamp": 1725849486567,
"event": {
"type": "TakerPaymentSpent",
"data": {
"transaction": {
"tx_hex": "0400008085202f8901d85a4e39494b448efb254ba1a52a9fa0d079bd61c57d05c39609475d02fee2ff00000000d74730440220544c5a2eec1e3fb7a2c71e3b6bf3c612300a9c5375ca5c7131742f0afc8a6e8f02206df5b042ec1ff359bf7209269ce3b59d09f5f2340842d5e0a253875624bbce120120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b63046d7dde66b1752103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb3488210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac68ffffffff0118184e0e000000001976a9141462c3dd3f936d595c9af55978003b27c250441f88ac6d7dde66000000000000000000000000000000",
"tx_hash": "58813eb1037e40425d56146c2f6bfbe70b8bcc18e45b752b51c726503ad4f8df"
},
"secret": "d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5"
}
}
},
{
"timestamp": 1725849488871,
"event": {
"type": "MakerPaymentSpent",
"data": {
"tx_hex": "0400008085202f8901a6dc68d451495e19bd8eac2ce2331db003e5561efc45ff4df112339d8b07f67000000000d74730440220286e61b401b1b57b4ddf93294c588a4614e755549168e73c922402ece652d9830220521c7f1df0cbcacf29f55e3a09f2332a6fff25834917307db91072da8f793b030120d178a7c8f88a2f6e496a36ff8d7220c2d48903b45a365b80d59fcfafbf694cb5004c6b6304e39bde66b175210315d9c51c657ab1be4ae9d3ab6e76a619d3bccfe830d5363fa168424c0d044732ac6782012088a91491ddaac214398b0b728d652af8d86f2e06fbbb34882103d8064eece4fa5c0f8dc0267f68cee9bdd527f9e88f3594a323428718c391ecc2ac68ffffffff0118184e0e000000001976a914d346067e3c3c3964c395fee208594790e29ede5d88ace39bde66000000000000000000000000000000",
"tx_hash": "60f83a68e5851ff93308758763ce30c643bd94ae89f4ae43fe7e02dc88d61642"
}
}
},
{
"timestamp": 1725849488872,
"event": {
"type": "Finished"
}
}
],
"maker_amount": "2.4",
"maker_coin": "DOC",
"maker_coin_usd_price": "0.0000001",
"taker_amount": "2.4",
"taker_coin": "MARTY",
"taker_coin_usd_price": "0.00000005",
"gui": "mm2_777",
"mm_version": "2.2.0-beta_2bdee4f",
"success_events": [
"Started",
"Negotiated",
"TakerFeeSent",
"TakerPaymentInstructionsReceived",
"MakerPaymentReceived",
"MakerPaymentWaitConfirmStarted",
"MakerPaymentValidatedAndConfirmed",
"TakerPaymentSent",
"WatcherMessageSent",
"TakerPaymentSpent",
"MakerPaymentSpent",
"MakerPaymentSpentByWatcher",
"Finished"
],
"error_events": [
"StartFailed",
"NegotiateFailed",
"TakerFeeSendFailed",
"MakerPaymentValidateFailed",
"MakerPaymentWaitConfirmFailed",
"TakerPaymentTransactionFailed",
"TakerPaymentWaitConfirmFailed",
"TakerPaymentDataSendFailed",
"TakerPaymentWaitForSpendFailed",
"MakerPaymentSpendFailed",
"TakerPaymentWaitRefundStarted",
"TakerPaymentRefundStarted",
"TakerPaymentRefunded",
"TakerPaymentRefundedByWatcher",
"TakerPaymentRefundFailed",
"TakerPaymentRefundFinished"
],
"my_info": {
"my_coin": "MARTY",
"other_coin": "DOC",
"my_amount": "2.4",
"other_amount": "2.4",
"started_at": 1725849333
},
"recoverable": false,
"is_finished": true
}
],
"from_uuid": null,
"skipped": 0,
"limit": 10,
"total": 1,
"page_number": 1,
"total_pages": 1,
"found_records": 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"
}