Coder Social home page Coder Social logo

forex-trading-system's Introduction

Finmo Assignment (SDE BACKEND)

This Forex trading system is developed using Nest.js and comprises APIs that enable users to perform various actions such as topping up their account, fetching live FX conversion rates, executing FX conversions, and checking their account balances.

Run Locally

Clone the project:

  git clone https://github.com/Sudhanshu-Purohit/Forex-trading-system.git

Install dependencies:

  npm install

Set up necessary environment variables:

  DB_URI=
  JWT_SECRET=
  JWT_EXPIRE=
  ALPHADVANTAGE_API=

Start the server:

  npm run start:dev

Features

  • Top up account
  • Check balance
  • Perform FX conversion
  • Proper error handling
  • APIs documented using swagger
  • Unit tests

Bonous Features

  • Authentication and authorization
  • Rate limiting to the APIs
  • Caching mechanism using cache manager

API Testing

  • To test the APIs, you can use either Postman or Swagger UI.
  • For testing with Swagger UI, navigate to http://localhost:3000/api

API Testing

  • To test the APIs, you can use either Postman or Swagger UI.
  • For testing with Swagger UI, navigate to http://localhost:3000/api

How to test APIs

To test APIs without opening MongoDB, follow these steps:

  • Log in with the following email and password:
  Email: [email protected]
  Password: hello@123
  • After logging in, use the generated JWT token to authorize your requests. You can find the authorization section at the top of the Swagger UI. Paste the token there to unlock the restricted APIs.

  • To check the balance, use the provided user ID: 661428d525fcf99126264b22.

  • Similarly, for top-up functionality, use the same user ID: 661428d525fcf99126264b22.

If you have MongoDB:

  • First Sign using your credentials.

  • Now log in , and use the generated token to authorize your requests in Swagger UI.

  • Once authorized, you can test the restricted APIs.

  • To check the balance, retrieve your user ID from MongoDB.

  • For the top-up feature, also retrieve the user ID from MongoDB.

forex-trading-system's People

Contributors

sudhanshu-purohit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.