/v1/quote

Request a price quote for a crypto transaction.

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

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 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.

Use Cases

1. 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.

2. 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 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

ParameterTypeRequiredDescription
quote_iduuidYesPartner-generated identifier of a specific quote in UUID format.
directionstringYesQuote direction. Allowed values are: buy / sell.
crypto_currencystringYesCrypto asset code.
fiat_currencystringYesFiat currency code (EUR/USD).
requested_currencystringYesBase crypto or fiat currency for quote calculation.
requested_amountstringYesRequested amount with precision 2 for fiat and 8 for crypto.
requested_amount_typestringNoAllowed values are: from / to.
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