Skip to content

abheeshtsingh2803/TradeSphere

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TradeSphere

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.


Table of Contents


Features

  • 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

Getting Started

Prerequisites

  • Java 17+
  • Maven 3.6+
  • PostgresQL or compatible database

Setup

  1. Clone the repository:

    git clone https://github.com/abheeshtsingh2803/TradeSphere.git
    cd TradeSphere
  2. Configure the database:

    • Edit src/main/resources/application.properties with your DB credentials.
  3. Build and run:

    ./mvnw spring-boot:run

API Endpoints

Authentication

Register

  • POST /auth/signup
  • Request Body:
    {
      "fullName": "John Doe",
      "email": "john@example.com",
      "password": "yourpassword",
      "mobile": "1234567890"
    }
  • Response: AuthResponse

Login

  • 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.

Coin APIs

Get Coin List

  • GET /coins?page={page}
  • Response: List of coins

Get Coin Chart

  • GET /coins/{coinId}/chart?days={days}
  • Response: Market chart data for the coin

Search Coin

  • GET /coins/search?q={keyword}
  • Response: Search results

Get Top 50 Coins by Market Cap

  • GET /coins/top50
  • Response: Top 50 coins by market cap

Get Trading Coins

  • GET /coins/trading
  • Response: List of currently trading coins

Get Coin Details

  • GET /coins/details/{coinId}
  • Response: Detailed coin information

Watchlist APIs

All endpoints require Authorization: Bearer <jwt> header.

Get User Watchlist

  • GET /api/watchlist/user
  • Response: User's watchlist

Add Coin to Watchlist

  • PATCH /api/watchlist/add/coin/{coinId}
  • Response: The added Coin

Payment Details APIs

All endpoints require Authorization: Bearer <jwt> header.

Add Payment Details

  • POST /api/payment-details
  • Request Body:
    {
      "accountNumber": "1234567890",
      "accountHolderName": "John Doe",
      "ifscString": "IFSC0001",
      "bankName": "Bank Name"
    }
  • Response: PaymentDetails

Get User's Payment Details


Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/YourFeature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin feature/YourFeature)
  5. Create a new Pull Request

License

This project is licensed under the MIT License.


References

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages