get https://staging-api.capa.fi/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
Header | Description |
---|---|
partner-api-key | API key associated with your partner account. Required. See API Key Generation Guide. |
This endpoint requires authentication using a valid
partner-api-key
.
π₯ Query Parameters
Parameter | Type | Required | Description |
---|---|---|---|
tokenSymbol | string | β | Symbol of the crypto token (e.g., USDC, USDT,MXNe ). |
transactionType | string | β | Type of transaction. Must be "ON_RAMP" or "OFF_RAMP" |
blockchainSymbol | string | β | Symbol of the blockchain where the token resides (e.g., POL ,BASE ,SOL , BSC ). |
fiatCurrency | string | β | Fiat currency symbol (e.g., MXN , DOP ). |
cryptoAmount | number | π | Amount of crypto to be converted. Required if no fiatAmount input |
fiatAmount | number | π | Amount of fiat to be converted. Required if no cryptoAmount input |
premiumSpread | number | π | 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
Field | Type | Description |
---|---|---|
success | boolean | Indicates if the quote request was successful. |
transactionType | string | Transaction type: "ON_RAMP" or "OFF_RAMP" . |
fiatAmount | number | Estimated amount of fiat to be received or paid. |
fiatCurrency | string | Fiat currency symbol (e.g., MXN , DOP ). |
blockchainSymbol | string | Blockchain used for the transaction (e.g., POL , BASE ). |
tokenSymbol | string | Crypto token symbol (e.g., USDC , USDT , MXNe ). |
cryptoAmount | number | Amount of crypto involved in the transaction. |
rate | number | Exchange rate applied to the transaction. |
premiumSpread | number | Spread 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
, andfiatCurrency
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.