This is a simple crypto trading platform built in C++. It allows users to simulate trading cryptocurrencies by making bids and asks, viewing market stats, and managing a virtual wallet. The program reads historical order data from a CSV file and matches buy and sell orders automatically.
- 💸 Simulate placing bids and asks – Users can make buy or sell offers for cryptocurrencies.
- 📊 View market statistics – See current prices, highest/lowest asks, and more.
- 👛 Wallet management – Track your crypto balances and see updates after each trade.
- ⚡ Order matching engine – Automatically matches compatible buy and sell orders.
- ⏩ Step through timeframes – Move forward in time to see how the market changes.
- 🧩 Object-Oriented Programming (OOP): The program uses classes for orders, the order book, wallet, and main logic.
- 📚 Custom Libraries: Self-created modules for CSV reading, order management, and wallet handling.
- 🛡️ Exception Handling: Robust error checking for user input and data processing.
- 🗃️ Data Structures: Uses STL containers like
std::vector,std::map, andstd::string. - 🏗️ Separation of Concerns: Clear separation between user interface, business logic, and data management.
- 📖 This project is part of a guided tutorial and is intended for learning purposes.
這是一個用 C++ 製作的簡易虛擬貨幣交易平台。使用者可以模擬買賣虛擬貨幣、查看市場資訊,以及管理虛擬貨幣錢包。程式會從 CSV 檔案讀取歷史訂單資料,並自動媒合買賣訂單。
- 💸 模擬下單(買入/賣出) – 使用者可以下買單或賣單。
- 📊 查看市場統計 – 顯示當前價格、最高/最低賣價等資訊。
- 👛 錢包管理 – 追蹤你的虛擬貨幣餘額,交易後即時更新。
- ⚡ 訂單媒合引擎 – 自動媒合的買賣訂單。
- ⏩ 時間推進 – 可以逐步前進,觀察市場變化。
- 🧩 物件導向程式設計(OOP): 程式使用類別來管理訂單、訂單簿、錢包和主邏輯。
- 📚 自製函式庫: 包含自訂的 CSV 讀取、訂單管理和錢包模組。
- 🛡️ 例外處理: 對使用者輸入和資料處理進行錯誤檢查。
- 🗃️ 資料結構: 使用 STL 容器如
std::vector、std::map和std::string。 - 🏗️ 職責分離: 使用者介面、商業邏輯與資料管理分工明確。
- 📖 本程式為引導教學課程成果的一部分,僅供學習使用。