Skip to main content
POST
/
fee
/
quote
Error
A valid request URL is required to generate request examples
{
  "forwarder": "<string>",
  "collector": "<string>",
  "token": "<string>",
  "estimatedXlmFee": "<string>",
  "tokenAmount": "<string>",
  "expiresAtLedger": 2
}

Authorizations

x-api-key
string
header
required

Server-held API key. Injected by the BFF (createRelayRoute / createSignerProxyRoute from @buckspay/nextjs). This key must only appear in server-side code and must never be shipped to a browser bundle.

Body

application/json

Request body for POST /fee/quote. Calls are simulated server-side to price the XLM fee as a token amount.

chain
enum<string>
required

Stellar network identifier used in facilitator requests.

Available options:
stellar-testnet,
stellar-pubnet
from
string
required

Payer address (G or C) whose account the fee will be deducted from.

Pattern: ^[GC][A-Z2-7]{55}$
token
string
required

Token contract address (USDC SAC) used to pay the gas fee.

Pattern: ^C[A-Z2-7]{55}$
calls
object[]
required

Calls to simulate for fee estimation.

Minimum array length: 1

Response

Fee quote computed successfully.

Fee quote returned by POST /fee/quote. Mirrors the SDK FeeQuote type from @buckspay/core.

forwarder
string
required

FeeForwarder contract address. The SDK uses this to build the forward() authorization entry.

Pattern: ^C[A-Z2-7]{55}$
collector
string
required

Address that collects the fee (G or C). Embedded in the forward() invocation.

Pattern: ^[GC][A-Z2-7]{55}$
token
string
required

Token used to pay the fee. Echoes the request token.

Pattern: ^C[A-Z2-7]{55}$
estimatedXlmFee
string
required

Estimated XLM fee in stroops.

Pattern: ^\d+$
tokenAmount
string
required

Fee expressed in the requested token's smallest unit (USDC stroops for USDC). The SDK passes this as the fee_amount argument in the forward() invocation.

Pattern: ^\d+$
expiresAtLedger
integer
required

Ledger sequence after which this quote expires. The SDK refuses to build a relay with an expired quote.

Required range: x >= 1