TradeSphere is a Spring Boot-based backend application for cryptocurrency trading and portfolio management. It provides RESTful APIs for user authentication, coin data retrieval, watchlist management, and payment details handling.
- User registration and login with JWT authentication
- Two-factor authentication (2FA) support
- Cryptocurrency data (list, search, details, charts, top coins)
- User-specific watchlist management
- Payment details management
- Java 17+
- Maven 3.6+
- PostgresQL or compatible database
-
Clone the repository:
git clone https://github.com/abheeshtsingh2803/TradeSphere.git cd TradeSphere -
Configure the database:
- Edit
src/main/resources/application.propertieswith your DB credentials.
- Edit
-
Build and run:
./mvnw spring-boot:run
- POST
/auth/signup - Request Body:
{ "fullName": "John Doe", "email": "john@example.com", "password": "yourpassword", "mobile": "1234567890" } - Response:
AuthResponse
- POST
/auth/signin - Request Body:
{ "email": "john@example.com", "password": "yourpassword" } - Response:
AuthResponse - Notes: If 2FA is enabled, you will receive a session and must verify OTP.
- GET
/coins?page={page} - Response: List of coins
- GET
/coins/{coinId}/chart?days={days} - Response: Market chart data for the coin
- GET
/coins/search?q={keyword} - Response: Search results
- GET
/coins/top50 - Response: Top 50 coins by market cap
- GET
/coins/trading - Response: List of currently trading coins
- GET
/coins/details/{coinId} - Response: Detailed coin information
All endpoints require
Authorization: Bearer <jwt>header.
- GET
/api/watchlist/user - Response: User's watchlist
- PATCH
/api/watchlist/add/coin/{coinId} - Response: The added
Coin
All endpoints require
Authorization: Bearer <jwt>header.
- POST
/api/payment-details - Request Body:
{ "accountNumber": "1234567890", "accountHolderName": "John Doe", "ifscString": "IFSC0001", "bankName": "Bank Name" } - Response:
PaymentDetails
- GET
/api/payment-details - Response:
PaymentDetails
- Fork the repository
- Create your feature branch (
git checkout -b feature/YourFeature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/YourFeature) - Create a new Pull Request
This project is licensed under the MIT License.