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

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body
clientIdstringOptional

Unique exchange identifier in the merchant system (to prevent duplicate requests)

Example: merchant_unique_id
addressFromIdstringRequired

Identifier of the outgoing address from which the specified amount will be debited

Example: c4179377-b199-455b-ab08-16c517bb3f1b
addressToIdstringRequired

Identifier of the destination address where the coins will be credited after the swap

Example: fd7b36c8-ff3f-4bdb-85d5-0e91e938bf7f
feeTokenstringRequired

Commission Token

Example: U2FsdGVkX18gNxdwlBIJd5VipZO5oHRKfaGyRUVg7/FmIVhvyfuzPHXkpy3SiEGyf5pvsynU3jhAqyEU2ZozbempdZgdlQHzadKVRSzMRRs8TvcXyDg8XLqmppekgxz+cn0H2/UzR62zveNm0vMn4gNvOnLm6xt0OvujZz57yg8Hl7oOYHHvzQ4Z9jDJmVdkScdnXk1WBD5NRNniCcynHA==
webhookUrlstringOptional

URL address for notifying about the change in the status of the swap operation

Example: https://merchant.domain/webhooks/swap
Responses
200Success
application/json
post
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"
}
200Success
{
  "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"
  }
}

Last updated