API Documentation
Offramps API
Offramps API
  • Guides
    • Getting Started
  • API Reference
    • Authentication
    • Agreements
      • Agreements#Show
    • Users
      • Users#Create
      • Users#Show
      • Users#Index
    • KYC Sessions
      • KYC#Create
    • Payment Details
      • PaymentDetails#Create
      • PaymentDetails#Index
      • PaymentDetails#Show
      • PaymentDetails#Validate
      • PaymentDetails#Deactivate
      • Rail Availability
      • Required Fields For Local Currency Payouts
      • Required Fields For Swift Currency Payouts
    • Quotes
      • How to make a payment
      • Quotes#Create
      • Quotes#Show
      • Quotes#Execute
      • Quote#Rate
    • Offramps
      • Offramps#Index
      • Offramps#Create
      • Offramps#Update
      • Offramps#Show
      • Limitations
    • Webhooks
      • KYC Webhook
      • Offramp Webhook
      • Payment Detail Webhook
      • Webhook Signatures
    • Errors
    • Conversions
      • Conversions#Create
  • Sandbox Only
    • Sandbox Special Moves
Powered by GitBook
On this page
  • Instantiate a Conversion Object
  • Create Conversion
  1. API Reference
  2. Conversions

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.

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"
        }
}

PreviousConversionsNextSandbox Special Moves

Last updated 3 months ago

The currency the recipient will receive. For offramps the available currencies can be found .

here