This Repo contains APIs of Trade App.
To use this project, run this commands:
make up
to build the project and starting containers.make build
to build the project.make start
to start containers if project has been up already.make stop
to stop containers.make restart
to restart containers.make run
to build the project and starting containers in background.
git clone
this repository &&cd
into the project directory.- run command
make build
to build the project. - run command
make up
to start docker container. - Test apis on localhost
Name | End Point | Request Type | Body | Description |
---|---|---|---|---|
Registration | /api/register | POST | { "username": "XXXX", "email": "XXXX", "password": "XXXX" } |
User Registration |
Login | /api/login | POST | { "username": "XXXX", "password": "XXXX" } |
User Login |
Add Bond | /api/add-bond | POST | { "bond_type":"XXXX", "no_of_bonds":"XXXX" "password": "XXXX" } |
To add new Bond, All fields are Required |
Get List of Bonds | /api/add-bond | GET | To get list of all Bond. | |
Get a Bond | /api/bonds/:id | GET | To get a Bond by bond id. | |
Puchase Bond | /api/bonds/:id | PUT | To purchase a bond. | |
USD Rate | /api/usd-rate/ | PUT | To get bond price in current USD rates. |