Soroush Neyestani

Software Engineer

Application Architect

Enterprise Application Developer

Technical Author & Educator

Telegram-First Melted Gold Trading & Margin Platform

Live Market Data · BUY/SELL Positions · Wallet · Margin Risk · Internal Matching · Settlement

Telegram Trading Bot + Web Operations Console for Melted-Gold Transactions

Project positioning

This project was a Telegram-first melted-gold trading platform supported by a web-based operations and administration console.

Users did not need to depend on continuously refreshing a website to follow the market or execute their actions. They could interact directly through Telegram, receive the current market quotation, open BUY or SELL positions according to their available wallet balance, monitor their trading state, and settle positions through the same ecosystem.

The system consumed an externally supplied market-data API from TGJU for live gold quotations (مظنه) and used that price stream as the market reference for opening and valuing positions.

The platform also implemented:

  • per-user wallets,
  • available and locked balances,
  • BUY / SELL positions,
  • profit/loss calculations,
  • margin monitoring,
  • configurable margin thresholds,
  • margin warnings,
  • margin calls,
  • account/trading lock conditions,
  • multiple settlement models,
  • manual and automatic settlement,
  • daily / weekly / monthly settlement schedules,
  • internal BUY/SELL quantity matching,
  • Telegram-based trading interaction,
  • and a web-based administrative / accounting console.

The correct portfolio framing is therefore:

A Telegram-first OTC-style melted-gold trading platform with live external market data, internal BUY/SELL matching, wallet accounting, margin-risk controls, and configurable settlement workflows.

It should not be represented as a regulated securities exchange or as an institutional stock exchange unless that legal/organizational status is separately documented.


Classification

  • Project Type: Trading / FinTech Platform
  • Asset Domain: Melted Gold
  • Primary Interaction Channel: Telegram Bot
  • Administrative Channel: Web Operations Console
  • Market Data: External TGJU API
  • Pricing Basis: Live market quotation / مظنه
  • Trading Direction: BUY / SELL
  • Wallet Model: Available Balance + Locked Balance
  • Risk Model: Margin Monitoring / Margin Call
  • Settlement Models: Manual, Automatic, Scheduled, Periodic
  • Matching Capability: Internal BUY/SELL quantity matching / netting
  • Accounting: Wallets, deposits, settlements, commissions / trading state
  • Historical Stack Visible in Evidence: PHP 7.3.x, React, jQuery, DataTables, Select2, Bootstrap 4 beta, Apache, Font Awesome, jQuery Sparklines
  • Portfolio Relevance: Very High
  • Suggested CV Relevance: Tier A — FinTech / Trading Workflow / Stateful Web Systems / Telegram Integration

Website Card

Title:
Telegram-First Melted Gold Trading & Margin Platform

Subtitle:
Live Market Data · BUY/SELL · Wallet · Margin · Matching · Settlement

One-line Description:
Built a Telegram-first melted-gold trading platform using live TGJU market quotations, per-user wallets, BUY/SELL positions, configurable margin controls, internal position matching, and multiple automatic/manual settlement workflows, supported by a web operations console.

Categories:

  • FinTech
  • Trading Platform
  • Telegram Bot
  • Market Data API
  • Digital Wallet
  • Margin Risk
  • Matching
  • Settlement
  • PHP
  • React
  • AJAX
  • Accounting

Concept Tags:
TGJU · Telegram Bot · BUY/SELL · Gold Trading · Wallet · Margin Call · Position · Settlement · Matching · PHP · React


Executive Summary

The project evolved from an earlier configurable trading-room concept into a more specialized platform focused on melted-gold trading.

The system received current market quotations from a licensed external market-data API and exposed that information to users through Telegram.

A user could:

Register
   ↓
View Current Market Price
   ↓
Check Wallet
   ↓
Open BUY / SELL Position
   ↓
Monitor P/L
   ↓
Monitor Margin State
   ↓
Settle Position

At the same time, the web control panel allowed operational users to manage:

Traders
Spectators
Trades
Wallets
Deposits
Margin State
Margin Warnings
Margin Calls
Settlement
User Groups

Core Architecture

                 TGJU Market Data API
                         ↓
                  Live Market Quote
                         ↓
                   Trading Backend
                   /             \
                  /               \
         Telegram Bot         Web Console
            ↓                    ↓
         Traders             Operations
            ↓                    ↓
     BUY / SELL Positions     Monitoring
            ↓                    ↓
          Wallet  ←────────→ Accounting
            ↓
      Margin Evaluation
            ↓
     Matching / Settlement

