A newly created swap will have a
When funds arrive on the
fundingAddress, the swap will either succeed or initiate a refund.
If the swap is valid, the swap status will be changed to
PROCESSING when a transfer is created. When the funds are confirmed on the network, the status will be changed to
In the case where the deposited funds are too small, and there would be nothing left for sending to the destination after subtracting all the fees, we will try to refund the deposit amount to the SRN in the
refundTo parameter. If the
refundTo is a wallet SRN, account SRN, or user SRN, there should be no issues with the refund. However, if the
refundTo value is a wallet address and the amount is too small, we will refund the funding amount to the swap owner, which is the user SRN. The status will be changed from
PROCESSING_REFUND, then finally to
PROCESSING state, the exchange rate is defined and locked. You could retrieve the swap transfer by calling the Get Swap endpoint.
After a swap has expired, it will cease to function. Funds sent to it will be sent to the
refundTo parameter. In case of any error, it will refund to the swap owner, specified by the user SRN.
The endpoint only accept a valid user session. If you are creating a swap on behalf of the user, you will need to use the masqueradeAs URL parameter.
You will encounter
AccessDeniedExceptionresponses if you attempt to create a swap without this.
Updated about 1 month ago