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

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

Request body for getting exchange data

idstringRequired

Swap ID

Example: 9ee110b2-b8dc-4191-90ae-fb0153f5eed6
Responses
200Success
application/json
post
POST /api-gateway/swaps/get HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "id": "9ee110b2-b8dc-4191-90ae-fb0153f5eed6"
}
200Success
{
  "success": true,
  "response": {
    "id": "9ee110b2-b8dc-4191-90ae-fb0153f5eed6",
    "clientId": "merchant_unique_id",
    "addressFromId": "ed7c4941-a5ab-4f53-afb1-195f3a217a62",
    "addressToId": "96acba77-e951-4be2-a95a-0dc4f29348ab",
    "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-07-15T10:50:46.082Z"
  }
}

Last updated