Getting information about cross-chain exchange

The method allows you to get information on a previously created cross-chain exchange

Getting information about cross-chain exchange

POSThttps://app.apollopayment.io/api-gateway/swaps/get
Header parameters
Body
id*string

Swap ID

Example: "36136188-32b8-45d7-b521-5cb2ab8828a5"
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
const response = await fetch('https://app.apollopayment.io/api-gateway/swaps/get', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "id": "36136188-32b8-45d7-b521-5cb2ab8828a5"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "id": "36136188-32b8-45d7-b521-5cb2ab8828a5",
    "clientId": "merchant_unique_id",
    "advancedBalanceId": "97ed074e-f6ce-441f-a1eb-1e3211e15f3f",
    "addressFromId": "d479f3e4-8671-4028-9dee-0f0cdaea463d",
    "addressToId": "55e05018-b14e-430a-941d-8de664cc2807",
    "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": "2024-10-15T16:11:27.603Z"
  }
}

Last updated