Getting Started

Get up and running with the Lirium API

Overview

The Lirium API enables you to embed crypto trading, custody, and fiat on/off-ramps into your platform, with native support for local payment rails across Latin America and Europe. This guide walks you through authentication and your first request.

Base URLs

EnvironmentURL
Productionhttps://api.lirium.com/v1
Sandboxhttps://api.lirium-sandbox.com/v1

Use the Sandbox environment for development and testing. It does not affect live data or interact with blockchain networks.


Quick Start

1. Set Up Authentication

Generate an RSA key pair for JWT authentication:

openssl genrsa -out private.pem 4096
openssl rsa -in private.pem -outform PEM -pubout -out public.pem

Send the contents of public.pem to Lirium. You will receive an API Key in return.

2. Generate a JWT

Create a signed JWT for each API request using your private key and API Key. See JWT Generation for implementation details.

3. Make Your First Request

Include the JWT in the Authorization header:

curl -X GET "https://api.lirium-sandbox.com/v1/partner" \
  -H "Authorization: Bearer <your-jwt>" \
  -H "Content-Type: application/json"

A Concrete Example: Local Fiat Deposit

This is what makes Lirium stand out. Here's the full flow a user goes through to deposit local fiat and receive the local stablecoin — shown here with the Argentina CVU rail, but the same pattern applies to every region we support (LATAM and Europe):

Step 1 — Your backend requests a deposit account for the customer:

POST /customers/{customer_id}/incoming_fiat_instructions
{
  "type": "ar_cvu",
  "currency": "ARS"
}

Step 2 — Lirium returns unique account details for the selected rail:

{
  "id": "fiat-instruction-id",
  "ar_cvu": {
    "cvu": "0000003100098765432101",
    "alias": "customer.lirium.ars"
  }
}

Step 3 — Your app shows the account details to the user. The user transfers fiat from their bank app to that account.

Step 4 — Lirium detects the transfer and automatically credits the local stablecoin to the customer's balance. You receive a webhook notification.

That's it. No polling, no manual reconciliation. The same flow works across every supported region using the corresponding local rail (e.g. CVU, CLABE).

See Fiat Instructions for the complete guide, or the Fiat Deposit Recipe for a step-by-step walkthrough.


Core Concepts

Customers

Customers represent end users in your platform. Each customer requires KYC verification before they can trade. See Customers for details.

Orders

Orders are the primary way to execute trades (buy, sell, swap, send) and manage investments. All orders follow a two-step process:

  1. Create — Initialize the order and receive a quote
  2. Confirm — Finalize the order with a security code

See Orders for implementation details.

Webhooks

Subscribe to real-time events for order updates, customer state changes, and incoming funds. See Webhooks for setup instructions.


Next Steps

Support

For questions not covered in this documentation, contact [email protected].