Instant Swap API
Retrieve Swap Information
GET:
https://api.pegasusswap.com/api/private/get-transaction
This API endpoint provides details about a specific swap.
Parameters:
| Name | Type | Required or optional | Description |
|---|---|---|---|
| id | string | required | Swap ID |
Successful response fields:
| Name | Type | Description |
|---|---|---|
| type | object | An object containing the type of swap (fixed or floating rate). |
| typeSwap | number | A type of swap where 1 - Fixed, 2 - Float |
| pairs | object | An object containing information about coin pairs for deposit and withdrawal |
| deposit/receive | object | An object containing information about a coin for deposit and withdrawal |
| coin | object | An object containing information out of a coin for deposit and withdrawal |
| name | string | Coin name (eg BTC, XMR) |
| value | number | The number of coins that will be sent or received |
| network | string | The network in which the transaction takes place (eg ERC20, XMR) |
| fullName | string | The full name of the coin |
| address | string | Address to send or receive coins |
| memo | string | Memo for transaction |
| receiveTransaction | object | An object containing information about the received transaction |
| txId | string | Receive transaction id |
| address | string | Address to receive coins |
| receivedTime | string | The time the transaction was received |
| gettingInTheBlock | string | The time of receiving the first sending confirmation |
| amount | number | null | Number of coins sending |
| confirmation | number | null | Number of confirmations for the transaction for sending |
| fees | number | null | Fees for sending funds |
| fees | object | An object containing information about commissions |
| feeNodeDeposit | number | Fees for deposit |
| swapTime | object | An object containing the swap time |
| end | string | Transaction completion time |
| duration | string | Duration of the transaction |
| start | string | Transaction start time |
| orderNumber | string | The unique identifier of the transaction |
| status | number | New - 9; Confirmation - 1; Exchanging - 3; Success - 4, 12; Overdue - 5; Error - 6; Pause - 10; Frozen - 11; Refund - 13 |
| txId | string | Deposit transaction id |
| riskScore | number | null | Risk assessment for the transaction |
| receivedTime | string | Deposit receiving time |
| gettingInTheBlock | string | The time of receiving the first deposit confirmation |
| confirmation | number | null | Number of confirmations for the transaction for deposit |
| createdAt | string | Transaction creation time |
Example request:
GET:
https://api.pegasusswap.com/api/private/get-transaction?id=RTGTLN
Example response:
{
"type": {
"typeSwap": 2
},
"pairs": {
"deposit": {
"coin": {
"name": "BTC",
"value": 0.00047,
"network": "BTC",
"fullName": ""
},
"address": "bc1qt3uurp5yjl0s9hpc834nkxx37f99hn5xfqt8x3",
"memo": ""
},
"receive": {
"coin": {
"name": "XMR",
"value": 0.37555349507259705,
"network": "XMR",
"fullName": ""
},
"address": "49ALvhFRnJm4n1JsBG2fiAcrpPXeGEUvrLCvUjXNr9TqLk74pmj9X7s9aprrzRNNWHUgRrYbmysN7Xs8UJijXumPTjV5WVb",
"memo": ""
}
},
"receiveTransaction": {
"txId": "",
"address": "",
"receivedTime": "",
"gettingInTheBlock": "",
"amount": null,
"confirmation": null,
"fees": null
},
"fees": {
"feeNodeDeposit": 0.00009912
},
"swapTime": {
"end": "",
"duration": "",
"start": "1728573590155"
},
"orderNumber": "RBGTSM",
"status": 3,
"txId": "a5398b56b451405bbd2804839100e29709e6f79f993b1ba2e466e952ab7940e4",
"riskScore": null,
"receivedTime": "1726833220",
"gettingInTheBlock": "1728574893",
"confirmation": 5,
"createdAt": "2025-02-11T13:08:25.367Z"
}