Estimates fees for a sponsored (gasless) transaction.
This endpoint provides fee estimation for transactions where the relayer will pay the network fees on behalf of the user. The user pays fees in a token of their choice (e.g., USDC) instead of the native network currency (e.g., XLM for Stellar).
The endpoint accepts either a pre-built transaction XDR or a set of operations to build a transaction from. It returns the estimated fee amount in the specified fee token and the conversion rate from the native currency.
In: header
Path Parameters
The unique identifier of the relayer
Solana-specific fee estimate request parameters
Stellar-specific fee estimate request parameters (classic and Soroban)
Asset identifier for fee token. For classic: "native" or "USDC:GA5Z..." format. For Soroban: contract address (C...) format.
Operations array to build transaction from Mutually exclusive with transaction_xdr field
Source account address (required when operations are provided) For sponsored transactions, this should be the user's account address
Pre-built transaction XDR (base64 encoded, signed or unsigned) Mutually exclusive with operations field. For Soroban gas abstraction: pass XDR containing InvokeHostFunction operation.
Response Body
curl -X POST "https://loading/api/v1/relayers/string/transactions/sponsored/quote" \ -H "Content-Type: application/json" \ -d '{ "fee_token": "string", "transaction": "string" }'{
"data": {
"conversion_rate": "0.15",
"estimated_fee": "1.5"
},
"message": "Fee estimate retrieved successfully",
"success": true
}{
"data": null,
"message": "Bad Request",
"success": false
}{
"data": null,
"message": "Unauthorized",
"success": false
}{
"data": null,
"message": "Relayer with ID relayer_id not found",
"success": false
}{
"data": null,
"message": "Too Many Requests",
"success": false
}{
"data": null,
"message": "Internal Server Error",
"success": false
}