Skip to content

Get Prices

Request

Get prices for all available payment methods or for a single payment method. Note that this endpoint should only be called when a user requests prices by providing the cryptocurrency, fiat and ideally amounts and payment method. This endpoint is for dynamic quotations and not to retrieve a list of static prices that can be cached. As a result, the endpoint is rate limited.

Security
sec0
Query
sourcestringrequired

Source fiat or cryptocurrency code e.g. 'USD' for buy and 'BTC' for sell

targetstringrequired

Target fiat or cryptocurrency code e.g. 'BTC' for buy and 'USD' for sell

source_amountnumber, (float)

Amount of the source fiat or cryptocurrency that will be used to calculate the target amount. Both source_amount and target_amount should not be sent.

target_amountnumber, (float)

Amount of the target fiat or cryptocurrency that will be used to calculate the source_amount. Both source_amount and target_amount should not be sent.

payment_method_idinteger, (int32)

Unique ID for the payment method that you want to get prices for.

account_referencestring

Unique customer reference provided by you.

blockchainstring

The blockchain that prices will be retrieved for. If this is not passed, then the default blockchain that has been configured for you will be used.

Default:"TRON"
discount_codestring

(Beta) A code that can be passed to change your commission rate on this order. Please contact your account manager for code setup.

Default:"VIP"
Headers
Acceptstring
Default:"application/json"
X-Request-Idstring

This is the correlation ID related to the request.

curl -i -X GET \
  'https://docs.banxa.com/_mock/products/legacy-api/openapi/api/prices?source=string&target=string&source_amount=0.1&target_amount=0.1&payment_method_id=0&account_reference=string&blockchain=TRON&discount_code=VIP' \
  -H 'Accept: application/json' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'X-Request-Id: string'

Responses

200

Bodyapplication/json
Response
"{\n \"data\": {\n \"spot_price\": \"0.92\",\n \"prices\": [\n {\n \"payment_method_id\": 1,\n \"type\": \"FIAT_TO_CRYPTO\",\n \"spot_price_fee\": \"0.02\",\n \"spot_price_including_fee\": \"0.94\",\n \"coin_amount\": \"104.43000000\",\n \"coin_code\": \"USDT\",\n \"fiat_amount\": \"100.30\",\n \"fiat_code\": \"EUR\",\n \"fee_amount\": \"1.96\",\n \"network_fee\": \"0.00\n },\n {\n \"payment_method_id\": 2,\n \"type\": \"FIAT_TO_CRYPTO\",\n \"spot_price_fee\": \"0.00\",\n \"spot_price_including_fee\": \"0.95\",\n \"coin_amount\": \"105.17000000\",\n \"coin_code\": \"USDT\",\n \"fiat_amount\": \"100.30\",\n \"fiat_code\": \"EUR\",\n \"fee_amount\": \"0.00\",\n \"network_fee\": \"0.00\"\n }\n }\n }\n ]\n …"