# info.description
Version 2 of the Nexchange API provides a cleaner, more declarative interface for partner integrations.

## Key Improvements in v2

- **Declarative field names**: More intuitive naming (e.g., `side` instead of `order_type`)
- **Flat structure**: No nested objects, all fields are at the top level
- **Simplified concepts**: Uses `deposit`/`withdraw` instead of `quote`/`base`, `to`/`from` instead of `base`/`quote`
- **Consistent types**: String values instead of integer codes (e.g., `"BUY"` instead of `0`)
- **Reduced payload**: Removed deprecated and unnecessary fields
- **Full compatibility**: V2 endpoints inherit all business logic from v1 while providing simplified response formats
- **API Key Authentication**: Dedicated API key authentication for automated integrations
- **Currency Object Format**: Support for both string (`"USDTERC"`) and object (`{"code": "USDT", "network": "ETH"}`) currency formats
- **Common Symbol Field**: New `common_symbol` field in currency responses showing external exchange mappings


## Referral Code Validation

Partner integrations pass the referral code value using the **`x-referral-token`** HTTP header (or `?ref=`, session, or optional JSON `referral_code` on supported CeFi flows). There is **no** HTTP header named `referral_code`.

When using API key authentication, any referral code supplied through those mechanisms must belong to the same user that owns the API key.

## Field Mappings from v1 to v2

| v1 Field | v2 Field | Notes |
|----------|----------|-------|
| **Orders** | | |
| `order_type` | `side` | `"BUY"` (crypto) or `"SELL"` (fiat only) |
| `amount_base` | `withdraw_amount` | More descriptive |
| `amount_quote` | `deposit_amount` | More descriptive |
| `pair.base` | `withdraw_currency` | Flattened, currency code only |
| `pair.quote` | `deposit_currency` | Flattened, currency code only |
| `status_name[0][1]` | `status` | Flat string status |
| `payment_window` | `payment_window_minutes` | Clearer units |
| `payment_deadline` | `fixed_rate_deadline` | More descriptive |
| `transactions[].tx_id` | `deposit_transaction`, `withdraw_transaction` | Split by type |
| **Pairs** | | |
| `base` | `to` | Currency you receive |
| `quote` | `from` | Currency you send |
| `fee_ask`, `fee_bid`, `test_mode`, `orderbook_enabled` | _removed_ | Simplified response |
| **Rates** | | |
| `max_receive_amount` | `max_withdraw_amount` | More descriptive |
| `min_receive_amount` | `min_withdraw_amount` | More descriptive |
| `allowed_historic_price_*`, `max_amount`, `min_amount` | _removed_ | Deprecated fields |
| **Currencies** | | |
| _new field_ | `common_symbol` | External exchange currency mapping (e.g., Binance symbol) |
| **Pre-screening** | | |
| `amount_quote` | `deposit_amount` | More descriptive |
| `amount_base` | `withdraw_amount` | More descriptive |
| `detail` | `status`, `message` | Split into structured response |

# paths./currency/.get.description
Retrieve a list of all available currencies with v2 simplified format

# paths./currency/.get.responses.200.description
Successful response with list of currencies

# paths./currency/{code}/.get.description
Retrieve detailed information about a specific currency

# paths./network/.get.description
Retrieve a list of all available currency networks with v2 simplified format

# paths./network/.get.responses.200.description
Successful response with list of networks

# paths./network/{name}/.get.description
Retrieve detailed information about a specific currency network

# paths./network/{name}/.get.parameters[].description
Network name (e.g., Bitcoin, Ethereum, Tron, Binance Smart Chain)

# paths./orders/.get.description
Retrieve a list of orders with v2 field format.

Pagination: Cursor-based.
- Use the `cursor` parameter to navigate (value taken from `pagination.next` or `pagination.previous`).
- `page_size` controls page length (default 25, maximum 100).

