/v1/quote

Creates a quote for a crypto payout and returns its price and expiration time.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

Overview

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 buy for Payouts (Send Crypto).
    • Use sell for 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 the fiat_currency or crypto_currency value.
  • requested_amount_type: Defaults to from. If to is passed, fees are calculated on top of the fiat_money.

Payouts (direction: 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.

Pay-ins (direction: 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

POST /v1/quote

ParameterTypeLocationRequiredDescription
AuthorizationstringHeaderYesYour API key.
X-Request-SignaturestringHeaderYesSignature of the request body. See Signing Requests.
quote_iduuidBodyYesPartner-generated identifier of a specific quote in UUID format.
directionstringBodyYesQuote direction. Allowed values are: buy / sell.
crypto_currencystringBodyYesCrypto asset code.
fiat_currencystringBodyYesFiat currency code (EUR/USD).
requested_currencystringBodyYesBase crypto or fiat currency for quote calculation.
requested_amountstringBodyYesRequested amount with precision 2 for fiat and 8 for crypto.
requested_amount_typestringBodyNoAllowed values are: from / to.

Request example

{
  "quote_id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
  "direction": "sell",
  "crypto_currency": "BTC",
  "fiat_currency": "USD",
  "requested_currency": "BTC",
  "requested_amount": "0.12345678",
  "requested_amount_type": "from"
}

Response

FieldTypeDescription
statusstringRequest status.
result.quote_idstringIdentifies a specific quote.
result.digital_moneyobjectCrypto side of the quote: amount and currency.
result.fiat_moneyobjectFiat side of the quote: amount and currency.
result.timestring (date-time)Quote creation timestamp.
result.expirationstring (date-time)Quote expiration timestamp. Execute before this time.
result.fees.network_feeobjectBlockchain network fee: amount and currency.
result.fees.service_feeobjectPaybis service fee. Includes the partner fee, which is listed separately under breakdown for information only. Do not add breakdown amounts on top of this value.
result.fees.service_fee.
breakdown.partner_fee
objectPartner fee in fiat currency. Always present; 0.00 when the partner has no commission configured.
result.fees.total_feeobjectTotal fee: amount and currency.
result.fees.fee_discountobject or nullFee discount, if any.
result.
exchange_rate_fiat_to_crypto
objectExchange rate for the pair: from, to, rate.
result.
exchange_rate_crypto_to_fiat
objectExchange rate for the pair: from, to, rate.
result.
fiat_equivalent
object or nullFiat equivalent of the quote, when available. null otherwise.
Body Params
uuid
required

Partner-generated identifier of a specific quote in UUID format.

string
required

Crypto asset code.

string
required

Fiat currency code.

string
required

Base crypto or fiat currency for quote calculation, see request examples.

string
required

Requested amount with precision 2 for fiat and 8 for crypto.

string | null
required

Allowed values are: from / to

string
enum

Quote direction. Allowed values are: buy / sell.

Allowed:
Headers
string
required

Base64 encoded string, containing request body, encrypted with the sha512 algorithm using RSA 4096 bit public key

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json