Telegram-First Product Strategy

The most distinctive product decision was that Telegram was not treated merely as a notification channel.

It was a primary trading interface.

For users who were uncomfortable with:

  • refreshing websites,
  • waiting for pages to update,
  • worrying whether a browser page had refreshed correctly,

Telegram offered a faster and simpler interaction model.

Conceptually:

Telegram
   ↓
Get Price
   ↓
Check Wallet
   ↓
BUY / SELL
   ↓
View Position
   ↓
Settle

Why Telegram-First Mattered

The trading audience was already active in social platforms.

Instead of forcing users into a separate trading website, the application met them in the environment they were already using.

This is a strong example of channel-first product design.


Web Application Role

The web application served primarily as an operational and administrative console.

It supported functions such as:

  • trader management,
  • spectator management,
  • transaction monitoring,
  • wallet/accounting management,
  • margin monitoring,
  • margin warnings,
  • margin-call handling,
  • settlement controls,
  • deposit slip management,
  • user grouping.

This made the web interface more of an Operations Console than the primary end-user trading interface.


Market Data Integration

The customer had acquired access to a TGJU API.

The system consumed that API to retrieve current market quotations.

The quote was used as the reference market price for trading operations.

Conceptually:

TGJU API
   ↓
Current Gold Quote
   ↓
Trading Backend
   ↓
User Position

External Data Ownership Boundary

Safe portfolio wording:

Integrated a licensed external TGJU market-data API to ingest live melted-gold quotations used by the trading workflow.

Do not imply ownership of the TGJU data source.


Market Quote (مظنه)

The project used the live quotation as the basis for opening and evaluating positions.

When a user opened a position:

Current Market Quote
        ↓
Stored as Entry Price
        ↓
Position Created

BUY / SELL Positions

Users could open both:

BUY

and:

SELL

positions.

A conceptual position model:

Position
├── User
├── Direction: BUY / SELL
├── Entry Price
├── Current Price
├── Quantity
├── Open Time
├── Profit / Loss
├── Margin State
├── Settlement Method
└── Status

The user confirmed that the system tracked all of these categories in practical trading logic.


Position Lifecycle

Position Created
      ↓
OPEN
      ↓
Market Price Changes
      ↓
P/L Recalculated
      ↓
Margin Recalculated
      ↓
Settlement Condition
      ↓
SETTLED / CLOSED

Current Price

The position's current valuation was based on the latest market quotation from the external API.

Conceptually:

Entry Price
Current Market Price
Direction
Quantity
      ↓
Profit / Loss

Profit / Loss

For a BUY position:

Market rises
→ positive P/L

Market falls
→ negative P/L

For a SELL position:

Market falls
→ positive P/L

Market rises
→ negative P/L

The exact historical formula/precision should be documented from source code if recovered.


Wallet

Each user had an individual wallet.

The wallet maintained more than one balance state.

Conceptually:

Wallet
├── Current Balance
├── Available Balance
├── Locked Balance
├── Open Exposure
├── Profit / Loss
└── Settlement State

Available Balance

This represented the amount still available for new trading activity.


Locked Balance

When funds were committed to open trading positions, the system could move the relevant amount into a locked state.

Conceptually:

Available Balance
      ↓
Open Position
      ↓
Locked Balance

This reduced the risk of treating the same funds as available for multiple simultaneous positions.


Wallet State Transition

Deposit
   ↓
Available Balance
   ↓
Open Position
   ↓
Locked Amount
   ↓
Position Settled
   ↓
P/L Applied
   ↓
Wallet Reconciled

Margin Management

The platform included a dedicated margin-risk layer.

This was not only a visual indicator.

The system used margin state to control whether the account could continue trading.


Margin Configuration

Two configuration models were supported:

Percentage-Based

Management could define the maximum tolerated loss relative to the user's initial balance.

Example concept:

Initial Balance
      ↓
Current Equity
      ↓
Loss %
      ↓
Configured Threshold

Absolute Amount

Instead of a percentage, a specific monetary threshold could be configured.


Manual and Automatic Margin Rules

The system supported:

Manual Configuration
Automatic Configuration

This allowed risk policy to be controlled either explicitly or through predefined rules.


Margin Monitoring Flow

Initial Balance
      ↓
Current Balance / Equity
      ↓
Open Positions
      ↓
Current P/L
      ↓
Margin Threshold
      ↓
Warning
      ↓
Margin Call
      ↓
Trading Restricted / Account Locked

Loss Tolerance

