Quotes
Create Quote-Crypto

Create Quote - (Crypto)

This endpoint generates a quote for converting one cryptocurrency to another.

Endpoint

POST {{baseURL}}/v1/ramp/quote


Headers

HeaderValueRequiredDescription
Content-Typeapplication/jsonYesSpecifies that the request body is JSON.
x-api-keyYOUR_API_KEYYesAPI key for authentication.

Request Body

{
  "source": {
    "amount": 5000,
    "symbol": "POL",
    "blockchain": "MATIC"
  },
  "target": {
    "symbol": "POL",
    "blockchain": "MATIC"
  },
  "feeLevel": {
    "type": "MEDIUM"
  },
  "recipient": {
    "address": "0xa0b86991c6218b36c1d1xxxxxxxxxxxxxxxx"
  }
}
 
### Request Breakdown 
 
 
| **Field**                       | **Type**    | **Description**                                                                  |
|-----------------------------|---------|------------------------------------------------------------------------------|
| `source.amount`             | number  | Amount of the source cryptocurrency to convert                               |
| `source.symbol`             | string  | Symbol of the source cryptocurrency (e.g., `"POL"`)                          |
| `source.blockchain`         | string  | Blockchain network of the source cryptocurrency (e.g., `"MATIC"`)            |
| `target.symbol`             | string  | Symbol of the target cryptocurrency                                          |
| `target.blockchain`         | string  | Blockchain network of the target cryptocurrency                               |
| `feeLevel.type`             | string  | Transaction fee level (`"LOW"`, `"MEDIUM"`, `"HIGH"`)                        |
| `recipient.address`         | string  | Wallet address of the recipient where the crypto will be sent                 |
 
---
 
## Success Response 200 OK
```json
{
  "message": "quote successfully created",
  "status": "success",
  "data": {
    "id": "92da6ea0-79fe-4000-971d-c481ed495a6a",
    "source": {
      "currency": "Polygon",
      "symbol": "POL",
      "addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
      "amount": 0.12,
      "blockchain": "MATIC",
      "type": "CRYPTOCURRENCY"
    },
    "target": {
      "currency": "Polygon",
      "symbol": "POL",
      "addressRegex": "^(0x)[0-9A-Fa-f]{40}$",
      "amount": 0.12,
      "blockchain": "MATIC",
      "type": "CRYPTOCURRENCY"
    },
    "rate": 0.00102300,
    "fees": {
      "symbol": "POL",
      "amount": 0.00,
      "gas": {
        "type": "MEDIUM",
        "amount": 0.01909123
      }
    },
    "rules": [
      {
        "category": "LIMIT",
        "appliedCurrency": "USDC",
        "transaction": {
          "minimum": 10.00,
          "maximum": 2000000.00
        },
        "invoice": 2000000.00
      }
    ],
    "summary": {
      "total": 0.12
    }
  }
}

Response Breakdown

FieldTypeDescription
messagestringStatus message (e.g., "quote successfully created")
statusstringStatus of the request (e.g., "success")
data.idstringUnique identifier of the created quote
data.sourceobjectDetails of the source cryptocurrency
data.source.currencystringName of the source currency (e.g., "Polygon")
data.source.symbolstringSymbol of the source cryptocurrency (e.g., "POL")
data.source.addressRegexstringRegular expression pattern for validating crypto addresses
data.source.amountnumberAmount of source cryptocurrency converted
data.source.blockchainstringBlockchain network (e.g., "MATIC")
data.source.typestringType of the asset ("CRYPTOCURRENCY")
data.targetobjectDetails of the target cryptocurrency
data.target.currencystringName of the target currency (e.g., "Polygon")
data.target.symbolstringSymbol of the target cryptocurrency (e.g., "POL")
data.target.addressRegexstringRegular expression pattern for validating target crypto addresses
data.target.amountnumberAmount of target cryptocurrency received
data.target.blockchainstringBlockchain network of the target currency
data.target.typestringType of the asset ("CRYPTOCURRENCY")
data.ratenumberExchange rate between the source and target currency
data.feesobjectFee breakdown for the transaction
data.fees.symbolstringCurrency symbol for fees
data.fees.amountnumberFee amount charged
data.fees.gasobjectGas fee details
data.fees.gas.typestringGas fee level ("MEDIUM")
data.fees.gas.amountnumberGas fee amount
data.rulesarrayRules that apply to this transaction
data.rules[].categorystringRule category (e.g., "LIMIT")
data.rules[].appliedCurrencystringCurrency to which the rule applies (e.g., "USDC")
data.rules[].transactionobjectTransaction limits
data.rules[].transaction.minimumnumberMinimum amount allowed for the transaction
data.rules[].transaction.maximumnumberMaximum amount allowed for the transaction
data.rules[].invoicenumberMaximum invoice amount
data.summaryobjectSummary of the transaction
data.summary.totalnumberTotal amount of the source currency involved in the transaction

Error Responses

HTTP StatusError CodeMessageDescription
400INVALID_INPUTInvalid request payloadOne or more fields are missing or have invalid values.
401UNAUTHORIZEDMissing or invalid API keyThe x-api-key header is missing or incorrect.
403FORBIDDENAccess deniedThe authenticated user is not allowed to create quotes.
404NOT_FOUNDResource not foundThe requested network or currency does not exist.
500SERVER_ERRORInternal server errorAn unexpected error occurred on the server.