This is a simple React app that demonstrates a mock Bitcoin trading platform. It includes a live Bitcoin price chart powered by CoinGecko's API and a basic trading panel for buying and selling Bitcoin in USD.
- Live Bitcoin Price Chart
- Mock Trading Panel (Buy/Sell Bitcoin)
- Real-time price updates for Bitcoin (from CoinGecko API)
To run this project locally, follow the steps below:
Clone the repository to your local machine:
git clone https://github.com/yourusername/bitcoin-trading-demo.gitNavigate to the project folder and install the dependencies:
cd bitcoin-trading-demo
npm installStart the React development server:
npm startThis will start the app at http://localhost:3000.
src/
├── components/
│ ├── Chart.js # Component for rendering Bitcoin price chart
│ ├── TradingPanel.js # Component for the mock trading panel
├── App.js # Main application component
├── index.js # Entry point for the React app
└── App.css # Global styles
- CoinGecko API: Used to fetch real-time Bitcoin price data.
GET https://api.coingecko.com/api/v3/coins/bitcoin/market_chart?vs_currency=usd&days=1&interval=minute
This endpoint retrieves the last 24 hours of Bitcoin data in USD, with minute-by-minute pricing.
This project is open-source and available under the MIT License.