The system tolerated losses up to a configured threshold.

If the user's effective account value fell back to a defined percentage of the original balance, the system could stop further trading and lock the account.

This is an important risk-control rule.


Margin Warning

The web console had dedicated margin warning functions.

The purpose was to identify users approaching the configured risk limit.


Margin Call

If the configured threshold was reached:

Threshold Reached
       ↓
Margin Call
       ↓
Trading Restricted
       ↓
Account / Position Control

The exact historical liquidation behavior should be documented separately if source code is available.


Account Locking

The user confirmed that the platform could effectively prevent further trading and lock the account when risk thresholds were exceeded.

This is stronger than a passive warning system.


Internal BUY/SELL Matching

A major capability clarified later was that the system could match opposing BUY and SELL quantities internally.

Example:

100 BUY
100 SELL
   ↓
Matched
   ↓
Settlement

This means the platform was not merely storing independent positions.

It could offset compatible opposing trading exposure.


Matching Concept

Conceptually:

Outstanding BUY Quantity
          +
Outstanding SELL Quantity
          ↓
     Matching Layer
          ↓
Matched Quantity
          ↓
Settlement / Netting

Quantity Matching Example

Given:

BUY  = 100
SELL = 100

then:

Matched = 100
Residual BUY = 0
Residual SELL = 0

Partial Matching

A robust matching model can also handle:

BUY  = 100
SELL = 60

resulting conceptually in:

Matched = 60
Remaining BUY = 40
Remaining SELL = 0

Whether the historical engine handled partial matching exactly this way should be confirmed from source code if needed, but the user's confirmed description supports quantity-based matching of opposing sides.


Matching vs Regulated Exchange

The existence of matching logic does not by itself mean the platform should be described as a regulated exchange.

The accurate wording is:

Internal BUY/SELL quantity matching and settlement

or:

Internal position matching / netting layer

This preserves technical strength without overstating legal or institutional status.


Matching Engine Scope

A safe model:

BUY Positions
     \
      > Internal Matching / Netting → Settlement
     /
SELL Positions

Do not claim:

  • price-time priority,
  • institutional order book,
  • exchange-grade matching protocol,
  • high-frequency execution,

unless specifically documented.


Settlement Engine

The system supported multiple settlement models.

This is one of the most substantial parts of the project.


Settlement Types

Confirmed settlement modes included:

  • user-initiated settlement,
  • manual settlement by administrator,
  • automatic settlement,
  • settlement at a configured time,
  • daily settlement,
  • weekly settlement,
  • monthly settlement,
  • margin-related settlement.

Settlement Lifecycle

Open Position
      ↓
Settlement Condition
      ↓
Price / P&L Calculation
      ↓
Matching / Netting if applicable
      ↓
Wallet Adjustment
      ↓
Position Closed

Scheduled Settlement

The web console included a settlement-time function.

This allowed operations to define when certain trading activities should be settled.


Daily Settlement

Trading Day
   ↓
Settlement Time
   ↓
Eligible Positions
   ↓
Settlement

Weekly Settlement

Weekly Cycle
   ↓
Scheduled Settlement
   ↓
Wallet Reconciliation

Monthly Settlement

Monthly Cycle
   ↓
Scheduled Settlement
   ↓
Position / Wallet Reconciliation

Manual Settlement

Operations staff could force or execute settlement manually through the web panel.

This provided an administrative override path.


Automatic Settlement

The system could also settle positions according to configured rules without requiring manual intervention.


Margin-Driven Settlement

When risk limits were reached, margin-related rules could trigger or force settlement behavior.


Settlement as a Domain Service

A modern architecture should isolate settlement logic into a dedicated service:

SettlementService

Responsibilities:

  • determine eligible positions,
  • calculate current value,
  • apply matching/netting,
  • calculate P/L,
  • update wallets,
  • close positions,
  • write audit records.

Matching + Settlement Relationship

Conceptually:

BUY / SELL Positions
        ↓
Matching
        ↓
Matched Exposure
        ↓
Settlement
        ↓
Wallet Reconciliation

This is one of the core domain flows of the platform.


Accounting

The administrative panel included accounting functions.

Visible areas included:

  • deposit receipts,
  • trader wallets.

This connects trading activity directly to account management.


Deposit Flow

Conceptually:

Deposit Request / Receipt
      ↓
Accounting Review
      ↓
Wallet Credit

The exact historical approval workflow should be documented only where preserved.


Wallet Accounting

A user wallet served as the financial base for:

  • opening positions,
  • locking funds,
  • settling trades,
  • applying profit/loss,
  • applying commissions.

