Create Quote (Off Ramp)
This endpoint creates a quote for converting a cryptocurrency (crypto-to-fiat) in an off-ramp scenario. The data generated includes calculated rates, fees, and applicable transaction limits.
Endpoint
POST {{baseURL}}/v1/ramp/quote
Header
Header | Value | Required |
---|---|---|
Content-Type | application/json | Yes |
x-api-key | YOUR_API_KEY | Yes |
Example Request Body
cURL
curl --location --request POST '{{baseURL}}/v1/ramp/quote' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"paymentChannel": "BANK_TRANSFER",
"source": {
"amount": 5000,
"symbol": "USDC",
"blockchain": "MATIC"
},
"target": {
"country": "NG",
"currency": "NGN"
}
}'
ℹ️
Note: Gas fee level defaults to MEDIUM
.
Success Response 200 OK
{
"message": "quote successfully created",
"status": "success",
"data": {
"id": "92da6ea0-79fe-4000-971d-xxxxxxxxxx",
"source": {
"currency": "USDC",
"symbol": "USDC",
"addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
"amount": 0.12,
"type": "CRYPTOCURRENCY",
"network": {
"id": "24d4025f-46fb-4021-b0c4-xxxxxxxxxx",
"name": "USDC",
"blockchain": "MATIC"
}
},
"target": {
"currency": "NGN",
"country": "NG",
"amount": 117.30,
"type": "FIAT"
},
"rate": 0.00102300,
"fees": {
"amount": 0.00
},
"rules": [
{
"category": "LIMIT",
"appliedCurrency": "NGN",
"appliedCountry": "NG",
"transaction": {
"minimum": 10.00,
"maximum": 2000000.00
},
"invoice": 2000000.00
}
],
"gasFee": {
"feeLevel": {
"type": "MEDIUM",
"fee": {
"name": "USDC",
"symbol": "USDC",
"amount": 0.02440458
}
}
},
"summary": {
"total": 0.12
}
}
}
Response Fields Breakdown
Field | Type | Description |
---|---|---|
message | string | Result message. |
status | string | Status of the request (e.g., success ). |
data.id | string | Unique identifier for the created quote. |
Source Object
Field | Type | Description |
---|---|---|
data.source.currency | string | Name of the source currency (e.g., USDC ). |
data.source.symbol | string | Symbol of the source currency (e.g., USDC ). |
data.source.addressRegex | string | Regular expression to validate addresses. |
data.source.amount | number | Amount of the source asset. |
data.source.type | string | Type of the source asset (e.g., CRYPTOCURRENCY ). |
data.source.network.id | string | Unique ID of the source network. |
data.source.network.name | string | Name of the source network (e.g., USDC ). |
data.source.network.blockchain | string | Blockchain name (e.g., MATIC ). |
Target Object
Field | Type | Description |
---|---|---|
data.target.currency | string | Target currency (e.g., NGN ). |
data.target.country | string | Country code of the target (e.g., NG ). |
data.target.amount | number | Amount in the target currency. |
data.target.type | string | Type of the target asset (FIAT or CRYPTOCURRENCY ). |
Rate and Fees
Field | Type | Description |
---|---|---|
data.rate | number | Conversion rate from source to target. |
data.fees.amount | number | Fee amount applied to the transaction. |
Rules Array
Field | Type | Description |
---|---|---|
data.rules[].category | string | Rule category (e.g., LIMIT ). |
data.rules[].appliedCurrency | string | Currency to which the rule is applied. |
data.rules[].appliedCountry | string | Country where the rule is applied. |
data.rules[].transaction.minimum | number | Minimum allowable transaction amount. |
data.rules[].transaction.maximum | number | Maximum allowable transaction amount. |
data.rules[].invoice | number | Invoice amount limit. |
Gas Fee Object
Field | Type | Description |
---|---|---|
data.gasFee.feeLevel.type | string | Selected gas fee level (e.g., MEDIUM ). |
data.gasFee.feeLevel.fee.name | string | Name of the token used for gas fee (e.g., USDC ). |
data.gasFee.feeLevel.fee.symbol | string | Symbol of the gas fee token. |
data.gasFee.feeLevel.fee.amount | number | Gas fee amount in the token. |
Summary
Field | Type | Description |
---|---|---|
data.summary.total | number | Total amount to be sent by the user. |
Error Responses
HTTP Status | Error Code | Message | Description |
---|---|---|---|
400 | INVALID_INPUT | Invalid request payload | One or more fields are missing or have invalid values. |
401 | UNAUTHORIZED | Missing or invalid API key | The x-api-key header is missing or incorrect. |
403 | FORBIDDEN | Access denied | The authenticated user is not allowed to create quotes. |
404 | NOT_FOUND | Resource not found | The requested network or currency does not exist. |
500 | SERVER_ERROR | Internal server error | An unexpected error occurred on the server. |