Trading & payments · 3 min read
GBT Market: wallets, trading, and a separate chart pipeline
GBT Market is a gold and cryptocurrency trading platform. My ongoing freelance work covers backend services for orders, portfolios, wallets, payments, live market data, support, and administrative reporting. The separate chart applications are also deployed and used in production.
- My role
- Backend Engineer (Freelance) · 2025–present
- Project scope
- Client-owned production platform · private source
Dedicated chart processing updates current prices in Redis, maintains candle history in MongoDB, and prepares Socket.IO client updates. Order execution remains outside this chart-processing responsibility.
Scroll the diagram to explore the full flow.
Result and scope
Production wallet safeguards, real-time market delivery, chart history, reporting, and continuing backend maintenance.
Financial operations can overlap
A trading application cannot assume that requests arrive once, in a convenient order. Two wallet operations can reach the backend together. A payment callback can be retried. An administrator may investigate an operation while related records are still changing.
My work includes atomic balance updates, concurrency protection, and idempotency safeguards. These address specific failure modes: spending the same available balance twice, applying a repeated operation more than once, or creating duplicate transaction-log effects. The important result is preserving the meaning of a financial operation across those paths.
Orders, payments, and support are connected
The backend includes trading and melted-gold markets, portfolios, order settings, wallet transfers, deposits and withdrawals, payment integrations, commissions, and referrals. I contribute across those services rather than treating each as an unrelated endpoint.
Administrative reporting and support are part of that work. A financial event needs to remain understandable when it is exported, searched, or investigated in a ticket. Recent delivery included localized report fields, ticket administration, reporting filters, and compatibility for historical data. Some presentation fields can be calculated when a response is built, allowing old records to benefit without a database backfill.
Separating chart updates from order execution
The local project family includes dedicated NestJS chart applications. Their purpose is to process price events, maintain current price data in Redis, update chart history in MongoDB, and prepare events for client broadcasts. They support multiple timeframes, from minute-level candles through daily history.
The chart application explicitly separates this work from order processing such as margin closure, take-profit/stop-loss handling, and limit orders. That is a useful boundary: presenting a price history and executing a financial action are different responsibilities, even when both react to the same market information.
The chart-data service also contains history retrieval, cache initialization, and cleanup responsibilities. Persisted history and fast current reads have different access patterns, so the system uses MongoDB and Redis for distinct jobs. Both chart applications are deployed and used in production.
Real-time delivery has more than one stage
Socket.IO delivers updates to connected clients. Redis pub/sub supports communication and fan-out across processes, while Bull handles background work. The source also contains scheduled jobs and production process configuration.
A price can be correct in storage while the screen is stale, or visible on the screen before another downstream operation has finished. Describing the system as simply “real time” hides those distinctions. I work on the service boundaries and update paths so each consumer receives the data it needs without confusing a notification with the authoritative financial record.
Reporting and production delivery
My contributions include MongoDB query and report improvements, market-cache isolation, notification boundaries, and deployment support with Docker and Nginx. The work also involves Jest/Supertest regression tests and investigation of production issues.
Two paths to review
The chart flow above follows a market event into current-price caching, candle history, and client updates. The financial flow starts with a wallet operation and follows its balance condition, duplicate handling, and transaction record.
These paths need different guarantees. A market tick can become obsolete, while an applied balance change needs a durable explanation. Separating their responsibilities keeps chart delivery from becoming the authority for a financial operation.
Project notes
Ongoing freelance work since 2025. The platform and both chart applications are deployed; client source and production data remain private.