Commission

The earlier trading architecture and wallet screens included commission-related values.

A modern trading transaction model should represent commission explicitly.

Conceptually:

Gross Result
   ↓
Commission
   ↓
Net Result

The exact historical formula should not be invented.


Trader vs Spectator

The web menu visibly distinguished:

Traders
Spectators

This suggests different participation roles.

A spectator could observe without the same trading capability as an active trader.

Exact permissions should be preserved from original source if available.


User Groups

The platform also supported user grouping.

This could be useful for:

  • different operational categories,
  • different risk rules,
  • different access policies.

Do not infer historical group rules beyond the confirmed presence of grouping functionality.


Web Operations Console

The web application functioned as the central operations interface.

Main domains visible from the historical UI include:

Transactions
Margin
Settlement
User Groups
Spectators
Traders
Accounting
Wallets
Deposits

Historical Web Stack

The screenshot preserves useful historical technology evidence.

Visible technologies include:

  • PHP 7.3.21
  • React
  • jQuery 3.2.1
  • DataTables
  • Select2
  • Bootstrap 4.0.0-beta
  • Apache
  • Font Awesome 4.7.0
  • jQuery Sparklines
  • animate.css

This makes the technology history unusually well documented.


React + jQuery Transitional Stack

The platform appears to come from a transitional period where:

React
+
jQuery
+
DataTables
+
Select2

coexisted in the same application.

This was common in systems evolving from traditional server-rendered PHP toward richer client interaction.


Telegram Bot Architecture

Conceptually:

Telegram User
     ↓
Bot Command
     ↓
Trading Backend
     ↓
Market Data / Wallet / Position
     ↓
Bot Response

Telegram as Trading UI

The bot could serve as the user's primary operational interface.

Potential confirmed high-level actions:

Get Price
Check Wallet
Open BUY
Open SELL
Monitor Position
Settle

The user explicitly described this interaction model.


Fast Price Access

A major UX advantage was immediate access to current quotations through Telegram.

Instead of:

Open Website
Refresh
Wait

the user could request the current price directly in Telegram.


Social-Network-Native UX

This project demonstrates an early form of conversational / channel-native application design.

The application moved trading actions into the communication platform already used by customers.


Market Data Freshness

Because trading decisions depended on the external quotation, market-data freshness was critical.

A robust system should track:

quote
timestamp
source

Stale Quote Protection

A modern V2 should reject or warn on stale market data.

Example:

Current Time - Quote Time > Threshold
        ↓
Do Not Open New Position

This is a modernization recommendation.


External API Failure

If TGJU is unavailable:

No Trusted Current Price
        ↓
Suspend New Position Opening

rather than using stale values silently.


Circuit Breaker

A modern implementation should use a circuit-breaker strategy around the market-data provider.


Position Model — Modern V2

positions
├── id
├── user_id
├── direction
├── quantity
├── entry_price
├── current_reference_price
├── opened_at
├── closed_at
├── status
├── locked_margin
├── realized_pnl
└── settlement_id

Wallet Model — Modern V2

wallets
├── id
├── user_id
└── status

Balances should preferably be derived from a ledger.


Wallet Ledger

wallet_entries
├── wallet_id
├── type
├── amount
├── reference_type
├── reference_id
├── created_at
└── metadata

Examples:

DEPOSIT
MARGIN_LOCK
MARGIN_UNLOCK
PNL_CREDIT
PNL_DEBIT
COMMISSION
SETTLEMENT

Why a Ledger Is Better

A mutable balance alone is difficult to audit.

A ledger enables:

Current Balance = SUM(entries)

and allows historical reconstruction.


Margin Rule Model

margin_rules
├── mode: percentage / absolute
├── warning_threshold
├── call_threshold
├── lock_enabled
└── auto_settlement_enabled

This directly reflects the confirmed historical concepts.


Settlement Policy Model

settlement_policies
├── type
├── settlement_time
├── frequency
├── manual_allowed
└── auto_enabled

Possible types:

Manual
Automatic
Daily
Weekly
Monthly
MarginTriggered

Matching Model

A modern matching component could represent:

match_batches
├── product_id
├── buy_quantity
├── sell_quantity
├── matched_quantity
├── settlement_price
└── created_at

Internal Netting

Because opposing quantities can offset each other, the system can reduce gross exposure.

Example:

BUY Exposure  = 100
SELL Exposure = 100

Net Exposure = 0

This is effectively an internal netting/matching process.


Exposure Management

Another useful representation:

