Request a price quote for a crypto transaction.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Quote Method
Requests a price quote for a planned transaction. Returns the exchange rate, estimated fees, and expected output amount based on the provided input parameters. Use this endpoint to show users the cost breakdown and expected outcome before they confirm a transaction.
This method allows for the request of a quote that locks in the exchange rate for a provided currency pair. It supports two directions:
- Buy (Payouts): Fiat-to-Crypto. You pay Fiat from your balance to send Crypto to a user.
- Sell (Pay-ins): Crypto-to-Fiat. A user sends Crypto to you, which is converted to Fiat and credited to your balance.
You can create a quote based on either the fiat amount or the crypto amount. The resulting quote is valid for a specified period, enabling the transaction to be executed at the locked-in exchange rate.
Important Notes
direction: This field determines the operation type.
- Use
buyfor Payouts (Send Crypto).- Use
sellfor Pay-ins (Receive Crypto).fiat_currency: Currently only accepts "EUR" or "USD". Other values will cause an error.requested_currency: Determines the base currency for calculation. It must match either thefiat_currencyorcrypto_currencyvalue.requested_amount_type: Defaults tofrom. Iftois passed, fees are calculated on top of thefiat_money.
Use Cases
1. Payouts (Direction: buy)
buy)Used when sending funds to a user.
-
Fiat-Based Quotes: If you create a quote with a fiat amount (e.g., "USD 100"), this exact amount will be deducted from your prefunding balance. The user will receive the corresponding amount of cryptocurrency, minus any applicable fees.
- Example: A customer wants to withdraw 1000.00 EUR from their platform balance in Bitcoin. You create a quote for 1000.00 EUR. Paybis calculates the equivalent BTC to send to the user.
-
Crypto-Based Quotes: If you create a quote with a crypto amount (e.g., "BTC 0.01"), the user will receive this exact amount. The corresponding fiat value, plus fees, will be deducted from your prefunding balance.
- Example: You want to pay a vendor exactly 0.01 BTC. You create a quote for 0.01 BTC. Paybis calculates the total EUR cost to deduct from your balance.
2. Pay-ins (Direction: sell)
sell)Used when receiving funds from a user.
-
Fiat-Based Quotes: You specify the exact fiat amount you wish to receive into your ledger (e.g., "EUR 100"). The system calculates the required crypto amount the user must send to settle this value.
- Example: A user wants to top up their account by exactly 100 EUR. You request a quote for 100 EUR. Paybis tells you exactly how much ETH the user must deposit.
-
Crypto-Based Quotes: You specify the exact crypto amount the user intends to deposit (e.g., "BTC 0.05"). The system calculates the estimated fiat amount that will be credited to your ledger after conversion.
- Example: A user has 0.05 BTC and wants to deposit it all. You request a quote for 0.05 BTC. Paybis shows you the EUR value that will be credited to your balance upon receipt.
Request Example
{
// Unique identifier for the quote (UUID format)
"quote_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
// Quote direction: 'buy' for Payouts, 'sell' for Pay-ins
"direction": "sell",
// Cryptocurrency code (e.g. BTC, USDT-TRC20)
"crypto_currency": "BTC",
// Fiat currency code (USD or EUR)
"fiat_currency": "USD",
// Base currency for calculation (BTC in this case)
"requested_currency": "BTC",
// Requested amount (8 decimal places for crypto)
"requested_amount": "0.12345678"
}Body Params
| Parameter | Type | Required | Description |
|---|---|---|---|
quote_id | uuid | Yes | Partner-generated identifier of a specific quote in UUID format. |
direction | string | Yes | Quote direction. Allowed values are: buy / sell. |
crypto_currency | string | Yes | Crypto asset code. |
fiat_currency | string | Yes | Fiat currency code (EUR/USD). |
requested_currency | string | Yes | Base crypto or fiat currency for quote calculation. |
requested_amount | string | Yes | Requested amount with precision 2 for fiat and 8 for crypto. |
requested_amount_type | string | No | Allowed values are: from / to. |