Code Monkey home page Code Monkey logo

fidelity's Introduction

Fidelity

Java Assignment for Fidelity High Income group

ABOUT

a Java REST service that will consume a collection of trade orders, and perform some asynchronous order summary analysis on them.

  • API to add trades (POST)
  • API to fetch summary of all trades (GET)
  • API to fetch summary based on specific security (GET)
  • API to fetch summary based on specific fund (GET)
  • order summary analysis done asynchronously, at a pre-defined interval of 1 minute.

Extra endpoints provided

  • API to fetch all the trades (GET)
  • API to fetch tades based on specific security (GET)
  • API to fetch tades based on specific fund (GET)

Getting started

Definition of an Order

An order contains the following fields which has to be sent during a POST call.

  • order id (optional)
  • side (buy or sell) (required)
  • security (required)
  • fund name (required)
  • quantity (required)
  • price (required)

HEROKU URL

https://fid-trade.herokuapp.com/

API Documentation

The REST service should provide a number of endpoints, as follows:

POST api/trade
@required body (example) : { "side":"BUY", "security":"AAPL", "fundName":"MAG", "quantity":2000, "price":100}

consume a trade order which will be stored in memory (not in a database)


GET api/summary

returns total number of orders, with the total quantity and average price. It should also return the total number of combinable orders


GET api/summary/security/{securityName}
@required path variable (example) : AAPL

returns total number of orders, with the total quantity and average price of that specific security


GET api/summary/fund/{fundName}
@required path variable (example) : MAG

returns total number of orders, with the total quantity and average price of that specific fund


Extra API endpoints

GET api/trades

returns list of all the trades


GET api/trades/security/{securityName}
@required path variable (example) : AAPL

returns list of all the trades for that specific security


GET api/trades/fund/{fundName}
@required path variable (example) : MAG

returns list of all the trades for that specific fund


SETUP Documentation

Trade Server Setup


  • Install STS or Eclipse for running the server

  • Open Terminal/ Command Prompt and type in the following command

    git clone https://github.com/sougatadafader/Fidelity.git

  • Open the Fidelity inside the STS or Eclipse application

  • Find the port inside the application.properties file. Change the port based on your suitability.

    example: server.port = 9000

  • Update the client services to point the updated port.

Congratulations! ๐ŸŽ†

If you successfully followed the instructions, you're now ready for taking off! ๐Ÿš€

fidelity's People

Contributors

sougatadafader avatar

Watchers

James Cloos 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.