Gross BUY
Gross SELL
Matched
Residual Exposure

This helps operations understand unmatched platform exposure.


Example

Gross BUY  = 150
Gross SELL = 100

Matched = 100
Residual BUY Exposure = 50

This is a valuable risk metric in a dealer-style platform.


Matching Priority

The current source information confirms that opposing BUY/SELL quantities were matchable.

It does not specify the exact priority rule.

Do not claim:

  • FIFO,
  • price-time priority,
  • pro-rata,

unless recovered from code/documentation.


Settlement Price

The historical system used current market quotation as its pricing basis.

Exact settlement-price timing/rules should be documented from code if a precise public technical description is required.


Concurrency

Trading systems must protect against simultaneous updates.

Potential race conditions include:

  • two positions opening against the same available balance,
  • simultaneous settlement,
  • duplicate Telegram commands,
  • repeated API callbacks.

Database Transactions

A modern version should wrap critical operations in database transactions.

Example:

BEGIN
  Lock Wallet
  Validate Balance
  Create Position
  Create Margin Lock
  Update Exposure
COMMIT

Row-Level Locking

For wallet operations:

SELECT ... FOR UPDATE

or framework-equivalent locking can prevent double spending.


Idempotency

Telegram users may press a button multiple times or network delivery may retry.

Each trading command should have an idempotency key.


Duplicate Trade Protection

Same Command ID
      ↓
Already Processed?
      ↓
Return Previous Result

Precision

Trading prices and wallet balances must use decimal/fixed-point values.

Avoid binary floating-point for financial calculations.


Audit Trail

A modern version should record:

Who
What
When
Price
Quantity
Wallet Before
Wallet After
Position
Settlement

Risk Audit

Margin events should also be logged:

Warning Triggered
Margin Call Triggered
Account Locked
Automatic Settlement
Manual Override

Manual Override

Because the historical platform supported manual risk/settlement controls, every manual administrative change should be auditable.


Security

A modern version should enforce:

  • server-side authorization,
  • secure bot tokens,
  • webhook validation,
  • HTTPS,
  • secure password hashing,
  • rate limiting,
  • transaction integrity.

Telegram Bot Security

The Telegram layer should never be trusted solely based on user-supplied IDs.

Map Telegram identity to an authenticated internal account.


Webhook Security

A modern integration should validate:

  • secret webhook token,
  • trusted update format,
  • replay/idempotency.

Operations Permissions

Administrative capabilities should be separated.

Example roles:

Trading Operations
Accounting
Risk
Administrator
Support

Accounting Should Not Equal Risk Admin

A strong V2 should avoid giving one broad "admin" role every critical permission.


Notifications

Useful trading notifications include:

Position Opened
Margin Warning
Margin Call
Settlement Completed
Wallet Changed

Telegram is naturally suited to these events.


Event-Driven Modern Architecture

A modern platform could emit:

QuoteUpdated
PositionOpened
MarginWarningTriggered
MarginCallTriggered
PositionMatched
SettlementExecuted
WalletUpdated

Queue-Based Processing

Non-blocking tasks should go through queues.

Example:

Position Settled
      ↓
Event
      ↓
Queue
      ↓
Telegram Notification

Realtime Web Console

The modern web console could use:

  • Laravel Livewire,
  • Laravel Reverb,
  • WebSockets.

This would replace much of the older manual AJAX/polling behavior.


Legacy vs Modern Interaction

Historical:

jQuery / AJAX
   ↓
PHP Endpoint
   ↓
Database
   ↓
Partial UI Update

Modern:

Livewire
+
WebSocket Events
+
Domain Services

Market Data Service

A modern architecture should isolate TGJU integration behind:

MarketDataProvider

The trading domain should depend on an interface, not on TGJU-specific code everywhere.


Example Interface

MarketDataProvider
    getCurrentQuote()

Then:

TGJUProvider

implements that interface.


Fallback Provider

A future architecture could support a secondary provider without rewriting trading logic.


Risk Engine

A dedicated service:

MarginRiskService

Responsibilities:

  • calculate equity,
  • calculate available balance,
  • evaluate threshold,
  • trigger warning,
  • trigger margin call,
  • request account lock.

Matching Service

PositionMatchingService

Responsibilities:

  • gather open BUY quantity,
  • gather open SELL quantity,
  • determine matched quantity,
  • create match records,
  • hand matched positions to settlement.

Settlement Service

SettlementService

Responsibilities:

  • calculate realized P/L,
  • release locked funds,
  • update wallet ledger,
  • close positions,
  • generate audit records.

