# Indicative price request

Request an indicative, non-persisted price. The returned price is a point-in-time estimate and is **not** stored or locked — it carries no `quoteId` and cannot be referenced later.
Use this endpoint for display purposes, transaction previews, or fee breakdowns. For a locked price that can be used to create a ramp transaction, use the `GET /eapi/v0/quote` endpoint instead.
Prices are subject to change based on market volatility and network congestion.

Endpoint: GET /eapi/v0/price
Version: 0 BETA
Security: HMACAuth

## Security:

  - `HMACAuth` (unknown)
    apiKey in header Authorization

## Query parameters:

  - `identityReference` (string, required)
    A unique customer identifier provided by you. This field is required and must be unique for each customer. Please ensure you consistently reuse the same identityReference for repeat interactions with the same customer, allowing us to reliably recognize and associate their identity.

  - `fiat` (string, required)
    The desired fiat

  - `crypto` (string, required)
    The desired crypto

  - `method` (string, required)
    The payment method.

| Available payments |
|-------------|
|debit-credit-card|
|apple-pay|
|sepa-bank-transfer|
|gbp-bank-transfer|
|ach-bank-transfer|
|zar-bank-transfer|
|interac-bank-transfer|
|ideal-bank-transfer|
|google-pay|
|payid-bank-transfer|
|wire-transfer|
|spei|
|pse|
|khipu|
|aud-bank-transfer|
|usd-bank-transfer|
|paypal|
|klarna-paynow|

  - `blockchain` (string, required)
    The chain for the crypto currency e.g. TRON or ETH

  - `transactionType` (string)
    The type of transaction

  - `fiatAmount` (number)
    **Required without cryptoAmount**
The amount in fiat currency to convert.
Amount in fiat minor precision (typically 2 decimals).
This locks the fiat amount; the crypto amount will be computed and rounded to the configured crypto scale.
Note: due to differing decimal scales and rounding rules, converting fiat→crypto and then crypto→fiat may not return the exact original number..

  - `cryptoAmount` (number)
    **Required without fiatAmount**
Amount in crypto precision (token-dependent, e.g., 6–8 decimals).
This locks the crypto amount; the fiat amount will be computed and rounded to the fiat scale.
Note: small differences vs the reverse path are expected from precision/rounding.

## Response 200:

  - `200` (unknown)
    Prices are subject to change due to market volatility and network congestion, therefore it's not recommended to cache this response for longer than 1 minute. Indicative price response. This price is not persisted and cannot be used to create a ramp transaction.

## Response 200 fields (application/json):

  - `identityReference` (string, required)
    A unique customer identifier provided by the partner. This field is required and must be unique for each customer.
**Important**: You must consistently reuse the same identityReference for repeat interactions with the same customer, allowing Banxa to reliably recognize and associate their identity across multiple transactions.
**Format Requirements**:
- Only ASCII letters (a-z, A-Z), digits (0-9), and hyphens (-) are allowed
- Must be between 1 and 255 characters
- Case-sensitive

**Best Practices**:
- Use a consistent format across your system
- Consider using a prefix to identify your organization (e.g., 'partner-customer-123')
- Do not include personally identifiable information (PII) in the reference
- Store the mapping between your internal customer ID and this reference securely
    Example: c-13344

  - `source` (object, required)

  - `source.fiat` (object, required)

  - `source.fiat.id` (string, required)
    The fiat currency.
    Example: AUD

  - `source.fiat.method` (string, required)
    The payment method.
| Available payments |
|  --- |
| debit-credit-card |
| apple-pay |
| sepa-bank-transfer |
| gbp-bank-transfer |
| ach-bank-transfer |
| zar-bank-transfer |
| interac-bank-transfer |
| ideal-bank-transfer |
| google-pay |
| payid-bank-transfer |
| wire-transfer |
| spei |
| pse |
| khipu |
| aud-bank-transfer |
| usd-bank-transfer |
| paypal |
| klarna-paynow |
    Example: payid-bank-transfer

  - `source.amount` (string, required)
    The amount of fiat in.
    Example: 100

  - `target` (object, required)

  - `target.crypto` (object, required)

  - `target.crypto.id` (string, required)
    The crypto token.
    Example: USDT

  - `target.crypto.blockchain` (string, required)
    The blockchain that is associated with the crypto token.
    Example: TRON

  - `target.amount` (string, required)
    The total amount of crypto out.
    Example: 100

  - `processingFee` (string, required)
    The processing fee associated with the price.
    Example: 1.00

  - `networkFee` (string, required)
    The network fee (gas fee) associated with the price.
    Example: 1.00

  - `marketRate` (object, required)
    Current market rates for crypto and forex conversions.
**Purpose**: Provides transparency on the exchange rates used for the quote calculation.
**Components**:
- `crypto`: Map of fiat currencies to crypto market rates
- `forex`: Foreign exchange rates relative to reference currency

  - `marketRate.crypto` (object, required)
    Map of fiat currency codes to crypto market rates.