# paths./orders/.get.parameters[].description
Cursor for pagination. Use the value from `pagination.next` or `pagination.previous`.

# paths./orders/.get.parameters[].description
Number of orders per page (1-100, default 25).

# paths./orders/.get.parameters[].description
Order status filter (integer status code).

# paths./orders/.get.responses.200.content.application/json.examples.PaginatedCeFiOrders(200).summary
First page of CeFi orders — has-next true. Note: this endpoint queries the ``Order`` table only; DeFi orders appear via the retrieve fallback (``GET /v2/orders/{ref}/``), not in the list.

# paths./orders/.post.description
Create a new order using v2 simplified format.

**Currency Format Support:** This endpoint supports three currency formats:
- String format: `"USDTERC"` (backward compatible)
- Object format with code: `{"code": "USDT", "network": "ETH"}`
- Object format with contract_address: `{"contract_address": "0x...", "network": "ETH"}` (recommended for tokens; resolves to the specific token on the given chain)

Because `deposit_currency` / `withdraw_currency` accept either a string or an object, the request schema is rendered as a generic JSON object in drf-spectacular; the documented polymorphism is illustrated via the request examples below.

**DeFi Orders:** Send `is_defi: true` to create a DeFi order. Optional `is_fixed_rate: true` enables fixed-rate DeFi, `is_limit_order: true` + `limit_receive_amount` enables limit orders. DeFi orders enforce a minimum deposit of at least $20 USD equivalent.

**Referral Code Validation:** With API key authentication, any referral code supplied (via `x-referral-token` header, `?ref=` parameter, body `referral_code`, or session) must belong to the same user that owns the API key. The header name is `x-referral-token`, not `referral_code`.

# paths./orders/.post.parameters[].description
Partner referral code value. Header name is `x-referral-token` (there is no `referral_code` header). Same value may be sent via `?ref=` or optional body `referral_code` on non-DeFi flows.

# paths./orders/.post.requestBody.content.application/json.examples.OrderWithCurrencyObjectFormat.summary
Order using currency object format (code + network)

# paths./orders/.post.requestBody.content.application/json.examples.OrderWithContractAddress.summary
Order using contract address format (recommended for tokens)

# paths./orders/.post.requestBody.content.application/json.examples.OrderWithReferralCode.summary
Order with referral code (API key required)

# paths./orders/.post.responses.200.content.application/json.examples.IdempotentReuse(200).summary
Server returned an existing matching order rather than creating a new one

# paths./orders/.post.responses.200.description
Existing matching order returned (idempotent reuse).

# paths./orders/.post.responses.201.content.application/json.examples.SuccessfulCeFiOrderCreation(201).summary
CeFi order created — issued unique_reference + deposit_address

# paths./orders/.post.responses.201.content.application/json.examples.SuccessfulDeFiOrderCreation(201).summary
DeFi order created — bridge deposit_address allocated

# paths./orders/{unique_reference}/.get.description
Retrieve detailed information about a specific order.

This endpoint returns both regular and DeFi orders in v2 format. DeFi orders include `is_defi: true`, `is_fixed_rate`, `is_limit_order`, `limit_min_received`, and `limit_expires_at` (for limit orders) in the response.

# paths./orders/{unique_reference}/.get.parameters[].description
Unique reference identifier for the order

# paths./orders/{unique_reference}/.get.responses.200.content.application/json.examples.CeFiOrderDetail(200).summary
Completed CeFi order with amount_usd notional