Clean Module Boundaries

Recommended modern modules:

MarketData
Accounts
Wallets
Positions
Matching
Risk
Settlement
Accounting
Telegram
Operations
Audit

Testing Strategy

Market Data Tests

  • valid quote,
  • stale quote,
  • provider failure,
  • malformed data.

Wallet Tests

  • deposit,
  • lock,
  • unlock,
  • insufficient balance.

Position Tests

  • BUY open,
  • SELL open,
  • price change,
  • P/L calculation.

Margin Tests

  • percentage threshold,
  • absolute threshold,
  • warning,
  • margin call,
  • account lock.

Matching Tests

  • exact match,
  • partial match,
  • no opposing quantity.

Settlement Tests

  • manual,
  • automatic,
  • scheduled,
  • daily,
  • weekly,
  • monthly,
  • margin-triggered.

Telegram Tests

  • duplicate command,
  • authorization,
  • position open,
  • settlement request.

Exact Match Test

BUY  = 100
SELL = 100

Expected:
Matched = 100
Residual BUY = 0
Residual SELL = 0

Partial Match Test

BUY  = 100
SELL = 60

Expected:
Matched = 60
Residual BUY = 40
Residual SELL = 0

Margin Percentage Test

Initial Equity = 100
Configured Call Threshold = 30%

Current Equity = 29

Expected:
Margin Call
Trading Locked

Absolute Margin Test

Configured Minimum Equity = X

Current Equity < X

Expected:
Configured Risk Action

Insufficient Balance Test

Available Wallet = 100
Required Lock = 150

Expected:
Reject Position

Duplicate Telegram Command Test

Command ID = ABC

First request:
Process

Second request:
Return prior result
Do not create second position

Historical Evidence Strategy

The available screenshot is valuable because it preserves both the application structure and historical technology stack.

Visible trading menu concepts include:

  • settlement time,
  • new transactions,
  • latest transactions,
  • margin channel review,
  • margin channel warning,
  • margin-called accounts,
  • manual transaction settlement,
  • member grouping,
  • spectators,
  • traders.

Visible accounting concepts include:

  • deposit slips,
  • trader wallets.

Suggested Screenshot Caption

Historical web operations console for the Telegram-first melted-gold trading platform, including transaction, margin, settlement, trader, and accounting controls.


Historical vs Modern Boundary

Confirmed Historical Facts

  • Telegram-first user interaction.
  • Web administration/control panel.
  • TGJU API used for live market quotations.
  • Melted-gold market quotation (مظنه) used as pricing reference.
  • User registration.
  • Per-user wallets.
  • Available/current balance.
  • Locked balance.
  • BUY positions.
  • SELL positions.
  • Entry price.
  • Current price.
  • Profit/loss state.
  • Margin calculations.
  • Margin warning.
  • Margin call.
  • Percentage-based margin thresholds.
  • Absolute-amount margin thresholds.
  • Manual margin configuration.
  • Automatic margin configuration.
  • Account/trading lock when risk threshold was exceeded.
  • Manual settlement.
  • Automatic settlement.
  • Scheduled settlement.
  • Daily settlement.
  • Weekly settlement.
  • Monthly settlement.
  • Margin-related settlement.
  • Internal BUY/SELL quantity matching.
  • Example confirmed behavior: 100 BUY could match 100 SELL.
  • Trader and spectator concepts.
  • User grouping.
  • Deposit slips.
  • Trader wallets.

Modern V2 Recommendations

  • ledger-based wallets,
  • explicit event model,
  • idempotent Telegram commands,
  • PostgreSQL transactions,
  • row locking,
  • Laravel Livewire,
  • Laravel Reverb / WebSockets,
  • Redis,
  • queues,
  • stale-quote protection,
  • risk-engine separation,
  • matching-service separation,
  • immutable audit logs.

What Not to Overclaim

Do not claim:

  • regulated exchange status,
  • official securities market status,
  • institutional forex exchange status,
  • high-frequency trading,
  • price-time priority,
  • order-book depth,

unless separately documented.


Recommended Portfolio Terminology

Use:

Telegram-first OTC-style melted-gold trading platform

Use:

Internal BUY/SELL matching and netting

Use:

Margin-risk controls

Use:

Configurable settlement engine

Use:

External live market-data integration

Avoid:

Official Stock Exchange

unless legally/institutionally documented.


My Role

A strong, precise description:

