Skip to content

Swap and Trading Pairs

Access prerequisites

  • Permission (module): manageToken
  • License/Feature: MANAGE_TOKENS
  • Menu container: TOKENIZATION → group TokenizationManage Tokens (icons Swap and Trading pairs on the row / in the action bar)

What it is / when to use

This screen covers two distinct settings related to token trading:

  1. Automatic swap — defines which tokens a given token can be directly exchanged for (quick swap, no manual approval). Only available for tokens with Automatic swap (isAutomaticSwap) turned on.
  2. Trading pairs — defines the market pairs of the internal exchange (order book): base/quote pair, minimum/maximum order sizes, price/quantity precision, and pair fee.

Prerequisites

  • Permission: manageToken (dual — CPM enum + module in the DB).
  • License/Feature: MANAGE_TOKENS.
  • For Swap: the token and the pair tokens must have Automatic swap (isAutomaticSwap = true). Tokens without this flag do not appear as an option.
  • For Trading pairs: tokens must be enabled for purchase and for the exchange (buyable, operate_exchange / integrate_book).

Swap Configuration

  1. In Manage Tokens, click the Swap icon on the token's row (only triggers if the token has automatic swap).
  2. The modal lists the available tokens (only those with automatic swap) and the already configured pairs.
  3. Add tokens to form swap pairs or remove existing ones.
  4. Click Save (createOrUpdateSwapPairs).
FieldWhat it isSystem/backend effect
Selected tokenToken whose pairs are being editedTokensPairs.id
Pairs (list)Tokens with which the swap is permittedpairs[] — each item stores the id, name, and image of the pair token

Trading Pairs Configuration

Accessible via the Trading pairs button (route /manage-tokens/trading-pairs, optionally filtered by tokenId). Lists the pairs of the selected token, with actions to create, edit, activate/deactivate, set as default, and delete.

Field (modal)What it isSystem/backend effect
Base tokenBase token of the pairtokenId
Quote tokenQuote token of the pairpairTokenId
EnabledTurns the pair on/off in the bookenabled
DefaultMarks the pair as the token's defaultisDefault (via setDefaultPair)
Display orderPosition of the pair in the listdisplayOrder
Exchange symbolSymbol of the pair at the external providerexchangeSymbol
Minimum / maximum order sizeVolume limits per orderminimumOrderSize / maximumOrderSize
Price / quantity precisionAccepted decimal placespricePrecision / quantityPrecision
Pair fee (%)Fee applied to operations in the pairfeePercentage

Actions and modals

  • Add/remove token in swap: manipulates the local list; only persisted on save.
  • Create / Edit pair: modal with the fields above.
  • Set as default: setDefaultPair.
  • Activate/Deactivate: updateTradingPair({ enabled }).
  • Delete pair: confirms and removes (deleteTradingPair).

Business rules / considerations

Attention

  • Swap and Trading pairs are different mechanisms: swap is a direct token↔token exchange; trading pairs feed the book of the internal exchange.
  • Tokens without Automatic swap cannot form swap pairs — turn the flag on in token editing first.
  • House revenue (book): in the OrderBook, the seller's settlement uses the limit price of the order (order.price), not the execution price. The delta between the limit and execution price is house revenue — take this into account when analyzing order numbers and pair fees.
  • Financial values: order sizes, precision, and fee are handled with precision (BigNumber) — no rounding in configuration.

Examples

Scenario 1 — Enable swap between a stablecoin and two tokens
  1. Ensure that BSCUSDT, UST (Polygon), and BRZ have Automatic swap turned on.
  2. Open the Swap for BSCUSDT.
  3. Add UST and BRZ to the pairs list.
  4. Save. Result: users can exchange BSCUSDT directly for UST or BRZ.
Scenario 2 — Create a default market pair on the internal exchange
  1. Open Trading pairs filtering by the base token (e.g., AXIA).
  2. Create pair: base AXIA, quote USDT, minimumOrderSize = 0.0001, pricePrecision = 2, quantityPrecision = 4, feePercentage = 0.10.
  3. Mark Default and Enabled.
  4. Save. Result: AXIA/USDT becomes the default pair in the book, with the defined fee and limits.