https://github.com/riatabduramani/tradingapp
https://github.com/riatabduramani/tradingapp
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/riatabduramani/tradingapp
- Owner: riatabduramani
- Created: 2022-11-30T22:39:49.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T00:49:57.000Z (over 2 years ago)
- Last Synced: 2025-02-24T12:45:22.706Z (2 months ago)
- Language: Java
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Trading App
This project was a blackbox for me, based on the requirements tried to decouple the idea and give a solution, but I'll be happy to discuss and give more detailed idea once I understand fully the requirements.
### What I have introduced in this solution?
In order to have easy maintenance, I decoupled the existing hard coded one and made it much more extendable.
Introduced two endpoints
- saving signal specifications
- can be used internally,
- haven't used any authentication
- receiving signal
- GET method
- returns 200 when signal is presentThis endpoint helps to create signals by sending a JSON and save in database (in-memory db, used for challenging purposes);
````
curl --location --request POST 'http://localhost:8080/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"signal": 16,
"type": "SETUP",
"calculate": true,
"specificationss" : [{"param": 1, "value": 60}, {"param": 2, "value": 50}, {"param": 3, "value": 30}]
}'
````And, this one is to call the signals based on signal ID.
```
curl --location --request GET 'http://localhost:8080/api/v1/signal/1'
```Thank you for reviewing my code!