curl --request GET \
--url https://api.example.com/swaps/{swapId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/swaps/{swapId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/swaps/{swapId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "swp_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"status": "awaitingSignature",
"createdAt": "2023-11-07T05:31:56Z",
"sourceAccount": "USDC",
"destinationAccount": "USDC",
"quote": {
"fromAmount": "500.00",
"fromCurrency": "<string>",
"toAmount": "500.00",
"toCurrency": "<string>",
"rate": "500.00",
"feeAmount": "500.00",
"feeCurrency": "<string>",
"minimumToAmount": "500.00",
"estimated": false,
"etaHours": 123,
"expiresAt": "2023-11-07T05:31:56Z"
},
"transactionHash": "<string>",
"transactionId": "txn_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"settledAt": "2023-11-07T05:31:56Z",
"failure": {
"code": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Retrieve a transfer between the client's own accounts
Retrieve the current lifecycle of a swap, the quote it was fixed at and any actionable failure.
curl --request GET \
--url https://api.example.com/swaps/{swapId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/swaps/{swapId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/swaps/{swapId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "swp_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"status": "awaitingSignature",
"createdAt": "2023-11-07T05:31:56Z",
"sourceAccount": "USDC",
"destinationAccount": "USDC",
"quote": {
"fromAmount": "500.00",
"fromCurrency": "<string>",
"toAmount": "500.00",
"toCurrency": "<string>",
"rate": "500.00",
"feeAmount": "500.00",
"feeCurrency": "<string>",
"minimumToAmount": "500.00",
"estimated": false,
"etaHours": 123,
"expiresAt": "2023-11-07T05:31:56Z"
},
"transactionHash": "<string>",
"transactionId": "txn_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41",
"settledAt": "2023-11-07T05:31:56Z",
"failure": {
"code": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The client account to act for, as a cl_… id. Omit it to act as yourself.
"cl_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Path Parameters
Response
Successful Response
Stable public identifier for this swap.
^(?:swp_)?[A-Za-z0-9._:\-]{1,216}$"swp_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
Current public lifecycle status of the swap.
awaitingSignature, submitted, settled, failed UTC timestamp when the swap was created.
Account the money leaves.
USDC, EURC, FDIC_USD Account the money lands on.
USDC, EURC, FDIC_USD Terms fixed when the swap was created.
Show child attributes
Show child attributes
On-chain transaction hash, when broadcast.
Ledger transaction identifier, when projected.
^(?:txn_)?[A-Za-z0-9._:\-]{1,216}$"txn_9f2c1ab84d7e4f1fa3c65b0e7d9a2c41"
UTC timestamp when settlement completed.
Terminal or actionable failure details.
Show child attributes
Show child attributes
Was this page helpful?