Creation of a cross-chain exchange
Last updated
Last updated
The method allows you to create a cross-chain exchange. Cross-chain exchange allows you to exchange one asset for another
Public API-key
Signing the request body with a private API-key
Request content type
application/json
Unique exchange identifier in the merchant system (to prevent duplicate requests)
merchant_unique_id
Identifier of the outgoing address from which the specified amount will be debited
c4179377-b199-455b-ab08-16c517bb3f1b
Identifier of the destination address where the coins will be credited after the swap
fd7b36c8-ff3f-4bdb-85d5-0e91e938bf7f
Commission Token
U2FsdGVkX18gNxdwlBIJd5VipZO5oHRKfaGyRUVg7/FmIVhvyfuzPHXkpy3SiEGyf5pvsynU3jhAqyEU2ZozbempdZgdlQHzadKVRSzMRRs8TvcXyDg8XLqmppekgxz+cn0H2/UzR62zveNm0vMn4gNvOnLm6xt0OvujZz57yg8Hl7oOYHHvzQ4Z9jDJmVdkScdnXk1WBD5NRNniCcynHA==
URL address for notifying about the change in the status of the swap operation
https://merchant.domain/webhooks/swap
POST /api-gateway/swaps/create HTTP/1.1
Host: app.apollopayment.io
Content-Type: application/json
Accept: */*
Content-Length: 424
{
"clientId": "merchant_unique_id",
"addressFromId": "c4179377-b199-455b-ab08-16c517bb3f1b",
"addressToId": "fd7b36c8-ff3f-4bdb-85d5-0e91e938bf7f",
"feeToken": "U2FsdGVkX18gNxdwlBIJd5VipZO5oHRKfaGyRUVg7/FmIVhvyfuzPHXkpy3SiEGyf5pvsynU3jhAqyEU2ZozbempdZgdlQHzadKVRSzMRRs8TvcXyDg8XLqmppekgxz+cn0H2/UzR62zveNm0vMn4gNvOnLm6xt0OvujZz57yg8Hl7oOYHHvzQ4Z9jDJmVdkScdnXk1WBD5NRNniCcynHA==",
"webhookUrl": "https://merchant.domain/webhooks/swap"
}
{
"success": true,
"response": {
"id": "1118a717-9143-47ee-be30-d69148f380db",
"clientId": "merchant_unique_id",
"addressFromId": "c4179377-b199-455b-ab08-16c517bb3f1b",
"addressToId": "fd7b36c8-ff3f-4bdb-85d5-0e91e938bf7f",
"currencyFrom": "USDT",
"currencyTo": "USDC",
"networkFrom": "ethereum",
"networkTo": "tron",
"status": "PENDING",
"rejectMessage": "null",
"amountFrom": "200",
"amountTo": "200",
"price": "1",
"serviceBlockchainFeeSource": "ADVANCE",
"serviceBlockchainFee": "2",
"serviceBlockchainFeeUSD": "2",
"providerBlockchainFeeSource": "AMOUNT",
"providerBlockchainFee": "2",
"providerBlockchainFeeUSD": "2",
"serviceFeeSource": "ADVANCE",
"serviceFee": "2",
"serviceFeeUSD": "2",
"webhookUrl": "https://merchant.domain/webhooks/swap",
"createdAt": "2025-06-09T13:18:29.432Z"
}
}