/api/partner/v2/quotes

πŸ” Get Quote

Retrieve a quote for an on/off-ramp transaction. This provides the estimated fiat value a user would receive when converting a specified amount of crypto, including any applied spreads.


πŸ” Headers

HeaderDescription
partner-api-keyAPI key associated with your partner account. Required. See API Key Generation Guide.

⚠️

This endpoint requires authentication using a valid partner-api-key.


πŸ“₯ Query Parameters

ParameterTypeRequiredDescription
tokenSymbolstringβœ…Symbol of the crypto token (e.g., USDC, USDT,MXNe).
transactionTypestringβœ…Type of transaction. Must be "ON_RAMP" or "OFF_RAMP"
blockchainSymbolstringβœ…Symbol of the blockchain where the token resides (e.g., POL,BASE,SOL, BSC).
fiatCurrencystringβœ…Fiat currency symbol (e.g., MXN, DOP).
cryptoAmountnumberπŸ”˜Amount of crypto to be converted. Required if no fiatAmount input
fiatAmountnumberπŸ”˜Amount of fiat to be converted. Required if no cryptoAmount input
premiumSpreadnumberπŸ”˜Optional spread applied to the exchange rate. If 0.01 it will increase the exchange rate by 1%

πŸ“¨ Example Request

curl --request GET \
     --url 'https://staging-api.capa.fi/api/partner/v2/quotes?tokenSymbol=USDC&transactionType=ON_RAMP&blockchainSymbol=POL&fiatCurrency=MXN&cryptoAmount=100&premiumSpread=0.01' \
     --header 'accept: application/json' \
     --header 'partner-api-key: {{API-KEY}}'

 



πŸ“€ Response Body

FieldTypeDescription
successbooleanIndicates if the quote request was successful.
transactionTypestringTransaction type: "ON_RAMP" or "OFF_RAMP".
fiatAmountnumberEstimated amount of fiat to be received or paid.
fiatCurrencystringFiat currency symbol (e.g., MXN, DOP).
blockchainSymbolstringBlockchain used for the transaction (e.g., POL, BASE).
tokenSymbolstringCrypto token symbol (e.g., USDC, USDT, MXNe).
cryptoAmountnumberAmount of crypto involved in the transaction.
ratenumberExchange rate applied to the transaction.
premiumSpreadnumberSpread percentage applied to the exchange rate (optional, if applied).

πŸ“˜ Example Response

{
  "success": true,
  "data": {
    "transactionType": "ON_RAMP",
    "fiatAmount": 1962.7009548859282,
    "fiatCurrency": "MXN",
    "blockchainSymbol": "POL",
    "tokenSymbol": "USDC",
    "cryptoAmount": 100,
    "rate": 19.63138734823794,
    "premiumSpread": 0.01
  }
}
 

⚠️ Important Notes & Requirements


  • Use Before Create Transaction: Always retrieve a quote before initiating an off-ramp transaction to provide accurate values.
  • Consistent Parameters: Ensure that the tokenSymbol, blockchainSymbol, and fiatCurrency match those used in the actual transaction.
  • Rate Expiry: Quotes may have a limited validity window. Confirm expiration or refresh as needed before submission.
  • Premium Spread: If premiumSpread is specified, it will reduce the rate to include the desired markup.

βœ… Use Cases

  • Estimate Payout: Show users the estimated amount they’ll receive before confirming the off-ramp.
  • Dynamic Pricing: Adjust UI pricing and availability dynamically using the returned rate and spread.
  • B2B Reconciliation: Use quoteId for reconciling expected rates with actual disbursements.


Language
URL
Click Try It! to start a request and see the response here!