Skip to main content
Version: v2

Trading Pairs

The Trading Pairs endpoint provides information about all available cryptocurrency trading pair combinations supported by Nexchange.

List Currency Pairs

Retrieve the complete list of supported trading pairs and their properties.

Request

curl -X GET "https://api.n.exchange/en/api/v2/pair/" \
-H "Accept: application/json" \
-H "Authorization: ApiKey api_key"

Parameters: None required

Response

Returns an array of trading pair objects with simplified v2 format.

Response Fields:

FieldTypeDescription
namestringTrading pair identifier (e.g., "BTCUSDC")
tostringCurrency you receive (destination currency)
fromstringCurrency you send (source currency)
disabledbooleanWhether the pair is currently disabled

Example Response:

[
{
"name": "BTCUSDC",
"to": "BTC",
"from": "USDC",
"disabled": false
},
{
"name": "ETHBTC",
"to": "ETH",
"from": "BTC",
"disabled": false
},
{
"name": "ADAETH",
"to": "ADA",
"from": "ETH",
"disabled": true
}
]

Get Currency Pair Details

Retrieve detailed information about a specific trading pair.

Request

curl -X GET "https://api.n.exchange/en/api/v2/pair/BTCUSDC/" \
-H "Accept: application/json" \
-H "Authorization: ApiKey api_key"

Path Parameters:

ParameterTypeRequiredDescription
namestringYesTrading pair name (e.g., BTCUSDC, ETHBTC) or special values

Special Endpoints

In addition to specific pair names, these special values are supported:

  • random - Returns a random active trading pair
  • most_traded - Returns the most traded pair

Get random pair:

curl -X GET "https://api.n.exchange/en/api/v2/pair/random/" \
-H "Accept: application/json" \
-H "Authorization: ApiKey api_key"

Get most traded pair:

curl -X GET "https://api.n.exchange/en/api/v2/pair/most_traded/" \
-H "Accept: application/json" \
-H "Authorization: ApiKey api_key"

Response

Returns detailed information about the specified trading pair.

Specific Pair Example:

{
"name": "BTCUSDC",
"to": "BTC",
"from": "USDC",
"disabled": false
}

Random Pair Example:

{
"name": "ETHLTC",
"to": "ETH",
"from": "LTC",
"disabled": false
}

Most Traded Pair Example:

{
"name": "BTCETH",
"to": "BTC",
"from": "ETH",
"disabled": false
}

Understanding Trading Pairs

Pair Naming Convention

Trading pairs follow the format combining two currency codes:

  • BTCUSDC: Trade USDC for Bitcoin (BTC)
  • ETHBTC: Trade BTC for Ethereum (ETH)
  • ADAETH: Trade ETH for Cardano (ADA)

Trading Direction in v2

In API v2, the direction is clearer with from and to fields:

  • from: Currency you send (what you pay with)
  • to: Currency you receive (what you get)

Pair Status

  • disabled: false: Pair is active and available for trading
  • disabled: true: Pair is temporarily unavailable

Key Changes from v1

Simplified Structure

API v2 removes deprecated fields and uses clearer naming:

Clearer Field Names

  • baseto (currency you receive)
  • quotefrom (currency you send)
  • Removed: fee_ask, fee_bid, test_mode, orderbook_enabled, reverse_orderbook_enabled

Maintains Business Logic

  • Dynamic disabled field calculation (considers last_price_saved)
  • Proper caching behavior
  • Database query optimizations

Error Responses

404 Not Found

Returned when the specified pair name doesn't exist.

Example:

{
"detail": "Not found"
}

417 Expectation Failed

Returned when the random pair endpoint fails to find an active pair after multiple attempts.

Example:

{
"detail": "Exceeded random pair getting attempts."
}

Next Steps

  • Rates - Get pricing for trading pairs
  • Orders - Create trades using pair information
  • Currencies - Learn about individual currencies