Getting information about cross-chain exchange
The method allows you to get information on a previously created cross-chain exchange
Header parameters
x-api-public-keystringOptional
Public API-key
x-api-signaturestringOptional
Signing the request body with a private API-key
Content-typestringOptionalExample:
Request content type
application/json
Body
Request body for getting exchange data
idstringRequiredExample:
Swap ID
5bf975e9-7382-4c12-b41d-9bb5ea183ed7
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": "5bf975e9-7382-4c12-b41d-9bb5ea183ed7"
}
200Success
{
"success": true,
"response": {
"id": "5bf975e9-7382-4c12-b41d-9bb5ea183ed7",
"clientId": "merchant_unique_id",
"addressFromId": "258e95ed-a3c2-4c85-bf6f-09f8b8f1c0be",
"addressToId": "3d22de20-3fff-4025-bd1a-8a7333aed01b",
"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:11.529Z"
}
}
Last updated