Commission token formation
The method allows you to get a commission token for 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/jsonBody
currencyFromstringRequiredExample:
Outgoing coin
USDTcurrencyTostringRequiredExample:
Expected coin
USDCnetworkFromstringRequiredExample:
Outgoing network
ethereumnetworkTostringRequiredExample:
Expected Network
tronamountstringRequiredExample:
Exchange amount
200Responses
200Success
application/json
Successful response
successbooleanRequired
Request success indicator
post/api-gateway/swaps/fee-token
POST /api-gateway/swaps/fee-token HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"currencyFrom": "USDT",
"currencyTo": "USDC",
"networkFrom": "ethereum",
"networkTo": "tron",
"amount": "200"
}200Success
{
"success": true,
"response": {
"amountFrom": "200",
"amountTo": "200",
"serviceBlockchainFeeSource": "ADVANCE",
"serviceBlockchainFee": "2",
"serviceBlockchainFeeUSD": "2",
"providerBlockchainFeeSource": "AMOUNT",
"providerBlockchainFee": "2",
"providerBlockchainFeeUSD": "2",
"serviceFeeSource": "ADVANCE",
"serviceFee": "2",
"serviceFeeUSD": "2",
"price": "1",
"token": "U2FsdGVkX1/YV+QnxA8TgLWJjfvQq84aWf0PEXGyftGjOa5MYop5FQ4p7D08CN6WL6p1pZMw2n6KZ5RxuTyzbC74vrUkewPBQFJIbZ3J5VpMb3j1qQDkdFVnF++C73c4K4trxS/hmtZRvgbEhPL+4HCast15E3waMCsu2Mfk3c0qnXa+NVYiG3g0fuoUjupWcdsgv4eJQA/M9qocf2O+wQ==",
"expiresAt": "2026-01-29T11:15:13.708Z"
}
}Last updated