SilverBars is a REST API designed to be consumed either by a GUI or another back-end service
Path | Methods | Description |
---|---|---|
/silverbars/orders |
POST |
Registers a new order |
/silverbars/orders/:id |
DELETE |
Cancels an existing order |
/silverbars/orders/summary |
GET |
Gets a summary of all the orders currently alive in the system |
Creates an order and returns it's location
Status | Description |
---|---|
201 | Created |
Request URL
POST /silverbars/orders
Request body
{
"userId":"user1",
"quantity":3.5,
"price":306,
"orderType":"Sell"
}
Response body
None
Headers: Location -> /silverbars/orders/96988d89-54a4-4ab7-af3f-44426081b942
Gets the summary of orders currently alive on the system
Status | Description |
---|---|
200 | report |
Request URL
GET /silverbars/orders/summary
Response body
{
"items":[
{
"quantity":3.5,
"price":306,
"orderType":"Sell"
}
]
}
Deletes the the order for the given id
.
Status | Description |
---|---|
204 | Deleted |
Request URL
DELETE /silverbars/orders/96988d89-54a4-4ab7-af3f-44426081b942
Request body
None
Response body
None