# paths./orders/{unique_reference}/.get.responses.200.content.application/json.examples.DeFiLimit-orderDetail(200).summary
DeFi limit order in flight — limit_min_received + limit_expires_at present; no amount_usd; no is_defi key (transform doesn't emit it)

# paths./orders/{unique_reference}/.patch.description
Update specific fields of an order. Available updates:
- Set withdraw address (only once, before processing)
- Mark order as paid (for manual confirmation)
- Provide deposit transaction ID

**Referral Code Validation:** With API key authentication, any referral code supplied (via `x-referral-token`, `?ref=`, body `referral_code`, or session) must belong to the same user that owns the API key.

# paths./orders/{unique_reference}/.patch.parameters[].description
Unique reference identifier for the order

# paths./orders/{unique_reference}/.patch.requestBody.content.application/json.examples.SetWithdrawAddress.summary
One-shot: assign withdraw address before processing

# paths./orders/{unique_reference}/.patch.responses.200.content.application/json.examples.PATCHResponse(200).summary
Updated order returned in v2 (base) shape

# paths./pair/.get.description
Retrieve a list of all available trading pairs with v2 simplified format.

## Key Changes from v1
- Field `base` renamed to `to` (currency you receive)
- Field `quote` renamed to `from` (currency you send)
- Removed fields: `fee_ask`, `fee_bid`, `test_mode`, `orderbook_enabled`, `reverse_orderbook_enabled`
- Maintains all v1 business logic including:
  - Dynamic disabled field calculation (considers `last_price_saved`)
  - Proper caching behavior
  - Database query optimizations

# paths./pair/.get.responses.200.description
Successful response with list of currency pairs

# paths./pair/{name}/.get.description
Retrieve detailed information about a specific currency pair.

## Special Endpoints

In addition to regular pair names, the following special values are supported:
- `random` - Returns a random active trading pair
- `most_traded` - Returns the most traded pair (overall or user-specific if authenticated)

## Key Changes from v1
- Field `base` renamed to `to` (currency you receive)
- Field `quote` renamed to `from` (currency you send)
- Removed fields: `fee_ask`, `fee_bid`, `test_mode`, `orderbook_enabled`, `reverse_orderbook_enabled`
- Maintains all v1 business logic including dynamic disabled field calculation

# paths./pair/{name}/.get.parameters[].description
Currency pair name (e.g., BTCUSDC, ETHBTC) or special values: `random` for a random active pair, `most_traded` for the most traded pair.

# paths./pair/{name}/.get.responses.200.description
Currency pair details retrieved successfully

# paths./pre_screening/.post.description
Validate user data (IP, sender address, withdraw address, pair, and amounts) to determine eligibility for order creation. This endpoint performs risk assessment and compliance checks before an order is created.

## Key Changes from v1
- Field `amount_quote` renamed to `deposit_amount`
- Field `amount_base` renamed to `withdraw_amount`
- Response format changed to include `status` and `message` fields
- Maintains all v1 business logic for risk assessment and compliance

## Requirements
- Requires a trusted referral token header for access
- Either `deposit_amount` or `withdraw_amount` can be provided, but not both
- All fields are optional, but providing more details enables full pre-screening

# paths./pre_screening/.post.parameters[].description
Trusted referral token for identification and access.

# paths./pre_screening/.post.responses.200.content.application/json.examples.PartialPre-screeningPassed.value.message
Partial pre-screening passed. Provide all details for full pre-screen validation.

# paths./pre_screening/.post.responses.200.content.application/json.examples.Pre-screeningFailed(200).value.message
The country of the user's IP is blocked.

# paths./pre_screening/.post.responses.200.description
Pre-screening completed (success, partial success, or failed).

# paths./pre_screening/.post.responses.400.content.application/json.examples.InvalidRequestData.value.message
Only one of deposit_amount or withdraw_amount can be provided

# paths./pre_screening/.post.responses.401.content.application/json.examples.AuthenticatedButUntrustedReferralCode.summary
Authenticated but untrusted referral code

# paths./pre_screening/.post.responses.401.content.application/json.examples.NoAuthenticationProvided.value.detail
Authentication credentials were not provided.

# paths./pre_screening/.post.responses.404.description
Endpoint not found (missing referral token or configuration issue).

# paths./rate/.get.description
Retrieve current exchange rates and trading information for currency pairs. This is the v2 version of the former `/info/bulk/` endpoint with simplified response format.

## Key Changes from v1
- Endpoint renamed from `/info/bulk/` to `/rate/`
- Field `max_receive_amount` renamed to `max_withdraw_amount`
- Field `min_receive_amount` renamed to `min_withdraw_amount`
- Removed deprecated fields: `allowed_historic_price_variance`, `allowed_historic_price_age`, `max_amount`, `min_amount`
- Maintains all complex pricing logic and referral code support from v1

## DeFi Rates
- Set `is_defi=true` to fetch DeFi pricing data and DeFi-specific limits.
- `is_fixed_rate=true` requests fixed-rate quotes: for DeFi this enables RFQ-based pricing; for CeFi it signals fixed-rate order intent (a `rate_id` is included in the response).
- `is_floating_rate=true` (CeFi only) requests floating-rate pricing: no `rate_id` is returned and no price lock is stored. The order will be created at the live rate at creation time.
- `is_fixed_rate` and `is_floating_rate` are mutually exclusive.
- For referral-scoped fixed quotes, provide `x-referral-token`.
- When `rate_id` is present in the response, pass it when creating an order to bind order validation to that quoted snapshot.

## Contract Address Support
This endpoint supports querying rates using contract addresses for token identification:
- Use `from`/`to` + `from_network`/`to_network` for currency codes
- Use `from_contract_address`/`to_contract_address` + `from_network`/`to_network` for tokens
- Contract addresses are automatically resolved to currency codes internally
- Cannot use both `pairs` parameter and individual currency parameters together

# paths./rate/.get.parameters[].description
DeFi fixed-rate only. Defaults to false. When true on a single-pair same-chain request, the API performs actionable quoting. When false or omitted, same-chain fixed-rate rows stay non-actionable (indicative), even for single-pair requests.

# paths./rate/.get.parameters[].description
Optional deposit amount in the `from` currency. When provided for CeFi rates, the single returned item includes `withdraw_amount` computed through the same order-pricing path used during order creation. For same-chain DeFi fixed-rate requests, this amount drives actionable JIT quoting on single-pair requests only when `actionable_quote=true`; without that flag the same-chain result remains indicative. Requires exactly one pair in the `pairs` parameter (omit or multiple pairs return 400 for CeFi previews).

# paths./rate/.get.parameters[].description
Currency code for the source currency (what you send). Required if using individual currency parameters.

# paths./rate/.get.parameters[].description
Contract address for the source token. Requires `from_network`. If provided with a valid address, resolves to that specific token. If omitted or set to an empty string, resolves to the network's main currency.

# paths./rate/.get.parameters[].description
Network code for the source currency. Required when using `from_contract_address`.

# paths./rate/.get.parameters[].description
When true, each row includes an `eta_seconds` field: the estimated swap completion time for the pair (dynamic for CeFi, a fixed estimate for DeFi). Off by default so existing responses are unchanged.

# paths./rate/.get.parameters[].description
When true, returns DeFi pricing data and DeFi-specific limits. Must be true for the DeFi order flow.

# paths./rate/.get.parameters[].description
Request fixed-rate pricing. For CeFi (default flow): signals intent to create a fixed-rate order. The response includes a `rate_id` (same as the default behavior). For DeFi (`is_defi=true`): enables RFQ-based fixed-rate quotes; same-chain EVM rows are indicative by default (non-actionable) — use a single-pair request (`pairs=<pair>`) and preferably pass `deposit_amount` for an actionable quote. Mutually exclusive with `is_floating_rate`.

# paths./rate/.get.parameters[].description
Request floating-rate pricing (CeFi only; ignored for DeFi). When true, `rate_id` and `expiration_time_unix` are omitted from every response row and no promised rate is stored. Orders created from this response use the live rate at order-creation time. For referral codes that allow both rate types, use this flag to explicitly select floating-rate behavior. Mutually exclusive with `is_fixed_rate`.

# paths./rate/.get.parameters[].description
Dynamic referral fee rate **in basis points** (integer, e.g. `markup=50` = 0.5% = 0.005). Preferred V2 spelling. Custom capability: not available for all partners. The referral code must have dynamic referral fee enabled by prior agreement with Nexchange and only accepted when that flag is on for the code in `x-referral-token`. Mutually exclusive with the legacy `referral_rate` query param — supplying both returns 400.

# paths./rate/.get.parameters[].description
Comma-separated list of pair names to filter results (e.g., "BTCUSDC,ETHBTC"). Cannot be used together with individual currency parameters.

# paths./rate/.get.parameters[].description
**Deprecated** — prefer `markup` (basis-point integer). Dynamic referral fee rate as a decimal fraction (e.g. `0.005` = 0.5% = 50 BPS). Custom capability: not available for all partners. The referral code must have dynamic referral fee enabled by prior agreement with Nexchange. Only accepted when that flag is on for the code in `x-referral-token`.

# paths./rate/.get.parameters[].description
Currency code for the target currency (what you receive). Required if using individual currency parameters.

# paths./rate/.get.parameters[].description
Contract address for the target token. Requires `to_network`. If provided with a valid address, resolves to that specific token. If omitted or set to an empty string, resolves to the network's main currency.

# paths./rate/.get.parameters[].description
Network code for the target currency. Required when using `to_contract_address`.

# paths./rate/.get.parameters[].description
Optional IP validation. When true, validates the client IP address using the same validation logic as order creation. Returns 400 if IP validation fails.

# paths./rate/.get.responses.200.description
Successful response with current exchange rates

# components.schemas.CurrencyV2.description
Currency object in v2 format with simplified, flat fields

# components.schemas.CurrencyV2.properties.code.description
Currency code (ISO standard for fiat, ticker symbol for crypto)

# components.schemas.CurrencyV2.properties.min_confirmations.description
Minimum confirmations required for this currency (null for fiat)

# components.schemas.CurrencyV2.properties.is_fiat.description
Whether this is a fiat currency (inverse of is_crypto from v1)

# components.schemas.CurrencyV2.properties.contract_address.description
Smart contract address for tokens (null for native currencies)

# components.schemas.CurrencyV2.properties.withdrawal_fee.description
Fee charged for withdrawals in this currency

# components.schemas.CurrencyV2.properties.extra_id.description
Type of extra ID required (memo, destination_tag, etc.)

# components.schemas.CurrencyV2.properties.network.description
Network name for this currency (flat string, not nested object)

# components.schemas.CurrencyV2.properties.decimals.description
Number of decimal places for this currency

# components.schemas.CurrencyV2.properties.common_symbol.description
Common symbol for this currency from external mappings (e.g., Binance). Returns the external currency code if mapping exists, or the currency code itself otherwise.

# components.schemas.Error.description
``{detail?, errors?}`` — canonical v2 error body.

Mirrors the partner v2 ``Error`` schema in
``static/docs/swagger_v2.yaml``. Both keys optional: a response
body may include ``detail`` and/or ``errors``. ``detail`` typically
carries a view-level message and ``errors`` typically carries
per-field validation messages keyed by field name, but the partner
spec's examples show both keys together, and DRF's
``ValidationError`` can produce a mix as well — so both fields are
declared as optional rather than mutually exclusive.

# components.schemas.Error.properties.errors.description
Per-field validation errors keyed by field name.

# components.schemas.NetworkV2.description
Currency network object in v2 format with simplified fields

# components.schemas.NetworkV2.properties.native_currency.description
Currency code (ticker symbol) of the network's main currency, or `null` when the network has no main currency configured.

# components.schemas.OrderV2.description
Order object in v2 format with flat, declarative fields. For DeFi
orders, ``is_defi`` is true and ``side`` is always ``"BUY"``.

# components.schemas.OrderV2.properties.side.description
Order side. BUY for crypto orders; SELL only for fiat orders. DeFi orders are always BUY.

# components.schemas.OrderV2.properties.is_fixed_rate.description
Whether this order uses a fixed rate (DeFi RFQ mode)

# components.schemas.OrderV2.properties.is_limit_order.description
Whether this DeFi order is a limit order

# components.schemas.OrderV2.properties.limit_expires_at.description
Expiration timestamp for DeFi limit orders.

# components.schemas.OrderV2.properties.limit_min_received.description
Limit-order minimum receive amount sent to NC-Bridge, in destination smallest units as a string integer.

# components.schemas.OrderV2.properties.deposit_currency.description
Currency code for the deposit (what you send to us)

# components.schemas.OrderV2.properties.withdraw_currency.description
Currency code for the withdrawal (what we send to you)

# components.schemas.OrderV2.properties.withdraw_address.description
Address where withdrawal will be sent. Valid blockchain address for the withdrawal currency's blockchain.

# components.schemas.OrderV2.properties.withdraw_address_extra_id.description
Extra ID for withdraw address (memo, destination tag, etc.)

# components.schemas.OrderV2.properties.deposit_address.description
Address where deposit should be sent. Valid blockchain address for the deposit currency's blockchain.

# components.schemas.OrderV2.properties.deposit_address_extra_id.description
Extra ID for deposit address (memo, destination tag, etc.)

# components.schemas.OrderV2.properties.refund_address.description
Address for refunds if needed. Valid blockchain address for the deposit currency's blockchain.

# components.schemas.OrderV2.properties.refund_address_extra_id.description
Extra ID for refund address and refund transactions (memo, destination tag, etc.)

# components.schemas.OrderV2.properties.applied_referral_rate.description
Dynamic referral fee **applied** to this order (decimal, e.g. "0.005") after any partner cap / 50-50 excess split. Only emitted when a dynamic rate was requested.

# components.schemas.OrderV2Create.description
Request body for creating a new order in v2 format

# components.schemas.OrderV2Create.properties.side.description
Order side. "BUY" for crypto orders; "SELL" only for fiat orders. DeFi orders are always BUY.

* `BUY` - BUY
* `SELL` - SELL

# components.schemas.OrderV2Create.properties.withdraw_amount.description
Amount to withdraw. Required for non-DeFi orders when `deposit_amount` is not provided. Optional for DeFi floating/fixed orders.

# components.schemas.OrderV2Create.properties.deposit_amount.description
Amount to deposit. Required for non-DeFi orders when `withdraw_amount` is not provided. Optional for DeFi floating/fixed orders.

# components.schemas.OrderV2Create.properties.deposit_currency.oneOf[].description
Currency object with contract_address + network. Null/empty contract_address resolves to the network's main currency.

# components.schemas.OrderV2Create.properties.deposit_currency.description
Currency for deposit. Supports three formats: - String format: `"USDTERC"` (traditional, backward compatible). - Object format with code: `{"code": "USDT", "network": "ETH"}`. - Object format with contract_address: `{"contract_address": "0x...", "network": "ETH"}`.

# components.schemas.OrderV2Create.properties.withdraw_currency.oneOf[].description
Currency object with contract_address + network. Null/empty contract_address resolves to the network's main currency.

# components.schemas.OrderV2Create.properties.withdraw_currency.description
Currency for withdrawal. Supports three formats: - String format: `"BTC"` (traditional, backward compatible). - Object format with code: `{"code": "BTC", "network": "BTC"}`. - Object format with contract_address: `{"contract_address": "0x...", "network": "ETH"}`.

# components.schemas.OrderV2Create.properties.withdraw_address.description
Address where withdrawal should be sent (required). Must be a non-empty string; blank or whitespace-only values are rejected.

# components.schemas.OrderV2Create.properties.withdraw_address_extra_id.description
Extra ID for withdraw address (memo, destination tag, etc.) - optional

# components.schemas.OrderV2Create.properties.refund_address.description
Address for refunds (optional for regular orders). Must be a valid blockchain address for the deposit currency's blockchain.

# components.schemas.OrderV2Create.properties.refund_address_extra_id.description
Extra ID for refund address and refund transactions (memo, destination tag, etc.) - optional

# components.schemas.OrderV2Create.properties.is_defi.description
When true, this request is processed as a DeFi order. Requires DeFi-enabled pair/currencies.

# components.schemas.OrderV2Create.properties.is_fixed_rate.description
DeFi-only option. Used only when `is_defi` is true. When true, creates a fixed-rate DeFi order (RFQ mode) when available.

# components.schemas.OrderV2Create.properties.is_limit_order.description
DeFi-only option. When true, creates a DeFi limit order and requires `limit_receive_amount`. Must not be combined with `is_fixed_rate`.

# components.schemas.OrderV2Create.properties.limit_receive_amount.description
DeFi limit-order target receive amount in human-readable destination-token units. Converted to smallest units for NC-Bridge.

# components.schemas.OrderV2Create.properties.limit_ttl.description
Optional DeFi limit-order TTL in seconds. Omitted or non-positive uses backend default. Positive values must meet the minimum TTL the backend enforces.

# components.schemas.OrderV2Create.properties.rate_id.description
Optional quote identifier from `GET /rate/` (`rate_id` in the same row). Use the `rate_id` from the same quote row when creating orders to bind validation to that quote snapshot.

# components.schemas.OrderV2Create.properties.markup.description
Dynamic referral fee rate **in basis points** (integer, e.g. `50` = 0.5% = 0.005). Preferred V2 spelling. **Custom:** enabled only on referral codes agreed with Nexchange ahead of time. Mutually exclusive with the legacy `referral_rate` field — supplying both returns 400.

# components.schemas.OrderV2Create.properties.referral_rate.description
**Deprecated** — prefer `markup` (basis-point integer). Dynamic referral fee rate as a decimal fraction (e.g. "0.005" = 0.5% = 50 BPS). **Custom:** enabled only on referral codes agreed with Nexchange ahead of time.

# components.schemas.OrderV2Create.properties.referral_code.description
Referral code for the order (optional, CeFi flows). **Important:** When using API key authentication, this referral code must belong to the same user that owns the API key.

# components.schemas.OrderV2Detail.description
Detailed order information. Includes every field of `OrderV2` plus `amount_usd` (USD equivalent value, CeFi orders only).

# components.schemas.OrderV2Update.properties.withdraw_address.description
Address where withdrawal should be sent. Must be a valid blockchain address for the withdrawal currency's blockchain.

# components.schemas.OrderV2Update.properties.withdraw_address_extra_id.description
Extra ID for withdraw address (memo, destination tag, etc.) - optional

# components.schemas.OrderV2Update.properties.marked_as_paid.description
Mark order as paid (true) or cancel payment (false)

# components.schemas.OrderV2Update.properties.referral_code.description
Referral code for the order (optional). **Important:** When using API key authentication, this referral code must belong to the same user that owns the API key.

# components.schemas.PairV2.description
Currency pair object in v2 format with simplified, flat fields

# components.schemas.PairV2.properties.name.description
Pair name combining the two currencies (e.g., BTCUSDC)

# components.schemas.PairV2.properties.to.description
Currency code for the target currency (what you receive)

# components.schemas.PairV2.properties.from.description
Currency code for the source currency (what you send)

# components.schemas.PairV2.properties.disabled.description
Whether this trading pair is currently disabled

# components.schemas.PreScreeningV2Request.description
Request body for pre-screening compliance checks in v2 format

# components.schemas.PreScreeningV2Request.properties.ip.description
User's IP address for geolocation and risk assessment

# components.schemas.PreScreeningV2Request.properties.sender_address.description
Cryptocurrency sender address for compliance checking. Must be a valid blockchain address for the deposit currency's blockchain.

# components.schemas.PreScreeningV2Request.properties.withdraw_address.description
User's withdraw address for risk validation. Must be a valid blockchain address for the withdrawal currency's blockchain.

# components.schemas.PreScreeningV2Request.properties.pair.description
Trading pair name (e.g., BTCUSDC, ETHBTC)

# components.schemas.PreScreeningV2Request.properties.deposit_amount.description
Deposit amount (renamed from amount_quote) - cannot be used with withdraw_amount

# components.schemas.PreScreeningV2Request.properties.withdraw_amount.description
Withdraw amount (renamed from amount_base) - cannot be used with deposit_amount

# components.schemas.PreScreeningV2Response.properties.status.description
* `success` - success
* `failed` - failed
* `error` - error
* `unauthorized` - unauthorized

# components.schemas.PreScreeningV2Response.properties.message.description
Detailed message about the pre-screening result

# components.schemas.PreScreeningV2Response.description
Response from pre-screening endpoint with status and message

# components.schemas.RateV2.description
Exchange rate information in v2 format with simplified fields

# components.schemas.RateV2.properties.withdrawal_fee.description
Estimated combined fixed fees for the trade, in the currency you receive (`to`). Includes the receive-side network withdrawal and the deposit-side fee expressed in that same unit.

# components.schemas.RateV2.properties.rate.description
Exchange rate for the pair (marked-up ask). Does not include fixed receive-side network withdrawal or deposit-side fees; see `withdrawal_fee` for that estimate.

# components.schemas.RateV2.properties.rate_id.description
Unique identifier for this rate quote row. Pass the `rate_id` from the same row when creating an order to bind validation to the quote snapshot. Absent when `is_floating_rate=true` was requested.

# components.schemas.RateV2.properties.max_withdraw_amount.description
Maximum amount that can be withdrawn (renamed from max_receive_amount).

# components.schemas.RateV2.properties.min_withdraw_amount.description
Minimum amount that can be withdrawn (renamed from min_receive_amount).

# components.schemas.RateV2.properties.expiration_time_unix.description
Unix timestamp when this rate expires. Absent when is_floating_rate=true.

# components.schemas.RateV2.properties.applied_referral_rate.description
Dynamic referral fee applied to this rate row after any partner cap split (decimal, e.g. '0.005'). Present only when a dynamic referral fee was applied; omitted otherwise.

# components.schemas.RateV2.properties.withdraw_amount.description
Optional preview of amount to receive for the provided `deposit_amount`. Present only when `deposit_amount` query parameter is provided with exactly one pair.

# components.schemas.RateV2.properties.eta_seconds.description
Estimated swap completion time (seconds) for the pair. CeFi quotes use the typical (median) completion time of recent orders on the same deposit/withdraw network pair; DeFi quotes (`is_defi=true`) return a fixed estimate. Present only when `include_eta=true`; `null` for CeFi when no estimate is available.

# components.securitySchemes.ApiKeyAuth.description
API key authentication. Provide the key in the ``Authorization`` header as ``ApiKey <key>``.

# components.securitySchemes.ReferralToken.description
Trusted referral token used to attribute orders / rate quotes to a referral code. Header name is ``x-referral-token``.

# tags[].description
DeFi order flow using the standard v2 order endpoints.

To create a DeFi order, send `is_defi: true` in the `POST /orders/` request body.
DeFi orders use non-custodial on-chain bridging and support both floating and fixed-rate modes.

**Rates:** Use `GET /rate/?is_defi=true` (optionally with `is_fixed_rate=true`) to fetch DeFi-specific pricing and limits before creating an order.
Use the `rate_id` from the same rate row when creating orders to bind validation to that quote snapshot.

**Refund address:** Required for non-EVM destination chains (currently Solana, Tron, Bitcoin).