Skip to main content
GET
/
api
/
partner
/
v2
/
quotes
cURL
curl --request GET \
  --url https://staging-api.capa.fi/api/partner/v2/quotes \
  --header 'partner-api-key: <partner-api-key>'
{
  "success": true,
  "data": {
    "fiatAmount": 5000,
    "fiatCurrency": "DOP, MXN",
    "blockchainSymbol": "ARB",
    "tokenSymbol": "USDC",
    "transactionType": "ON_RAMP",
    "cryptoAmount": 40,
    "rate": 57.01,
    "premiumSpread": 0.01,
    "flow": "REGULAR | OTC"
  }
}

๐Ÿ” 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).
flowstringTransaction flow type: โ€œOTCโ€, โ€œPAYMENTโ€ OR โ€œREGULARโ€

๐Ÿ“˜ 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,
    "flow": "OTC"
  }
}

โš ๏ธ 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.
  • 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.


Headers

partner-api-key
string
required

Api key for the affiliated partner that is performing the request

Query Parameters

tokenSymbol
enum<string>
required

The token symbol

Available options:
USDC,
USDT,
MXNe,
SOL,
ETH,
wBTC,
cbBTC,
PYSUD,
POL,
BNB,
WLD,
STK,
USDY,
CORE,
USDC.e,
wUSDL,
CoreBTC,
MATIC,
USDbC
Example:

"USDC"

transactionType
enum<string>
required

Transaction type (ON_RAMP or OFF_RAMP)

Available options:
ON_RAMP,
OFF_RAMP,
CROSS_RAMP
Example:

"ON_RAMP"

blockchainSymbol
enum<string>
required

The blockchain symbol

Available options:
POL,
SOL,
BASE,
ARB,
BSC,
OP,
WLD,
STK,
ETH,
MTN,
CORE
Example:

"POL"

fiatCurrency
enum<string>
required

The fiat currency

Available options:
MXN,
DOP,
USD,
EUR
Example:

"MXN"

cryptoAmount
number

The amount of crypto (required for OFF_RAMP)

Example:

100

fiatAmount
number

The amount of fiat (required for ON_RAMP)

Example:

5000

premiumSpread
number

Spread percentage to be applied to the exchange rate

Example:

0.01

Response

200 - application/json

Successful response

success
boolean
Example:

true

data
object
โŒ˜I