Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

henriquecarv/netlolo-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Netlolo developer challenge

Netlolo

LICENSE Dependabot Status

User Story

A customer needs to search in a orderbook. He wants to buy offers below some price, and also sell offers to earn some money.

Returns json data about offers, based on one or more specific amounts. These results can also be sorted in ascending or descending order with an optional parameter.

System Requirements

Installing

  • npm install

Running Application

  • npm start

Running UnitTest

  • npm test

Examples

  • URL /offer/:amounts/:sort?

  • URL Params

    Required:

    amounts=[float]

    Optional:

    sort=[string]

    • Sample Calls:
  $.ajax({
    url: "/offer/80000/desc",
    dataType: "json",
    type : "GET",
    success : function(r) {
      console.log(r);
    }
  });

http://localhost:3000/offer/80000/desc

  $.ajax({
    url: "/offer/30000,20000/asc",
    dataType: "json",
    type : "GET",
    success : function(r) {
      console.log(r);
    }
  });

http://localhost:3000/offer/30000,20000/asc