Quote Ramp (Send Based)
curl --request POST \
--url https://testapi.kravata.co/api/rampcalculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountSent": 1000,
"clientId": "{{clientId}}",
"network": "ERC20",
"rampType": "off_ramp",
"symbolTypeReceived": "COP",
"symbolTypeSent": "USDC"
}
'import requests
url = "https://testapi.kravata.co/api/rampcalculate"
payload = {
"amountSent": 1000,
"clientId": "{{clientId}}",
"network": "ERC20",
"rampType": "off_ramp",
"symbolTypeReceived": "COP",
"symbolTypeSent": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountSent: 1000,
clientId: '{{clientId}}',
network: 'ERC20',
rampType: 'off_ramp',
symbolTypeReceived: 'COP',
symbolTypeSent: 'USDC'
})
};
fetch('https://testapi.kravata.co/api/rampcalculate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Ramp Orders
Quote Ramp (Send Based)
POST /api/rampcalculate
By consuming this endpoint you can calculate the ramp details by providing the desired parameters. The response body will show the calculated ramp details based on them.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| amountSent | float | Yes | This is the amount you will operate and send. |
| rampType | string | Yes | The type of order/ ramp you will create (“on_ramp”: if you have Fiat and want to receive Stable Coin; “off_ramp”: if you have Stable Coin and want to receive Fiat). |
| symbolTypeSent | string | Yes | The symbol of the token/fiat you will send us (COP, MXN, USD, USDC, USDT). |
| symbolTypeReceived | string | Yes | The symbol of the token/fiat we will send you (COP, MXN, USD, USDC, USDT, COPM). |
| network | string | Yes | The network used for the transaction (e.g. POLYGON, ERC20, TRC20, SOLANA, CELO). Please, make sure it is the correct corresponding network to your registered wallet, before placing your order. |
| clientId | string | Yes | Include your assigned ID, obtainable through the Get infoClient endpoint. |
Response
The response for this request is a JSON object representing the quote.
| Field | Description |
|---|---|
| amountSent | This is the amount you will operate and send to us. |
| amountToReceive | This is the amount that we will send and you will receive as a result of your operation. |
| costInfra | This is the infrastructure use cost applied to your transaction in FIAT. This is Kravata’s earning for providing the services you are using, and delivering the best experience possible with them. It will be calculated based on the amount sent. |
| rateClient | This is the rate used for calculating the amount to receive and the infrastructure use cost. |
| symbolTypeSent | The symbol of the token/fiat you will send us (COP, MXN, USD, USDC, USDT). |
| symbolTypeReceived | The symbol of the token/fiat we will send you (COP, MXN, USD, USDC, USDT, COPM). |
| withdrawalFee | Withdrawal costs related to the transaction. |
| rampType | The type of order/ ramp you will create (“on_ramp”: if you have Fiat and want to receive Stable Coin; “off_ramp”: if you have Stable Coin and want to receive Fiat). |
| validUntil | This is your quote’s validity period. Time is expressed in UTC. |
The response also includes quoteId. Send it when creating the ramp to lock this quote; it can be used only once and only until validUntil (30 seconds by default). Fields whose value is zero are omitted from the response.
POST
/
api
/
rampcalculate
Quote Ramp (Send Based)
curl --request POST \
--url https://testapi.kravata.co/api/rampcalculate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amountSent": 1000,
"clientId": "{{clientId}}",
"network": "ERC20",
"rampType": "off_ramp",
"symbolTypeReceived": "COP",
"symbolTypeSent": "USDC"
}
'import requests
url = "https://testapi.kravata.co/api/rampcalculate"
payload = {
"amountSent": 1000,
"clientId": "{{clientId}}",
"network": "ERC20",
"rampType": "off_ramp",
"symbolTypeReceived": "COP",
"symbolTypeSent": "USDC"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amountSent: 1000,
clientId: '{{clientId}}',
network: 'ERC20',
rampType: 'off_ramp',
symbolTypeReceived: 'COP',
symbolTypeSent: 'USDC'
})
};
fetch('https://testapi.kravata.co/api/rampcalculate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
