๐Swap
This documentation provides details on the API endpoints available for Whirlprivacy.io, focusing on swap-related operations.
Last updated
This documentation provides details on the API endpoints available for Whirlprivacy.io, focusing on swap-related operations.
Last updated
โ ๏ธ You must be logged in to use these requests below.
For all requests that require user authentication, you must include the following headers:
Header Name | Value | Description |
---|---|---|
/swap/data
- Retrieve Swap DataAllows the retrieval of swap data for a given currency pair and amount.
Name | Type | Description | Required |
---|---|---|---|
Example Code:
/swap/initiate
- Initiate a SwapInitiates a currency swap operation for a logged-in user.
Example Code:
/swap/history
- Retrieve Swap HistoryRetrieves the swap history for a logged-in user.
Example Code:
Error Name | Description |
---|---|
Name | Type | Description | Required |
---|---|---|---|
Error Name | Description |
---|---|
Name | Type | Description | Required |
---|---|---|---|
Error Name | Description |
---|---|
X-API-key
base64
API token obtained after authentication.
tickerIn
String
The ticker symbol of the input currency.
Yes
tickerOut
String
The ticker symbol of the output currency.
Yes
amountIn
String
The amount of the input currency.
Yes
Invalid Parameters
Required parameters are missing.
Failed to Fetch Swap Data
The swap data could not be retrieved.
sender
String
The UUID or the label of the sender.
No
tickerIn
String
The ticker symbol of the currency to swap from.
Yes
tickerOut
String
The ticker symbol of the currency to swap to.
Yes
amountIn
String
The amount of currency to swap.
Yes
slippage
Integer
The slippage percentage in basis points.
Yes
Unauthorized
User is not logged in or session has expired.
Invalid Parameters
One or more parameters are invalid.
Invalid Ticker
The provided ticker symbol is not supported.
Unsupported Swap
The swap operation is not supported.
Invalid Amount
The provided amount is invalid.
Balance Too Low
The user's balance is too low for the swap.
Error Initiating Swap
There was an error initiating the swap.
uuid
or label
String
The UUID or the label of the sender.
Yes
page
Integer
The page number for paginated history data.
Yes
Unauthorized
User is not logged in or session has expired.