Skip to content

Generate a buy quote.

POST
/api/v1/buy/quote

Generates a quote for a fiat to coin pair.

object
currencyPair
required

The currency pair that is used for the quote.

string
Example
BTC-EUR
paymentMethod
required

The payment method that the user wants to use to make the payment.

string
Example
creditCard
fiatAmount

The amount at which the user wants to buy cryptos.

number
nullable
Example
50
cryptoAmount

The amount of cryptos that the user wants to buy.

number
nullable
fee

The profit in terms of a percentage for this order. If not present or null, your default fee is used. The default fee is also used for DCA and the widgets and can be set by your accountmanager.

number
nullable
Example
1.5

Returns a quote and appropriate data.

object
quote
required

The quote that is generated based on the submitted data.

string
Example
eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEyMzQ1NjcsImV4cCI6MTU1NDU0N
currencyPair
required

The currency pair that is used for the quote.

string
Example
BTCEUR
fiatAmount

The amount that the user will have to pay.

number
Example
50
cryptoAmount

The amount of cryptos that the user will receive.

number
Example
0.5
paymentMethodCost
required

The cost for using the selected payment method.

number
Example
2.5
networkFeeCost
required

The cost for the on-chain network fees.

number
Example
1.5
btcdirectFee
required

The fee charged by BTC Direct in fiat.

number
Example
0.75
btcdirectFeePercentage

The fee charged in percentage by BTC Direct.

number
Example
0.75
partnerFee
required

The fee earned by the partner in fiat.

number
Example
1.00
partnerFeePercentage

The fee earned in percentage by the partner.

number
Example
1.00
totalCost
required

The amount that the user will have to pay.

number
Example
50
singleCoinEstimate
required

The estimated value of a single coin.

number
Example
96779.04
paymentMethod
required

The payment method for the payment.

string
Example
creditCard
expiryDate
required

The date and time when this quote expires.

string
Example
2019-06-06T16:16:16Z
userLimitExceeded
required

Replaced by quoteUnconfirmableReasons.

Whether the user has exceeded their personal limit.

boolean
currencyLimitExceeded
required

Replaced by quoteUnconfirmableReasons.

Whether the currency limit has been exceeded.

boolean
paymentMethodLimitExceeded
required

Replaced by quoteUnconfirmableReasons.

Whether the payment method limit has been exceeded.

boolean
quoteUnconfirmableReasons
required

Reasons why this quote can not be confirmed.

Array<string>
Allowed values: currencyLimitExceeded paymentMethodLimitExceeded paymentMethodDisabled userLimitExceeded userRegistrationNotCompleted userVerificationLevelInvalid
Example
[
"currencyLimitExceeded",
"paymentMethodLimitExceeded",
"paymentMethodDisabled",
"userLimitExceeded",
"userRegistrationNotCompleted"
]
sourceCurrency
One of:
object
code

The currency code.

string
Example
EUR
name

The currency name.

string
Example
Euro
decimals

The precision.

integer
Example
2
caip19
string
""
targetCurrency
One of:
CryptoCurrency

A cryptocurrency representation

object
code
required

The currency code.

string
Example
BTC
name
required

The currency name.

string
Example
Bitcoin
decimals
required

The precision.

integer
Example
8
caip19
string
""
supportsTag
required

Whether the currency supports a memo or a destination tag.

boolean
ticker
required

The currency ticker.

string
Example
BTC
chain
required

The chain through which the currency is delivered.

string
nullable
Example
Solana
smartContractAddress

The token smart contract address

string
nullable
Example
0x514910771af9ca656af840dff83e8264ecf986ca
quote_token
string

A list of possible errors for this endpoint.

object
code
required
string
Allowed values: ER010 ER011 ER012 ER013 ER042 ER043 ER055 ER800 ER801 ER802 ER803 ER805 ER806 ER999
message
required
string
solution
required
string
Example
{
"errors": {
"ER010": {
"code": "ER010",
"message": "Unknown currency pair.",
"solution": "Provide a supported currency pair."
},
"ER011": {
"code": "ER011",
"message": "The provided fiatAmount is invalid.",
"solution": "Provide a valid fiatAmount."
},
"ER012": {
"code": "ER012",
"message": "The provided cryptoAmount is invalid.",
"solution": "Provide a valid cryptoAmount with max 8 decimals."
},
"ER013": {
"code": "ER013",
"message": "Unknown payment method.",
"solution": "Provide a valid payment method."
},
"ER042": {
"code": "ER042",
"message": "Neither fiatAmount nor cryptoAmount is provided.",
"solution": "Provide a fiat amount or a crypto amount."
},
"ER043": {
"code": "ER043",
"message": "Both fiatAmount and cryptoAmount are provided.",
"solution": "Provide a fiat amount or a crypto amount, not both."
},
"ER055": {
"code": "ER055",
"message": "Payment method not available at this time.",
"solution": "Provide another payment method."
},
"ER800": {
"code": "ER800",
"message": "Authorization token is invalid.",
"solution": "Provide a valid authorization token."
},
"ER801": {
"code": "ER801",
"message": "Authorization token has expired.",
"solution": "Request a new authorization token."
},
"ER802": {
"code": "ER802",
"message": "Authorization token not found.",
"solution": "Provide an authorization token."
},
"ER803": {
"code": "ER803",
"message": "Multiple authorization methods used.",
"solution": "Use exactly one authorization method."
},
"ER805": {
"code": "ER805",
"message": "API key is invalid.",
"solution": "Provide a valid API key."
},
"ER806": {
"code": "ER806",
"message": "API key not found.",
"solution": "Provide an API key."
},
"ER999": {
"code": "ER999",
"message": "A general error has occurred. Please contact our support team.",
"solution": "Contact our support team."
}
}
}