I developed a Telegram-first melted-gold trading platform backed by a web operations console. The system integrated live TGJU market quotations, allowed users to open BUY/SELL positions from their wallet balance, managed available and locked funds, calculated trading P/L and margin risk, supported configurable margin-call rules, matched opposing BUY/SELL quantities internally, and executed manual, automatic, daily, weekly, monthly, and risk-triggered settlement workflows.


Engineering Highlights

  • Integrated external live market-data API.
  • Built Telegram as the primary trader interaction channel.
  • Built web operations/control console.
  • Implemented per-user wallet state.
  • Implemented available and locked balances.
  • Implemented BUY and SELL positions.
  • Stored entry price and current market reference.
  • Implemented P/L calculations.
  • Implemented margin-risk monitoring.
  • Supported percentage-based and absolute margin thresholds.
  • Supported manual and automatic risk configuration.
  • Implemented trading/account lock behavior.
  • Implemented internal BUY/SELL matching.
  • Implemented manual and automatic settlement.
  • Implemented daily, weekly, and monthly settlement.
  • Supported accounting and deposit/wallet management.
  • Built responsive/stateful web operations interfaces.

Product Highlights

The platform solved an important UX problem:

Users did not need to behave like professional terminal operators.

They could trade from the communication platform they already used daily.

The product flow became:

SOCIAL PLATFORM
      ↓
LIVE PRICE
      ↓
BUY / SELL
      ↓
WALLET
      ↓
RISK CONTROL
      ↓
SETTLEMENT

Business Logic Complexity

The project was significantly more than a CRUD application.

Its core complexity came from the interaction of:

MARKET DATA
+
WALLET STATE
+
POSITION STATE
+
MATCHING
+
MARGIN RISK
+
SETTLEMENT

Career Evidence

This project demonstrates:

  • FinTech Domain Modeling
  • Trading Workflow
  • External Market Data Integration
  • Telegram Bot Development
  • PHP
  • React
  • AJAX
  • Digital Wallet Logic
  • Position Management
  • Margin Risk Management
  • Matching / Netting
  • Settlement Systems
  • Accounting Integration
  • Stateful Web Applications
  • Operational Control Panels

CV Relevance

Tier A — FinTech / Stateful Transaction Platform

This project demonstrates the ability to build a system where financial/trading state changes continuously and must remain internally consistent.

The strongest technical story is:

LIVE MARKET DATA
+
TRADING POSITIONS
+
WALLET ACCOUNTING
+
MARGIN RISK
+
MATCHING
+
SETTLEMENT

Interview Story

Situation

The target users were accustomed to spending much of their time in social platforms and were not comfortable relying on constantly refreshed trading websites.

The customer also had access to a live TGJU market-data API for melted-gold quotations.

Task

The system needed to allow users to interact with live market prices, open BUY/SELL positions from wallet balances, manage margin risk, match opposing positions, and settle trading activity while giving operations staff full web-based oversight.

Action

I designed the platform around Telegram as the primary trader interface and a separate web operations console.

The backend consumed live TGJU quotations and used them as the market reference.

Each user had a wallet with available and locked balances.

Users could open BUY or SELL positions, while the system tracked entry price, current market value, P/L, and margin state.

I implemented configurable margin controls based on either percentage or absolute amount, with warning, margin-call, and account/trading lock behavior.

The system also matched opposing quantities internally—for example, 100 units of BUY exposure could be matched against 100 units of SELL exposure—and supported multiple settlement models including manual, automatic, scheduled, daily, weekly, monthly, and risk-triggered settlement.

Result

The result was a compact Telegram-first trading environment that combined market data, transactional wallet state, position management, risk control, internal matching, and operational settlement in one integrated platform.


Suggested Website Full Description

Overview

The Telegram-First Melted Gold Trading & Margin Platform was a specialized trading system built around live melted-gold market quotations.

Telegram acted as the primary user-facing trading channel, while a web application provided operations, accounting, margin, and settlement controls.


Live Market Data

The platform consumed live quotations through a licensed TGJU API.

These quotations were used as the market reference for opening and valuing BUY/SELL positions.


Telegram Trading

Users could access current prices, check wallet state, open BUY/SELL positions, monitor their activity, and settle through Telegram.


Wallet

Each user had a wallet with both available and locked balances.

The wallet state changed as positions opened, P/L changed, and settlements completed.


Margin Risk

The platform supported configurable percentage-based and absolute risk thresholds.

If account equity fell below configured limits, the system could trigger warnings, margin calls, and prevent further trading.


Internal Matching

Opposing BUY and SELL quantities could be matched inside the system.

For example:

