Update REST API

2026-03-27 10:58:58 +00:00
parent 0bed518af3
commit 1b0529124f

@@ -52,6 +52,7 @@
</code></pre>
<hr>
<h2>Trades</h2>
<h3><code>POST /trade/add</code></h3>
<p>Add a new trade. <code>product</code> is an integer enum and <code>type</code> is a boolean (see tables below).</p>
<pre><code class="language-bash">curl -X POST http://localhost:8080/trade/add \
@@ -75,3 +76,20 @@ Value | Meaning
2 | OptionPutTrade
3 | CurrencyTrade
4 | BondTrade
<h3><code>GET /trade/list</code></h3>
<p>getting a list of trades in the db</p>
<pre><code class="language-bash">curl -X POST http://localhost:8080/trade/list </code></pre>
<pre><code>return:\
{\
"Symbol":"NOVOBc",\
"CurrencyCode":"DKK",\
"Shares":15,\
"Product":0,\
"Type":true,\
"Price":505,\
"Date":"2025-03-26T00:00:00Z"
}
</code></pre>