curl --request POST \
--url https://api-test.paiera.com/v1/swap/quote/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"source_currency": "USDT",
"destination_currency": "USD",
"source_amount": "100.000000"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"quote_id": "swap_quote_example_001",
"status": "LOCKED",
"quote_mode": "SOURCE",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00",
"exchange_rate": "1"
}
}
FX
Create Swap Quote
Quote a currency conversion.
curl --request POST \
--url https://api-test.paiera.com/v1/swap/quote/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"source_currency": "USDT",
"destination_currency": "USD",
"source_amount": "100.000000"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"quote_id": "swap_quote_example_001",
"status": "LOCKED",
"quote_mode": "SOURCE",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00",
"exchange_rate": "1"
}
}
Exactly one amount is required. The system derives
See Error codes and Webhooks.
SOURCE/DESTINATION quote mode; do not submit quote_mode. Source and destination currencies must differ and satisfy product/merchant configuration. Fiat amounts use two decimal places and stablecoins six; fee, amount-limit and total-debit balance checks still apply.
Body Parameters
string(16)
required
Current currency enum and business configuration
Source currency
string(16)
required
Same currency rules; source and destination must differ
Destination currency
string
Exactly one amount
Source amountUp to 30 characters; positive; up to 12 integer digits; fiat 2/stablecoin 6 decimal places.
string
Exactly one amount
Destination amount
Response
The standard response envelope contains an object indata. See Swap quote for all item fields. Check success and code even on HTTP 200.
string
Business result code. Use this value for programmatic handling.
string
Result description; do not parse the message to classify failures.
string
Included when tracing context exists.
integer
Response time as Unix epoch milliseconds.
boolean
Whether the operation succeeded; check this even on HTTP 200.
object
Endpoint-specific business data; optional fields depend on state and availability.
Show Response fields
Show Response fields
string(64)
Quote ID. Query input limit: 64 characters.
string
Quote status.
LOCKED/USED/EXPIRED.string(16)
Quote amount mode.
SOURCE/DESTINATION.string(64)
Consuming swap order ID. After an order uses the quote.
string
Quote use time. 19 / 24. After quote use.
string
Quote creation time. 19 / 24.
string
Quote update time. 19 / 24.
string(16)
Source currency. Currency code.
string
Source amount. Fiat 2/stablecoin 6 decimal places.
string(16)
Destination currency. Currency code.
string
Destination amount. Fiat 2/stablecoin 6 decimal places.
string
Fee amount. Fee-currency precision.
string(16)
Fee currency. Currency code.
string
Total debit amount. Source-currency precision.
string
Customer exchange rate. Up to 6 decimal places; HALF_UP rounding; trailing zeros removed.
string
Quote expiry. 19 / 24. When quote expiry exists.
curl --request POST \
--url https://api-test.paiera.com/v1/swap/quote/create \
--header 'Authorization: Basic YOUR_BASE64_CREDENTIALS' \
--header 'Content-Type: application/json' \
--data '{
"source_currency": "USDT",
"destination_currency": "USD",
"source_amount": "100.000000"
}'
{
"code": "success",
"message": "success",
"timestamp": 1793145600000,
"success": true,
"data": {
"quote_id": "swap_quote_example_001",
"status": "LOCKED",
"quote_mode": "SOURCE",
"source_currency": "USDT",
"source_amount": "100.000000",
"destination_currency": "USD",
"destination_amount": "100.00",
"exchange_rate": "1"
}
}
