#  Market Add/Edit

Market form allows administrators to configure and manage market pairs within the Codono exchange platform. Each field and its usage is detailed below:

## Market Configuration

### General Settings

- **Market Name**: The identifier for the trading pair, cannot be modified , But auto generated.
- **Owned Trading**: Select the quote currency for the trading pair from the dropdown.
  - `USDT`: Tether
  - `BTC`: Bitcoin
  - `ETH`: Ethereum
  - `TRY`: Turkish Lira
  - `EUR`: Euro

### Fee Configuration

- **Fees User**: The user ID designated to receive collected fees from market transactions. Input `0` for no fee collection.
- **Decimal Places**: Define the number of decimal places allowed for the trading pair.
- **BUY fee%**: Percentage fee applied to each buy transaction.
- **Selling fees%**: Percentage fee applied to each sell transaction.

### Price Range

- **Min Buy Price**: The minimum allowable price for buy orders.
- **Max Buy Price**: The maximum allowable price for buy orders.
- **Min Sale Price**: The minimum allowable price for sell orders.
- **Max Sale Price**: The maximum allowable price for sell orders.

### Transaction Limits

- **Min Trx Amt**: The minimum allowable amount per transaction.
- **Single Max Trx Amt**: The maximum allowable amount for a single transaction.

### Referral Bonuses

- **1st Tier Refer Bonus%**: Referral bonus percentage for the first tier.
- **2nd Tier Refer Bonus%**: Referral bonus percentage for the second tier.
- **3rd Tier Refer Bonus%**: Referral bonus percentage for the third tier.
- **Refer Bonus[Buyers]**: Enable or disable referral bonuses for buyers.
- **Refer Bonus[Sellers]**: Enable or disable referral bonuses for sellers.

### Market Data Source

- **Websocket/Ajax**: Determines how the order book and trade logs are updated.
  - `Ajax [No Websocket]`: Updates the order book using AJAX calls.
  - `SelfEngine Websocket`: Uses the SelfEngine websocket for live updates.
  - `Huobi Websocket`: Uses the Huobi websocket service for live updates.
  - `Other [Currently not available]`: Reserved for future use.

### External Integration

- **External Pair**: The identifier of the pair if using an external source, such as `ethusdt` for ETH/USD on Huobi.
- **Market External Price**: Enable or disable the use of external price sources like Binance for price updates.
- **Liquidity**: Choose the source of liquidity for the order book.
- **External Orderbook Markup**: Adds a markup percentage to the external order book prices.
- **Cross Ordering From Binance**: Enable or disable cross-ordering with Binance.
- **Generate Fake orders**: Enable or disable the generation of fake orders for simulation or testing purposes.

### TradingView Charts

- **Charts from TradingView**: Toggle the display of external charts from TradingView.
- **Charts Symbol from TradingView**: The symbol identifier used for TradingView charts, like `BINANCE:BTCUSDT`.

### Self-Engine Orderbook Configuration

- **SelfEngine Orderbook Buy Price**: The price to be used for generating the buy side of the order book.
- **SelfEngine Orderbook Sell Price**: The price to be used for generating the sell side of the order book.
- **SelfEngine Orderbook Max Qty**: Maximum quantity for the SelfEngine generated order book.

### Market Statistics (Autogenerated)

These fields are typically auto-populated with market data and generally do not require manual input.

- **Last Price**: The last traded price in the market.
- **Buy Price**: The current buy price in the market.
- **Sell Price**: The current sell price in the market.
- **Min Price**: The minimum price in the last 24 hours.
- **Max Price**: The maximum price in the last 24 hours.
- **24 Hr Vol**: The total trading volume in the last 24 hours.
- **Change %**: The percentage price change in the last 24 hours.

### Trading Time Configuration

- **Start Trading Time**: Define the start time for trading.
- **End Trading Time**: Define the end time for trading.

### Market Operations

- **Open trading**: Toggle to enable or disable open trading for this pair.
- **Status**: Set the status of the market pair to `Enabled` or `Disabled`.

### Form Submission

- **Submit Button**: Click to save changes.
- **Back Button**: Click to return to the previous page without saving changes.

