Auction System Development on 1C-Bitrix

Developing an Auction System on 1C-Bitrix We develop auction systems on 1C-Bitrix with full integration into the trade catalog. The standard `catalog` and `sale` modules do not contain ready-made trading logic—we build it from scratch, ensuring data integrity during simultaneous bids, real-time u

Our competencies:

Frequently Asked Questions

Developing an Auction System on 1C-Bitrix

We develop auction systems on 1C-Bitrix with full integration into the trade catalog. The standard catalog and sale modules do not contain ready-made trading logic—we build it from scratch, ensuring data integrity during simultaneous bids, real-time updates, and automatic order creation. Our team has 10+ years of Bitrix development experience and has implemented auction systems for platforms with loads of up to 10,000 concurrent users.

An auction on a website is a non-trivial task: the price of a product is determined by buyer competition within a limited time. Errors in bid logic or update delays lead to financial losses. We solve these problems at the architecture level, choosing the optimal balance between performance and complexity. For example, for one project with 5000+ simultaneous lots, we used a combination of polling and aggressive caching—this reduced the database load by 40%.

Why is an auction on Bitrix a complex task?

Bitrix does not have built-in mechanisms for managing auctions. Development requires:

  • Custom tables for storing bids and states
  • Transactional logic to avoid race conditions
  • Real-time or quasi-real-time interface updates
  • Integration with 1C for synchronizing balances and prices
  • Anti-fraud rules to protect against manipulation

Each item is a separate challenge. For example, with simultaneous bids from two users, without row locking in the database, both could become winners. We solve this through SELECT FOR UPDATE.

Types of Auctions

Before development, it is important to fix the business requirements by auction type:

Type Description Features
English (open) Bids increase, the highest wins Most common
Dutch (reverse) Price decreases, the first to agree wins Requires a price drop timer
Auto-bid The user sets a maximum, the system bids automatically Complex logic
Buy Now Auction + fixed price for instant purchase Parallel sales channel

How do we implement bid reception?

Accepting a new bid is a critical section. Several users may bid simultaneously. Without locks, race conditions will occur.

function placeBid(int $auctionId, int $userId, float $amount): BidResult { // Начало транзакции с блокировкой строки аукциона $connection = \Bitrix\Main\Application::getConnection(); $connection->startTransaction(); try { // SELECT FOR UPDATE — блокируем строку $auction = $connection->query( "SELECT * FROM b_local_auction WHERE ID = {$auctionId} FOR UPDATE" )->fetch(); // Валидации if ($auction['STATUS'] !== 'ACTIVE') { throw new \Exception('Аукцион не активен'); } if (new DateTime() > new DateTime($auction['END_TIME'])) { throw new \Exception('Аукцион завершён'); } if ($amount < $auction['CURRENT_PRICE'] + $auction['MIN_STEP']) { throw new \Exception('Ставка ниже минимальной: ' . ($auction['CURRENT_PRICE'] + $auction['MIN_STEP'])); } if ($auction['CURRENT_WINNER_ID'] === $userId) { throw new \Exception('Вы уже лидируете'); } // Записать ставку AuctionBidTable::add([ 'AUCTION_ID' => $auctionId, 'USER_ID' => $userId, 'AMOUNT' => $amount, 'CREATED_AT' => new DateTime(), ]); // Обновить текущую ставку AuctionTable::update($auctionId, [ 'CURRENT_PRICE' => $amount, 'CURRENT_WINNER_ID' => $userId, 'BIDS_COUNT' => $auction['BIDS_COUNT'] + 1, ]); // Продление времени при ставке в последние минуты if ((new DateTime($auction['END_TIME']))->getTimestamp() - time() < 300) { AuctionTable::update($auctionId, [ 'END_TIME' => (new DateTime())->modify('+5 minutes'), ]); } $connection->commitTransaction(); // Уведомить предыдущего лидера notifyOutbid($auction['CURRENT_WINNER_ID'], $auctionId, $amount); } catch (\Exception $e) { $connection->rollbackTransaction(); throw $e; } } 

How do we ensure real-time updates on Bitrix?

An auction requires displaying the current bid without reloading the page. Three approaches:

Polling—the simplest: JavaScript makes an AJAX request every 5–10 seconds. Polling is 5–10 times simpler to implement than WebSocket and suits 95% of auctions.

setInterval(() => { fetch('/local/ajax/auction_state.php?id=' + auctionId) .then(r => r.json()) .then(data => updateUI(data)); }, 5000); 

Server-Sent Events (SSE)—the server sends events itself on change. Less load than polling, but more complex to set up on typical hosting.

WebSocket—maximally real-time, but requires a separate server (Node.js, Ratchet). On Bitrix hosting may be unavailable.

For most auctions, polling with an interval of 5–10 seconds is a sufficient solution.

Example of cache configuration for auction Cache tagged based on lot ID: `BX_COMPONENT:auctionState.{$auctionId}`. Each bid clears only the cache of that lot. Cache time is 3 seconds to reduce load. This allows handling up to 1000 simultaneous requests without degradation.

How does anti-fraud work?

Check for one user from different accounts: analysis of IP, cookies, action history. Optional: phone verification or prepayment (blocking the amount) for accessing the auction. The minimum account must be registered at least 7 days ago and have at least one completed order.

What is included in turnkey auction development?

We provide a full package:

  1. Data structure design (tables, indexes, relationships)
  2. Implementation of bid logic with transactions and anti-fraud
  3. User interface (lot page, bid form, timer, current status)
  4. Real-time updates (polling/SSE/WebSocket as agreed)
  5. Automatic auction completion, winner notifications, order creation
  6. Integration with 1C via CommerceML (synchronization of balances, prices, orders)
  7. Architecture and API documentation
  8. Administrator training on working with auctions
  9. 30-day warranty support after delivery

Estimated timelines

Option Scope Timeline
Basic auction English, bidding, timer, polling 8–10 days
Extended Auto-bid, Buy Now, notifications 12–16 days
Full platform Multiple types, WebSocket, analytics, anti-fraud 20–30 days

The cost is calculated individually and depends on complexity. We will evaluate your project for free. Contact us to discuss the details.

Review the official documentation of 1C-Bitrix to understand the platform’s capabilities. Get a consultation on your project—we will tell you how to implement an auction considering your business rules.