Creation of a cross-chain exchange
The method allows you to create a cross-chain exchange. Cross-chain exchange allows you to exchange one asset for another
Creation of a cross-chain exchange
POSThttps://ocp.onchainpay.io/api-gateway/swaps/create
Header parameters
Body
advancedBalanceId*string
Identifier of the upfront balance specified when creating the commission token
"1503cf18-597f-447f-b172-112dfe377e1b"
clientIdstring
Unique exchange identifier in the merchant system (to prevent duplicate requests)
"merchant_unique_id"
addressFromId*string
Identifier of the outgoing address from which the specified amount will be debited
"42a54680-0511-4aa0-ba46-5cf1b7de1fd3"
addressToId*string
Identifier of the destination address where the coins will be credited after the swap
"3ee40864-55ea-4c9e-bf28-5fd61cce4334"
feeToken*string
Commission Token
"U2FsdGVkX1+50eNroHexE3RVIJPCwFGVzDjn5Vd2KFXufep4UlF6TeNv0Ef31oVz7ViIZpwdGwZa1aClSH2zG5b8qwWtFKHH6kzwwGkx0LObMCz/LYoudvKlmjReNqj6GppdgQUhppFS3sOIQJ8q+x88zxybJO99Y4o3ApIWyqEne0bggCsjqmywf10LCDKO/cXcb9KRV6TudjhSdx8/jQ=="
webhookUrlstring
URL address for notifying about the change in the status of the swap operation
"https://merchant.domain/webhooks/swap"
Response
Body
success*boolean
Request success indicator
response*SwapResponse (object)
The body of the response to the request for obtaining data from the swap
Request
Response
Last updated