{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/v3/swaps/:id","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{\n    \"id\": \"SW_6H33HP4D8AG\",\n    \"owner\": \"user:US_BDLD3GBQV2M\",\n    \"status\": \"REFUNDED\",\n    \"sourceCurrency\": \"BTC\",\n    \"destCurrency\": \"ETH\",\n    \"dest\": \"ethereum:0x6c2605f4B60c965AE59aF0461C876B4Fa4621234\",\n    \"refundTo\": \"account:AC_6CFMLTWW9FD\",\n    \"fundingAddress\": \"bitcoin:2ShKKLbocqBf1rbSHRi5rkpW7s8rsQK3jSV\",\n    \"createdAt\": 1620258099000,\n    \"updatedAt\": 1620258107000,\n    \"expiresAt\": 1620517299000,\n    \"swapTransfers\": [\n        {\n            \"id\": \"3V9N6DTRB7E\",\n            \"swapId\": \"SW_6H33HP4D8AG\",\n            \"transferId\": \"TR_632FGTUBWPX\",\n            \"type\": \"SWAP\",\n            \"reason\": null,\n            \"refundedTo\": null,\n            \"createdAt\": 1620258100000,\n            \"source\": \"swap:SW_6H33HP4D8AG\",\n            \"dest\": \"ethereum:0x6c2605f4B60c965AE59aF0461C876B4Fa4621234\",\n            \"sourceCurrency\": \"BTC\",\n            \"destCurrency\": \"ETH\",\n            \"sourceAmount\": 0.013156,\n            \"destAmount\": 0.012003783995284864,\n            \"transferStatus\": \"FAILED\",\n            \"networkTxId\": null\n        },\n        {\n            \"id\": \"JNCC7X6EPX8\",\n            \"swapId\": \"SW_6H33HP4D8AG\",\n            \"transferId\": \"TR_632FGTUBWPX-W-R\",\n            \"type\": \"REFUND\",\n            \"reason\": \"Swap failed.\",\n            \"refundedTo\": \"account:AC_6CFMLTWW9FD\",\n            \"createdAt\": 1620258106000,\n            \"source\": \"swap:SW_6H33HP4D8AG\",\n            \"dest\": \"account:AC_6CFMLTWW9FD\",\n            \"sourceCurrency\": \"BTC\",\n            \"destCurrency\": \"BTC\",\n            \"sourceAmount\": 0.013156,\n            \"destAmount\": 0.013156,\n            \"transferStatus\": \"COMPLETED\",\n            \"networkTxId\": null\n        },\n        {\n            \"id\": \"N9T9AWAHCPX\",\n            \"swapId\": \"SW_6H33HP4D8AG\",\n            \"transferId\": \"TR_7HFCLY99NL6-R\",\n            \"type\": \"REFUND\",\n            \"reason\": \"Swap: SW_6H33HP4D8AG is in REFUNDED state. Subsequent deposits to the funding address will be refunded.\",\n            \"refundedTo\": \"account:AC_6CFMLTWW9FD\",\n            \"createdAt\": 1620258113000,\n            \"source\": \"swap:SW_6H33HP4D8AG\",\n            \"dest\": \"account:AC_6CFMLTWW9FD\",\n            \"sourceCurrency\": \"BTC\",\n            \"destCurrency\": \"BTC\",\n            \"sourceAmount\": 0.000001,\n            \"destAmount\": 0.000001,\n            \"transferStatus\": \"COMPLETED\",\n            \"networkTxId\": null\n        }\n    ]\n}","language":"json","status":200}]},"params":[{"name":"id","type":"string","default":"","desc":"ID of swap to lookup","required":false,"in":"path","ref":"","_id":"609ae44f510a14001669c6d2"}],"examples":{"codes":[]},"method":"get"},"next":{"description":"","pages":[]},"title":"Get Swap","type":"endpoint","slug":"get-swap","excerpt":"","body":"## Get Swap Response\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`id`\",\n    \"1-0\": \"`owner`\",\n    \"13-0\": \"\",\n    \"14-0\": \"`notifyUrl`\",\n    \"h-0\": \"Response Field\",\n    \"h-1\": \"Meaning\",\n    \"0-1\": \"The swap object id.\",\n    \"1-1\": \"The owner of this swap. It will be a user srn.\",\n    \"13-1\": \"\",\n    \"14-1\": \"The data subscription URL which is attached to the subsequently created [transfer](doc:transfer-resources). We will notify this URL of updates to the transfer state with webhooks.\",\n    \"15-0\": \"`refundTxId`\",\n    \"15-1\": \"If the swap is being refunded, this will fill in with the corresponding Wyre transaction ID\",\n    \"16-0\": \"`refundTxNetworkId`\",\n    \"16-1\": \"If the swap is being refunded on the blockchain, this will fill in with the corresponding blockchain network transaction ID\",\n    \"17-0\": \"`refundedAt`\",\n    \"17-1\": \"A milliseconds epoch timestamp when the transfer refund was initiated\",\n    \"6-0\": \"`refundTo`\",\n    \"6-1\": \"\",\n    \"2-0\": \"`status`\",\n    \"2-1\": \"Possible statuses are CREATED, PROCESSING, COMPLETED, EXPIRED, PROCESSING_REFUND, REFUNDED\",\n    \"3-0\": \"`sourceCurrency`\",\n    \"4-0\": \"`destCurrency`\",\n    \"3-1\": \"The funding currency of this swap.\",\n    \"4-1\": \"The exchange currency of this swap.\",\n    \"5-0\": \"`dest`\",\n    \"7-0\": \"`fundingAddress`\",\n    \"7-1\": \"The address generated for this swap. This is where funds should be sent to execute the swap.\",\n    \"8-0\": \"`createdAt`\",\n    \"9-0\": \"`updatedAt`\",\n    \"10-0\": \"`expiresAt`\",\n    \"10-1\": \"A milliseconds epoch timestamp when the transfer will expire which will be 72 hours from its creation time\",\n    \"11-0\": \"`swapTransfers`\",\n    \"11-1\": \"An array of transfer history for this swap.\"\n  },\n  \"cols\": 2,\n  \"rows\": 12\n}\n[/block]","updates":[],"order":9,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"609ae3c37642b0002e7278e2","createdAt":"2021-05-11T20:06:27.929Z","user":"5a568b873f58350012e0d314","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Transfers & Exchanges","slug":"transfers","order":7,"from_sync":false,"reference":true,"_id":"5bc633b48f3ff600626e3e18","project":"550f74bb6fc8130d0038aad3","version":"550f75de61d9d30d00af9e01","createdAt":"2018-10-16T18:53:40.959Z","__v":0},"version":{"version":"3","version_clean":"3.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["550f75de61d9d30d00af9e02","551027e38579861900a86698","551029e08579861900a8669a","551029e7498062190006328a","5bc633a722d682005c9ad9e4","5bc633b08c4b0b000d6a7eaa","5bc633b48f3ff600626e3e18","5bc63538e5a6ba000d22ee6d","5bc63587a18a6b000decd295","5bc635c0937fcb0056223d9c","5bc6360f42f41800319aeaa6","5be5d13ff1d319002baca9ce","5be5d2287cd14d00291fbfdb","5be8b3b09f7cb70023c56a39","5be8b3cbb910100044e20206","5c1d769a4f6aed001fe527f0","5c402942010f0d001496dded","5e8127d61c906800374eeb1c","5f2768c98622b8005106544a","5f2768d05702ca0011f7655e","5f276e5348d2b600321aef9b","5f276fd300e519001139200a","5f9a2cb79dafe500259281a7","5fd92bf362bb7301b00e48ba","60ef489344d5cf002cd7414d"],"_id":"550f75de61d9d30d00af9e01","__v":25,"releaseDate":"2015-03-23T02:09:34.221Z","project":"550f74bb6fc8130d0038aad3","createdAt":"2015-03-23T02:09:34.221Z","forked_from":"550f74bb6fc8130d0038aad6"},"project":"550f74bb6fc8130d0038aad3","__v":5,"parentDoc":null}

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

id:
string
ID of swap to lookup

Result Format


Documentation

## Get Swap Response [block:parameters] { "data": { "0-0": "`id`", "1-0": "`owner`", "13-0": "", "14-0": "`notifyUrl`", "h-0": "Response Field", "h-1": "Meaning", "0-1": "The swap object id.", "1-1": "The owner of this swap. It will be a user srn.", "13-1": "", "14-1": "The data subscription URL which is attached to the subsequently created [transfer](doc:transfer-resources). We will notify this URL of updates to the transfer state with webhooks.", "15-0": "`refundTxId`", "15-1": "If the swap is being refunded, this will fill in with the corresponding Wyre transaction ID", "16-0": "`refundTxNetworkId`", "16-1": "If the swap is being refunded on the blockchain, this will fill in with the corresponding blockchain network transaction ID", "17-0": "`refundedAt`", "17-1": "A milliseconds epoch timestamp when the transfer refund was initiated", "6-0": "`refundTo`", "6-1": "", "2-0": "`status`", "2-1": "Possible statuses are CREATED, PROCESSING, COMPLETED, EXPIRED, PROCESSING_REFUND, REFUNDED", "3-0": "`sourceCurrency`", "4-0": "`destCurrency`", "3-1": "The funding currency of this swap.", "4-1": "The exchange currency of this swap.", "5-0": "`dest`", "7-0": "`fundingAddress`", "7-1": "The address generated for this swap. This is where funds should be sent to execute the swap.", "8-0": "`createdAt`", "9-0": "`updatedAt`", "10-0": "`expiresAt`", "10-1": "A milliseconds epoch timestamp when the transfer will expire which will be 72 hours from its creation time", "11-0": "`swapTransfers`", "11-1": "An array of transfer history for this swap." }, "cols": 2, "rows": 12 } [/block]