Skip to content

GetTxData

Endpoint: GET /get-tx-data

Description: Retrieves the necessary data to execute a cross-chain transaction.

Parameters:
NameTypeRequiredDescription
srcChainIdnumbertrueSource chain ID
destChainIdnumbertrueDestination chain ID
amountstringtrueAmount to be transferred (in wei)
recipientAddressstringtrueRecipient's address on the destination chain
minAmountOutstringtrueMinimum amount expected on the destination
selfbooleantrueIndicates if the sender is the recipient
Example Request:
curl -X GET "https://api.refuel.exchange/get-tx-data?srcChainId=137&destChainId=1868&amount=1953476036815543522&recipientAddress=0x585265e02c5bE4E141cba3194bB9E6cAe7DA0174&minAmountOut=268179126466682&self=true"
Example Response:
{
  "success": true,
  "result": {
    "chainId": 137,
    "tx": {
      "to": "0xb3583F926668cb693D616BA0d6268105d88cED03",
      "value": "1953476036815543522",
      "data": "0x000b"
    }
  }
}