Conversions#Create

Instantiate a Conversion Object

Conversion Example Request

curl https://{{v1_base_url}}/conversions
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-type: application/json" \
-d '{
    "conversion": {
        "input_currency": "usdc",
        "input_amount": 1000,
        "output_currency": "eur",
        "output_amount": null,
        "mode": "sending",
    }
}'

Endpoint Information

Create Conversion

POST https://{{v1_base_url}}/conversions

Request Body

Name
Type
Description

input_currency

String

The currency the sender will send. For offramps the available input currencies are usdt or usdc. For onramps the available input currencies are usd or eur

output_currency

String

input_amount

Float

The sending amount

output_amount

Float

The receiving amount

mode

String

The two available modes are sending and receiving. When the mode is sending the input amount will be used to calculate the received amount. When the mode is receiving, the output amount will be used to calculate the sending amount.

{
    "conversion": {
        "exchange_rate": { 'usd_eur' => 0.914386 },
        "fees": 8.687,
        "input_currency": "usdc",
        "output_currency": "eur",
        "input_amount": 1000.0,
        "output_amount": 906,
        "mode": "sending"
        }
}