Commission token formation

The method allows you to get a commission token for cross-chain exchange

Commission token formation

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
currencyFromstringRequired

Outgoing coin

Example: USDT
currencyTostringRequired

Expected coin

Example: USDC
networkFromstringRequired

Outgoing network

Example: ethereum
networkTostringRequired

Expected Network

Example: tron
amountstringRequired

Exchange amount

Example: 200
Responses
200Success
application/json
post
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": "U2FsdGVkX18GQLL8vm3k8nPzBoxIp0NJ4M1+46VtZC4/mkAR/BJ6cVXGOdtUumCK4jbe8O71XZW9AIbMmtKkVqrmP7UbND2VVNc7C7ObMa9V1+XbNJmJtBF6YueGXuvgaBl6j4ypUpyRqgBkK5qoDeTqWv3P54ul9lKlFxLRpfG1P0IgcJtY6XxEfjaEHXbx1zFwjqhn7PGzfMw5TCjVNg==",
    "expiresAt": "2025-06-09T11:39:26.571Z"
  }
}

Last updated