100 BUY
100 SELL
→ 100 matched

This allowed opposing exposure to be offset before or as part of settlement.


Settlement

The system supported:

  • manual,
  • automatic,
  • scheduled,
  • daily,
  • weekly,
  • monthly,
  • and margin-triggered settlement.

Operations Console

The web console provided operational control over:

  • traders,
  • spectators,
  • transactions,
  • margin states,
  • margin calls,
  • settlement,
  • wallet/accounting,
  • deposit slips,
  • user groups.

Short Website Card Copy

Telegram-First Melted Gold Trading Platform

Built a Telegram-first trading platform using live TGJU gold quotations, per-user wallets, BUY/SELL positions, margin-risk controls, internal matching, and configurable manual/automatic settlement, backed by a web operations console.


Alternative One-Liners

FinTech-oriented

Built a melted-gold trading platform combining live market data, wallets, BUY/SELL positions, margin controls, matching, and settlement.

Telegram-oriented

Designed a Telegram-first trading experience where users could receive live gold prices, open positions, monitor wallet state, and settle without relying on a continuously refreshed website.

Architecture-oriented

Integrated Telegram, external market-data APIs, wallet accounting, margin risk, internal matching, and scheduled settlement into one stateful trading backend.

Risk-oriented

Implemented configurable margin thresholds, margin calls, account locks, position matching, and multiple settlement strategies for a melted-gold trading platform.


Suggested Website Slug

/projects/telegram-gold-trading-platform

Alternative:

/projects/melted-gold-margin-trading

Cover Direction

Title

Telegram-First Gold Trading Platform

Subtitle

Live Market Data · BUY/SELL · Wallet · Margin · Matching

Supporting Line

Telegram Bot · Web Operations · Settlement Engine

Visual Direction

A premium square technical cover should combine:

  • gold / melted-gold visual identity,
  • Telegram interaction,
  • live market quote,
  • BUY and SELL position cards,
  • wallet,
  • margin-risk indicator,
  • BUY/SELL matching arrows,
  • settlement flow.

Primary story:

LIVE PRICE
→ BUY / SELL
→ MATCH
→ MARGIN
→ SETTLE

Avoid making the cover look like:

  • a cryptocurrency exchange,
  • a regulated securities exchange,
  • a generic forex dashboard.

The visual should communicate:

Telegram-first gold trading with risk, matching, and settlement logic.


Modern V2 Architecture

A robust modern version could use:

Telegram Bot
      ↓
Laravel API / Domain Layer
      ├── MarketData
      ├── Wallet
      ├── Positions
      ├── Matching
      ├── Margin Risk
      ├── Settlement
      └── Accounting
           ↓
      PostgreSQL
           ↓
      Redis / Queue
           ↓
      Reverb / WebSockets
           ↓
      Web Operations Console

Suggested Modern Stack

  • Laravel
  • PostgreSQL
  • Livewire
  • Laravel Reverb
  • Redis
  • Queue Workers
  • Telegram Bot API
  • Docker
  • automated testing
  • immutable audit events

Migration Strategy

Phase 1 — Preserve Domain Model

Preserve:

  • users,
  • wallets,
  • positions,
  • margin rules,
  • settlement policies,
  • matching logic.

Phase 2 — Introduce Wallet Ledger

Replace mutable balance logic with ledger-based accounting.

Phase 3 — Isolate Market Data

Move TGJU integration behind a provider abstraction.

Phase 4 — Isolate Matching & Risk

Create:

PositionMatchingService
MarginRiskService
SettlementService

Phase 5 — Modernize UI

Use Livewire for operations console.

Phase 6 — Push Updates

Use Reverb/WebSockets for live operational state.

Phase 7 — Queue Telegram Events

Move notifications/secondary processing to queues.


Final Portfolio Statement

The project should not be reduced to:

“a Telegram bot that showed gold prices.”

Its real complexity came from combining a conversational user interface with a stateful transactional backend.

The strongest description is:

I built a Telegram-first melted-gold trading platform that integrated live TGJU market data, per-user wallets, BUY/SELL position management, configurable margin-risk controls, internal BUY/SELL matching, and multiple settlement models, backed by a web operations and accounting console.

Conceptually:

TGJU LIVE QUOTE
      ↓
TELEGRAM USER
      ↓
BUY / SELL POSITION
      ↓
WALLET / LOCKED FUNDS
      ↓
P/L + MARGIN
      ↓
BUY/SELL MATCHING
      ↓
SETTLEMENT
      ↓
WALLET RECONCILIATION