MartiTM / loan-schedule-API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

loan-schedule-API

REST API Calculates the borrower's schedule.

Run the app

go run ./main.go

Run the tests

go test ./...

REST API

Runs on port 3000

Calculates the borrower schedule

Parameter Type Description
capital emprunté int Required borrowed capital
taux d'intérêt annuel float Required annual interest rate
nombre d'échéance int Required number of terms before the end of the loan
POST /
  • Response

There are as many elements in the answer as there are terms

[
    {
        "montant de l échéance"         : int,
        "capital restant dû"            : int,
        "montant des intérêts"          : int,
        "montant du capital"            : int,
        "capital restant à rembourser"  : int
    },
    ...
]

About

License:MIT License


Languages

Language:Go 98.3%Language:Dockerfile 1.7%