**Format**: Each property is a fiat currency code, and the value is the amount of that fiat currency equal to 1 unit of the crypto.
**Example**: If crypto is BTC and USD rate is "38497.64", then 1 BTC = 38,497.64 USD
    Example: {"USD":"3849.764255560000038","AUD":"5417.003283998476053"}

  - `marketRate.forex` (object, required)
    Foreign exchange rates relative to the reference currency.
**Format**: Each property (except `reference`) is a quote currency code, and the value is the amount of that currency equal to 1 unit of the reference currency.
**Example**: If reference is USD and AUD is "1.4071000", then 1 USD = 1.4071 AUD
**Usage**: Use these rates to convert between different fiat currencies.
    Example: {"reference":"USD","AUD":"1.4071000","EUR":"0.9234000","GBP":"0.7891000"}

  - `marketRate.forex.reference` (string, required)
    Reference/base currency used for all forex conversion values.
**Common Reference Currencies**: USD, EUR
    Example: USD

  - `marketRate` (object)
    Current market rates for crypto and forex conversions.

  - `marketRate.crypto` (object, required)
    Map of fiat currency codes to crypto market rates.

  - `marketRate.forex` (object, required)
    Foreign exchange rates relative to the reference currency.

  - `marketRate.forex.reference` (string, required)
    Reference/base currency used for all forex conversion values.
    Example: USD

## Response 400:

  - `400` (unknown)
    Bad request due to invalid input.
**Common Causes**:
- Malformed JSON in request body
- Invalid data types
- Missing required fields
- Invalid request structure

## Response 400 fields (application/json):

  - `message` (string)
    Human-readable error message
    Example: Bad Request

  - `code` (integer)
    HTTP status code
    Example: 400

  - `traceId` (string)
    Unique identifier for this error instance. Use this when contacting support.
    Example: 2b6fc5d0-57e4-4b5a-9e3c-6cfbb6d8023f

## Response 401:

  - `401` (unknown)
    Authentication failed or missing credentials.
**Common Causes**:
- Missing Authorization header
- Invalid API key
- Expired or invalid HMAC signature
- Incorrect timestamp (must be within 5 minutes of server time)

## Response 401 fields (application/json):

  - `message` (string)
    Human-readable error message
    Example: Unauthenticated.

  - `code` (integer)
    HTTP status code
    Example: 401

  - `traceId` (string)
    Unique identifier for this error instance
    Example: 2b6fc5d0-57e4-4b5a-9e3c-6cfbb6d8023f

## Response 404:

  - `404` (unknown)
    The requested resource was not found.
**Common Causes**:
- Invalid ramp ID
- Invalid identity reference
- Resource has been deleted
- Incorrect endpoint URL

## Response 404 fields (application/json):

  - `message` (string)
    Human-readable error message
    Example: Not Found

  - `code` (integer)
    Error code (may be HTTP status or custom code)
    Example: 500100

  - `traceId` (string)
    Unique identifier for this error instance
    Example: 2b6fc5d0-57e4-4b5a-9e3c-6cfbb6d8023f

## Response 422:

  - `422` (unknown)
    Validation error - request is well-formed but contains invalid data.
**Common Causes**:
- Field validation failures
- Business rule violations
- Invalid field combinations
- Out of range values

## Response 422 fields (application/json):

  - `message` (string)
    Summary of validation errors
    Example: The given data was invalid.

  - `errors` (object)
    Map of field names to error messages.
**Format**: Each key is a field name, value is an array of error messages for that field.
    Example: {"email":["The email field is required."],"fiatAmount":["The fiat amount must be at least 10."]}

  - `code` (integer)
    HTTP status code
    Example: 422

  - `traceId` (string)
    Unique identifier for this error instance
    Example: 2b6fc5d0-57e4-4b5a-9e3c-6cfbb6d8023f

## Response 500:

  - `500` (unknown)
    Unexpected server error.
**Action**:
- Retry with exponential backoff (up to 3 attempts)
- If error persists, contact support with the traceId

**Note**: This is a temporary issue on our side, not a problem with your request.

## Response 500 fields (application/json):

  - `message` (string)
    Human-readable error message
    Example: Server Error

  - `code` (integer)
    HTTP status code
    Example: 500

  - `traceId` (string)
    Unique identifier for this error instance. **Important**: Include this when contacting support.
    Example: 2b6fc5d0-57e4-4b5a-9e3c-6cfbb6d8023f

## Response 200 examples:

  - `On-ramp quote with fiat amount locked` (unknown)
    Customer wants to spend exactly 100 AUD to buy USDT on TRON

  - `On-ramp quote with crypto amount locked` (unknown)
    Customer wants to receive exactly 100 USDT on TRON

  - `Off-ramp quote with crypto amount locked` (unknown)
    Customer wants to sell exactly 0.01 BTC for AUD

  - `Off-ramp quote with fiat amount locked` (unknown)
    Customer wants to receive exactly 1000 AUD

