on the way
This commit is contained in:
1 parent
82b43ddf90
commit
6e266c787b
14 files changed
+144
-43
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
# Skrimish
|
# Skrimish
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
A stock exchange simulator. The scope of this project is not yet defined but it should
|
A stock exchange simulator. The scope of this project is not yet defined but it should
|
||||||
allow end user(s?) to exchange securities via a kind of stock exchange
|
allow end user(s?) to exchange securities via a kind of stock exchange
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" id="Слой_1" data-name="Слой 1" viewBox="0 0 320 76.71">
|
||||||
|
<defs>
|
||||||
|
<style>.cls-1{fill:#fff;}.cls-2{fill:#fffcef;}.cls-3{fill:#333;}</style>
|
||||||
|
</defs>
|
||||||
|
<title>hq__amsterdam</title>
|
||||||
|
<rect class="cls-1" x="209.68" y="41.71" width="15.45" height="29.85"/>
|
||||||
|
<rect class="cls-2" x="56.42" y="11.54" width="2.1" height="7.59"/>
|
||||||
|
<ellipse class="cls-3" cx="8.25" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M8.25,53.38a1.34,1.34,0,0,1,0-2.61,1.34,1.34,0,0,1,0,2.61Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,8.25,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="13.72" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M13.72,53.38a1.34,1.34,0,0,1,0-2.61,1.34,1.34,0,0,1,0,2.61Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,13.72,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="19.15" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M19.15,53.38a1.34,1.34,0,0,1,0-2.61,1.34,1.34,0,0,1,0,2.61Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,19.15,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="24.59" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M24.59,53.38a1.34,1.34,0,0,1,0-2.61,1.34,1.34,0,0,1,0,2.61Zm0-1.6a.54.54,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,24.59,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="30.05" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M30.05,53.38a1.34,1.34,0,1,1,1.06-1.31A1.19,1.19,0,0,1,30.05,53.38Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,30.05,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="35.49" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M35.49,53.38a1.34,1.34,0,1,1,1.06-1.31A1.19,1.19,0,0,1,35.49,53.38Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.54.54,0,0,0,35.49,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="41" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M41,53.38a1.34,1.34,0,1,1,1.06-1.31A1.19,1.19,0,0,1,41,53.38Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,41,51.78Z"/>
|
||||||
|
<ellipse class="cls-3" cx="46.21" cy="52.07" rx="0.57" ry="0.82"/>
|
||||||
|
<path class="cls-3" d="M46.21,53.38a1.34,1.34,0,1,1,1.06-1.31A1.19,1.19,0,0,1,46.21,53.38Zm0-1.6a.53.53,0,0,0-.08.29.47.47,0,0,0,.1.33s0-.14,0-.33A.53.53,0,0,0,46.21,51.78Z"/>
|
||||||
|
<circle class="cls-3" cx="73.17" cy="26.91" r="1.75"/>
|
||||||
|
<path class="cls-3" d="M73.17,28.91a2,2,0,1,1,2-2A2,2,0,0,1,73.17,28.91Zm0-3.51a1.51,1.51,0,1,0,1.51,1.51A1.51,1.51,0,0,0,73.17,25.4Z"/>
|
||||||
|
<path class="cls-3" d="M226.19,24.76a.49.49,0,0,0-.44-.49h-17a.5.5,0,0,0,0,1h17A.49.49,0,0,0,226.19,24.76Z"/>
|
||||||
|
<path class="cls-3" d="M316,75.2l0-5.78-5,.07V64.55h-6.5L288.34,46.06l15.12,3,.4-2-29-5.73-.4,2,1.66.32-1.36,19,.32,0-.07.1.07,0-1.33-.12-.17,1.68,1.56.12h-5l1.56-.12-.17-1.71-1.11.12,0,0,0-.1.32,0-1.38-19.08,1.71-.35-.4-2L241.54,47l.4,2,15.15-3L240.55,64.94,235,64.6c0-.15,1-3.51-1.21-5.49h-1s-7.17-9.39-7.17-18H226V38.6h-.49V28.72h2.84l-2.13,4.42.67.49,2.59-5.41h-4v-2h1.61a1.39,1.39,0,0,0,.77-1.36,1.47,1.47,0,0,0-.77-1.36h-1.58l-7.73-8.4h-1l-7.73,8.4h-1.58a1.43,1.43,0,0,0-.77,1.36,1.39,1.39,0,0,0,.77,1.36H209v2h-3.68l2.94,6.15L209,34v4.62h-.49V41H209c0,6.92-4.57,14.33-6.43,17.05H161V36.55h0V33.39h0v-4h0V26.27h0V24a1.57,1.57,0,0,0,1.26-.89,1.53,1.53,0,0,0-.77-2.05,1.43,1.43,0,0,0-.52-.15V19.55h-.49V21a2,2,0,0,0-1.09.86,1.53,1.53,0,0,0,.72,2.05,3.07,3.07,0,0,1,.37.12V58.1h-4.2V33.63h1V32.4h-2.87l-3.19-12-1.66-6.3h-.47V9.93h-2.2v4.2h-.52l-1.66,6.3-3.16,12h-3.46c-5.78-4-5.86-14.33-5.86-14.33h-8.72c-.22,9.64-4.62,13.59-6.18,14.33h-.84V25h-1.24V20.56h-2V17.35h-2V13.89H109.1V7H105.4v6.92h-2.47v3.46h-2v3.21H99.22V25H98V19.08H95.29l-2.52-4.52L90,9.71l-2.74,4.87-2.52,4.5H81.4V30.94h-2V30h-.59l-2.57-8.77,1.68-6.3H68l1.68,6.25L67.12,30H66.06v1H63.83v-10a2.9,2.9,0,0,0,1.24.15V19.84s-3.46.17-3.46-5V6H53.23v8.87c0,5.16-3.71,5-3.71,5v1.24a3.34,3.34,0,0,0,1-.07V57.38H47.05V53.82a.75.75,0,0,0-1.48,0v3.56h-4V53.82c0-.25,0-.47-.25-.57V34.67h.84c.17,0,.15-.27.15-.42v-.17c0-.17,0-.15-.15-.15h-.35a1.39,1.39,0,0,0,0-.35V32a.93.93,0,0,0-.49-.72V29.75a2,2,0,0,1,4,0v5c-.74.22-1.14,1.21-1.36,2.2h-.17a.37.37,0,0,0,0,.74h.49a1.69,1.69,0,0,0,1.46,1.19,1.72,1.72,0,0,0,1.46-1.19h.47a.37.37,0,0,0,0-.74h-.12c-.22-1-.74-2.05-1.73-2.22V29.75a2.32,2.32,0,0,0-2.35-2.47h0a2.69,2.69,0,0,0-2.64,2,2.78,2.78,0,0,0-2.64-2.1h0a2.62,2.62,0,0,0-2.47,2.57v5a3.44,3.44,0,0,0-1.26,2.2h-.17a.37.37,0,0,0,0,.74h.49a1.69,1.69,0,0,0,1.46,1.19,1.72,1.72,0,0,0,1.46-1.19h.47a.37.37,0,1,0,0-.74H38c-.22-1-.84-2.05-1.58-2.22V29.75a1.85,1.85,0,1,1,3.71,0v1.51a1,1,0,0,0-.49.77V34h0c-.2,0-.52,0-.52.15v.17c0,.17.17.42.59.42h.4V57.43h-4V53.87a.62.62,0,1,0-1.24,0v3.56h-4.2V53.87c0-.37,0-.4-.4-.4h0c-.37,0-.82,0-.82.4v3.56h-4.2V53.87a.62.62,0,1,0-1.24,0v3.56h-4.2V53.87a.75.75,0,0,0-1.48,0v3.56h-4.2V53.87a.62.62,0,1,0-1.24,0v3.56H9V53.87c0-.37,0-.4-.4-.4h0c-.37,0-1.09,0-1.09.4v3.56h-1v1h1v1.24H7V69.79H3.53v5.68H0v1.24H161.2V75.47h-1V72s5.16-8.48,19.13-8.2,18.19,8.35,18.19,8.35v3.26h-1.24v1.24l11.19,0H320V75.22l-4,0ZM161,21.33a.85.85,0,0,1,.37.1,1.19,1.19,0,0,1,.57,1.58,1.07,1.07,0,0,1-.94.67Zm-141.11,37h4.2v1.24h-4.2Zm-5.68,0h4.2v1.24h-4.2ZM9,58.37h4v1.24H9ZM24.34,69.74H11.74v-.86c0-2.89,2.72-4.82,5.58-4.82h2.15a4.61,4.61,0,0,1,4.87,4.82v.86Zm6.43-11.37H35v1.24h-4.2Zm-5.44,0h4.2v1.24h-4.2ZM39.91,69.74H27.31v-.86c0-2.89,2.74-5.07,5.63-5.07h2.15a4.77,4.77,0,0,1,4.82,5.07Zm.25-10.13h-4V58.37h4Zm1.48-1.24h4v1.24h-4Zm8.9,11.37H42.88v-.86c0-2.89,2.77-4.82,5.66-4.82h2Zm0-10.13H47.08V58.37h3.46Zm3.71,7.17H52.76V58.86h1.48Zm0-9.14H52.76V50h1.48Zm0-8.9H52.76V40.58h1.48Zm0-9.14H52.76V31.68h1.48Zm0-8.9H52.76V22.54h1.48Zm5.68,36.08h-4.7v-8.4h4.7Zm0-9.14h-4.7V49.72h4.7Zm0-8.9h-4.7V40.58h4.7Zm0-9.14h-4.7V31.68h4.7Zm0-8.9h-4.7V22.54h4.7ZM57.21,15.37v3.46h-.49V15.37Zm-.49-.25V11.91h.49v3.21Zm1.48.25v3.46H57.7V15.37Zm-.49-.25V11.91h.49v3.21Zm4.2,51.65H60.67V58.86H61.9Zm0-9.14H60.67V50H61.9Zm0-8.9H60.67V40.58H61.9Zm0-9.14H60.67V31.68H61.9Zm0-8.9H60.67V22.54H61.9Zm-1.73-9.88V19.08H58.69V11.42H56.22v7.66H55v1.73H51.48C54.27,19.57,54.24,15,54.24,15V7.22h6.4V15s.07,4.6,2.84,5.83Zm10.6.49.1-.42-.07-.27-1.31-4.77h7.12L75.3,20.61l-.07.25.1.52L77.79,30H68.33Zm1.26,23V35.54A1.14,1.14,0,0,1,73.3,34.4h.2a1.14,1.14,0,0,1,1.26,1.16v8.72Zm2.72,4.84v8.75H72V49.1A1.12,1.12,0,0,1,73.3,48h.2A1.14,1.14,0,0,1,74.75,49.13Zm-5.44,8.75H66.6V49.1c0-.72.72-1.11,1.43-1.11h.2a1,1,0,0,1,1.09,1.14v8.75Zm0-13.59H66.6V35.54A1.29,1.29,0,0,1,68,34.4h.2a1,1,0,0,1,1.09,1.16v8.72ZM75.5,70.73H70.8V62.35a2.27,2.27,0,0,1,2.37-2h.32a2,2,0,0,1,2,2.05v8.33Zm4.45-12.85H77.23V49.1A1.18,1.18,0,0,1,78.56,48h.2a1.07,1.07,0,0,1,1.19,1.14v8.75Zm0-13.59H77.23V35.54a1.2,1.2,0,0,1,1.33-1.14h.2a1.08,1.08,0,0,1,1.19,1.16v8.72Zm7.91-28.17h4.2v4.7h-4.2Zm-3.46,6.18H96v1H84.39Zm9.64,22V38.6h2v5.68ZM96,51v5.93H94V51ZM94,31.68V26h2v5.68ZM92.79,28v4.94H87.36V28Zm-5.44-.49v-.84A2.44,2.44,0,0,1,90,24.27h.27a2.42,2.42,0,0,1,2.57,2.37v.84Zm2.57,9.14h.27a2.52,2.52,0,0,1,2.57,2.5v1H87.33v-1A2.56,2.56,0,0,1,89.93,36.62Zm2.87,4v4.94H87.36V40.58Zm-2.87,8.65h.27a2.43,2.43,0,0,1,2.57,2.4v.82H87.33v-.82A2.48,2.48,0,0,1,89.93,49.23Zm2.87,3.71v4.94H87.36V52.93Zm0,7.66v6.92H87.36V60.59ZM94,68v1.48H86.12V68ZM84.39,26h2v5.68h-2Zm0,12.6h2v5.68h-2Zm0,12.36h2v5.93h-2Zm0,19.28H95.76v1.48H84.39Zm13.34,4.45H82.17v-2H97.74ZM103.42,66H101.2V62.57h2.22Zm0-4H101.2V58.37h2.22Zm0-9.39H101.2V49.23h2.22Zm0-4H101.2V45h2.22Zm0-5.19H101.2V39.84h2.22Zm0-4.2H101.2V35.88h2.22Zm0-4.94H101.2V30.69h2.22Zm0-4H101.2V26.74h2.22ZM105.89,66h-1.73V62.57h1.73Zm0-4h-1.73V58.37h1.73Zm0-9.39h-1.73V49.23h1.73Zm0-4h-1.73V45h1.73Zm0-5.19h-1.73V39.84h1.73Zm0-4.2h-1.73V35.88h1.73Zm0-4.94h-1.73V30.69h1.73ZLine truncated
|
||||||
|
<path class="cls-3" d="M215.62,33v4.82h3.46V33a1.75,1.75,0,0,0-3.46,0Zm3,.4v3.44h-2.47V33.44a1.26,1.26,0,0,1,1.24-1.31A1.27,1.27,0,0,1,218.58,33.44Z"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="45.03" width="3.71" height="3.21"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="35.88" width="3.71" height="3.21"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="32.18" width="3.71" height="3.21"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="23.28" width="3.71" height="2.97"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="41.07" width="3.71" height="3.21"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="59.11" width="3.71" height="3.21"/>
|
||||||
|
<path class="cls-3" d="M128.18,70.68a1.28,1.28,0,0,1,.35-.52.82.82,0,0,0,0-.27l-.37-1.43h0v0h0l0,0h0a3.08,3.08,0,0,0-1.68,2.45c.37,0,.77,0,1.11,0A2.41,2.41,0,0,0,128.18,70.68Z"/>
|
||||||
|
<path class="cls-3" d="M129.86,71.1a.47.47,0,0,0-.47-.47h-.07a.81.81,0,0,1-.37.62.49.49,0,0,0,.44.3A.45.45,0,0,0,129.86,71.1Z"/>
|
||||||
|
<rect class="cls-3" x="89.83" y="17.1" width="1.73" height="1.24"/>
|
||||||
|
<path class="cls-3" d="M127.86,67.51l-.15-.59a5.54,5.54,0,0,0-.86.59L126,68.68l-1.53,2.13c.22,0,.57,0,1,0A3.89,3.89,0,0,1,127.86,67.51Z"/>
|
||||||
|
<rect class="cls-3" x="88.35" y="18.83" width="1.24" height="1.48"/>
|
||||||
|
<rect class="cls-3" x="88.35" y="17.1" width="1.24" height="1.24"/>
|
||||||
|
<rect class="cls-3" x="89.83" y="18.83" width="1.73" height="1.48"/>
|
||||||
|
<path class="cls-3" d="M118.17,70.5a.82.82,0,0,1,.27.64.86.86,0,0,1-1.73,0,.85.85,0,0,1,.69-.84l.67-2.15a3.35,3.35,0,0,0-.49,0,3,3,0,1,0,3,3,3,3,0,0,0-1.78-2.74Z"/>
|
||||||
|
<path class="cls-3" d="M129.37,68.11a4.8,4.8,0,0,0-.59,0l.35,1.31a1.6,1.6,0,0,1,.1.32l.17,0a1.31,1.31,0,1,1-1.26,1.66l-1.8,0a3,3,0,0,0,6-.27A3,3,0,0,0,129.37,68.11Z"/>
|
||||||
|
<polygon class="cls-3" points="127.05 66.03 127.05 66.03 123.56 66.03 120.08 66.03 121.71 68.28 123.56 70.85 125.44 68.28 127.05 66.03"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="26.74" width="3.71" height="3.46"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="54.17" width="3.71" height="2.97"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="50.22" width="3.71" height="2.97"/>
|
||||||
|
<rect class="cls-3" x="55.73" y="63.07" width="3.71" height="2.97"/>
|
||||||
|
<path class="cls-3" d="M214.5,17.32,197.16,0,195.1,2.05l0,0-1.41,1.38L211,20.73l1.41-1.41,0,0ZM197.16,1.53l.52.52-.52.52-.52-.52Zm-.64.4L196,1.41l.52-.52.52.52Zm15.91,15.89-.52-.52.52-.52.52.52Zm.64-.4.52.52-.52.52-.52-.52Zm-1.8.52.52-.52.52.52-.52.52Zm-.15-1.43-.57-.57.52-.52.57.57Zm.64-.4.52.52-.52.52-.52-.52Zm-1.33-.3-.52-.52.52-.52.52.52Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67L208.6,14l.52-.52.52.52Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67-.57-.57.52-.52.57.57Zm-.69-.69L206.6,12l.52-.52.52.52Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67-.52-.52.52-.52.52.52Zm-.64-.64-.57-.57.52-.52.57.57Zm-.69-.69L204,9.34l.52-.52.52.52Zm-.67-.67-.52-.52.52-.52.52.52Zm-.67-.64L202.62,8l.52-.52.52.52Zm-.64-.67L202,7.36l.52-.52.52.52Zm-.67-.64-.57-.57.52-.52.57.57Zm-.69-.69L200.61,6l.52-.52.52.52Zm-.64-.67L200,5.36l.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.12.12-.52.52-.52-.52.52-.52Zm.12.12.57.57-.52.52L197.3,4Zm.69.69.52.52-.52.52L198,4.7Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52L199.3,6Zm.67.64.52.52-.52.52L200,6.65Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52L201.31,8Zm.67.64.52.52-.52.52L202,8.65Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.67.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.64.64.52.52-.52.52-.52-.52Zm.67.67.52.52-.52.52-.52-.52Zm.64.64.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.67.52.52-.52.52-.52-.52Zm.64.64.52.52-.52.52-.52-.52Zm.67.67.52.52-.52.52-.52-.52Zm.64.64.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm1.43-.1.52-.52.52.52-.52.52Zm-.12-.12-.52-.52.52-.52.52.52Zm-.67-.67-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67-.52-.52.52-.52.52.52Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67-.57-.57.52-.52L209,12Zm-.69-.69-.52-.52.52-.52.52.52Zm-.64-.64-.52-.52.49-.54.52.52Zm-.67-.67-.52-.52.52-.52L207,10Zm-.64-.64-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.67-.67L203.93,8l.52-.52L205,8Zm-.64-.64-.52-.52.52-.52.52.52Zm-.67-.67-.52-.52.52-.52.52.52Zm-.67-.64L201.9,6l.52-.52.57.57Zm-.67-.69-.52-.52.52-.52.52.52Zm-.67-.67-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.77.77-.52.52L196,2.69l.52-.52Zm14.85,15.89.52-.52.52.52-.52.52Zm1.83-.74-.52-.52.52-.52.52.52ZM197.16.22l.52.52-.52.52-.52-.52Zm-1.29,1.31.52.52-.52.52-.52-.52Z"/>
|
||||||
|
<path class="cls-3" d="M211.24,30.27l-2.05-2.05L191.87,45.57l2.05,2.05,0,0L195.38,49l17.25-17.25-1.41-1.41Zm-1.56,0-.52.52-.52-.52.52-.52Zm-.4-.67.52-.52.52.52-.52.52ZM194.56,46.71l-.52-.52.52-.52.52.52Zm.67-.64-.52-.52.52-.52.52.52Zm13.15-14.46-.57.57-.52-.52.57-.57ZM208,31l.52-.52L209,31l-.52.52Zm-.3,1.33-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.57.57L204,35l.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm.77.52-.52-.52.57-.57.52.52Zm.69-.69-.52-.52.52-.52.52.52Zm.67-.64-.52-.52.52-.52.52.52Zm.64-.67-.52-.52.52-.52.52.52Zm.67-.64-.52-.52.52-.52.52.52Zm.64-.67-.52-.52.57-.57.52.52Zm.69-.69-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.57-.57.52.52Zm.69-.69-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.57-.57.52.52Zm.69-.69-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.52-.52.52.52Zm.64-.64-.52-.52.57-.57.52.52Zm.69-.69-.52-.52.52-.52.52.52Zm.67-.67-.52-.52.52-.52.52.52Zm-1.29-1.29-.52-.52.52-.52.52.52Zm-.12.12-.52.52-.52-.52.52-.52Zm-.67.67-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm-.64.64-.57.57-.52-.52.57-.57Zm-.69.69-.52.52-.52-.52.52-.52Zm-.67.67-.52.52-.52-.52.52-.52Zm.12.12.52.52-.52.52-.52-.52Zm-.12,1.16-.54.54-.52-.52.52-.52Zm.12.15.52.52-.52.52-.52-.52Zm16.53-15.52-.52-.52.52-.52.52.52Zm-1.26-2.35.52.52-.52.52-.52-.52ZM192.63,45l.52.52-.52.52-.52-.52Z"/>
|
||||||
|
<path class="cls-3" d="M223.05,20l2.05,2.05L242.43,4.74l-2.05-2.05,0,0-1.41-1.41L221.67,18.58,223.08,20Zm1.56,0,.52-.52.52.52-.52.52Zm.4.64-.52.52-.52-.52.52-.52ZM239.73,3.61l.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52ZM225.92,18.73l.57-.57.52.52-.57.57Zm.4.64-.52.52-.52-.52.52-.52Zm.3-1.33.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.67.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.64.52-.52.52.52-.52.52Zm.67-.67.52-.52.52.52-.52.52Zm.64-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.67.52-.52.54.52-.52.52Zm.67-.64.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52L237,8.6Zm.67-.64.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm-.77-.52.52.52-.57.57-.52-.52Zm-.69.69.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52Zm-.64.67.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52Zm-.64.67.52.52-.57.57-.52-.52Zm-.69.69.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52Zm-.64.67.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52Zm-.64.67.52.52-.57.57-.52-.52Zm-.69.69.52.52-.52.52-.52-.52Zm-.67.64.52.52-.52.52-.52-.52Zm-.64.67.52.52-.52.52-.52-.52Zm-.67.67.52.52-.57.57-.52-.52Zm-.69.69.52.52-.52.52-.52-.52Zm-.64.64.52.52-.52.52-.52-.52Zm-.67.67.52.52-.52.52-.52-.52Zm-.64.64.52.52-.52.52-.52-.52Zm-.67.67.52.52-.57.57-.52-.52Zm-.69.69.52.52-.52.52-.52-.52Zm-.64.64.52.52-.52.52-.52-.52Zm1.29,1.29.52.52-.52.52-.52-.52Zm.12-.12.52-.52.52.52-.52.52Zm.67-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.52-.54.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.57-.57L231,16l-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm.67-.64.52-.52.52.52-.52.52Zm.64-.67.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.67-.67.52-.52.52.52-.52.52Zm.64-.64.52-.52.52.52-.52.52Zm.67-.67.52-.52.52.52-.52.52Zm.64-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.67-.67.52-.52.52.52-.52.52Zm.64-.64.52-.52.52.52-.52.52Zm.67-.67.52-.52.52.52-.52.52Zm.64-.64.57-.57.52.52-.57.57Zm.69-.69.52-.52.52.52-.52.52Zm.64-.67.52-.52.52.52-.52.52Zm-.12-.12-.52-.52.52-.52.52.52Zm.15-1.16.52-.52.52.52-.52.52ZM240.38,4l-.52-.52.52-.52.52.52ZM223.82,19.52l.52.52-.52.52L223.3,20Zm1.29,2.32-.52-.52.52-.52.52.52ZM241.66,5.29l-.52-.52.52-.52.52.52Z"/>
|
||||||
|
<path class="cls-3" d="M223.89,30.22l-1.41,1.41,0,0-2.05,2.05L237.73,51l2.05-2.05,0,0,1.41-1.41Zm13.81,19.23-.52-.52.52-.52.52.52Zm.64-.4.52.52-.52.52-.52-.52Zm-14.58-14.6.57.57-.52.52-.57-.57Zm-.64.4-.52-.52.52-.52.52.52Zm1.33.3.52.52-.52.52-.52-.52Zm.64.67.52.52-.49.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.12-.12.52-.52.52.52-.52.52Zm-.12-.15-.57-.57.52-.52.57.57Zm-.69-.67-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52ZM235,45.5l-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.57-.57.52-.52.57.57Zm-.69-.69-.52-.52.52-.52.52.52Zm-.67-.64-.52-.52.52-.52.52.52Zm-.64-.67-.52-.52.52-.52.52.52Zm-.15.12-.52.52-.52-.52.52-.52Zm.15.12.52.52-.52.52-.52-.52Zm-.12,1.19-.52.52-.52-.52.52-.52Zm.12.12L223,35l-.52.52-.52-.52Zm.67.64.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.64.67L225,37l-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64L227,39l-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67L233,45l-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.64.67.57.57-.52.52-.57-.57Zm.69.69.52.52-.52.52-.52-.52Zm.67.64.52.52-.52.52-.52-.52Zm.77-.77.52-.52.52.52-.52.52ZM221.15,33.14l.52.52-.52.52-.52-.52Zm16.58,17.6-.52-.52.52-.52.52.52ZM239,49.45l-.52-.52.52-.52.52.52Z"/>
|
||||||
|
<path class="cls-3" d="M128.87,22.17h-1.36s0,4.28-2.22,6.38v2.77H131V28.54C129,26.47,128.87,22.17,128.87,22.17Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 24 KiB |
@@ -18,17 +18,25 @@
|
|||||||
(catch [:error-type :5XX] e (build-response request e)))))
|
(catch [:error-type :5XX] e (build-response request e)))))
|
||||||
|
|
||||||
|
|
||||||
|
(defn add-account-urls [user]
|
||||||
|
(let [accounts (:skirmish.broker.user/accounts user)
|
||||||
|
url #(->> % :skirmish.broker.account/id (str "http://localhost:1604/api/1/ledger/accounts/"))
|
||||||
|
ret (map #(assoc % :skirmish.broker.account/url (url %)) accounts)]
|
||||||
|
(assoc user :skirmish.broker.user/accounts ret)))
|
||||||
|
|
||||||
(defn get-user [conn]
|
(defn get-user [conn]
|
||||||
(fn [{{email :email} :route-params :as request}]
|
(fn [{{email :email} :route-params :as request}]
|
||||||
(try+
|
(try+
|
||||||
(timbre/info "getting user with email" email)
|
(timbre/info "getting user with email" email)
|
||||||
(let [db (d/db conn)
|
(let [db (d/db conn)
|
||||||
users (d/q '[:find [(pull ?e [*])]
|
users (d/q '[:find (pull ?e [:skirmish.broker.user/email
|
||||||
|
{:skirmish.broker.user/accounts [:skirmish.broker.account/id
|
||||||
|
:skirmish.broker.account/sec-id]}]) .
|
||||||
:in $ ?email
|
:in $ ?email
|
||||||
:where [?e :skirmish.broker.user/email ?email]] db email)]
|
:where [?e :skirmish.broker.user/email ?email]] db email)]
|
||||||
(if (nil? users)
|
(if (nil? users)
|
||||||
(build-response request {:status 404 :body {:error (str "cannot find user with email " email)}})
|
(build-response request {:status 404 :body {:error (str "cannot find user with email " email)}})
|
||||||
(build-response request (first users))))
|
(build-response request (add-account-urls users))))
|
||||||
(catch [:error-type :4XX] e (build-response request e))
|
(catch [:error-type :4XX] e (build-response request e))
|
||||||
(catch [:error-type :5XX] e (build-response request e)))))
|
(catch [:error-type :5XX] e (build-response request e)))))
|
||||||
|
|
||||||
|
|||||||
@@ -9,29 +9,55 @@
|
|||||||
:db/fn (d/function {:lang "clojure"
|
:db/fn (d/function {:lang "clojure"
|
||||||
:requires ['[slingshot.slingshot]]
|
:requires ['[slingshot.slingshot]]
|
||||||
:params '[db email]
|
:params '[db email]
|
||||||
:code '(let [existing-user (d/pull db '[:db/id] [:skirmish.broker.user/email email])]
|
:code '(let [existing-user (d/pull db '[:db/id] [:skirmish.broker.user/email email
|
||||||
|
:skirmish.broker.user/accounts []])]
|
||||||
(when (-> existing-user :db/id some?)
|
(when (-> existing-user :db/id some?)
|
||||||
(slingshot.slingshot/throw+ {:error-type :4XX :status 400 :body {:error "A user with this email already exists."}}))
|
(slingshot.slingshot/throw+ {:error-type :4XX :status 400 :body {:error "A user with this email already exists."}}))
|
||||||
[#:skirmish.broker.user{:email email}])})}])
|
[#:skirmish.broker.user{:email email}])})}])
|
||||||
|
|
||||||
|
|
||||||
|
(def accounts-schema [
|
||||||
|
{
|
||||||
|
:db/ident :skirmish.broker.account/id
|
||||||
|
:db/unique :db.unique/identity
|
||||||
|
:db/valueType :db.type/uuid
|
||||||
|
:db/cardinality :db.cardinality/one
|
||||||
|
:db/doc "The id of an account."}
|
||||||
|
{
|
||||||
|
:db/ident :skirmish.broker.account/sec-id
|
||||||
|
:db/valueType :db.type/keyword
|
||||||
|
:db/cardinality :db.cardinality/one
|
||||||
|
:db/doc "The security if of the account."}
|
||||||
|
{
|
||||||
|
:db/ident :skirmish.broker.account/private-key
|
||||||
|
:db/valueType :db.type/string
|
||||||
|
:db/cardinality :db.cardinality/one
|
||||||
|
:db/doc "The private key of the account."}])
|
||||||
|
|
||||||
|
|
||||||
(def user-schema [
|
(def user-schema [
|
||||||
{
|
{
|
||||||
:db/ident :skirmish.broker.user/email
|
:db/ident :skirmish.broker.user/email
|
||||||
:db/unique :db.unique/identity
|
:db/unique :db.unique/identity
|
||||||
:db/valueType :db.type/string
|
:db/valueType :db.type/string
|
||||||
:db/cardinality :db.cardinality/one
|
:db/cardinality :db.cardinality/one
|
||||||
|
:db/doc "The email of the user; used as id."}
|
||||||
|
{
|
||||||
|
:db/ident :skirmish.broker.user/accounts
|
||||||
|
:db/unique :db.unique/identity
|
||||||
|
:db/valueType :db.type/ref
|
||||||
|
:db/cardinality :db.cardinality/many
|
||||||
:db/doc "The email of the user; used as id."}])
|
:db/doc "The email of the user; used as id."}])
|
||||||
|
|
||||||
|
|
||||||
(def schema (-> []
|
(def schema (-> []
|
||||||
(concat user-schema)
|
(concat user-schema)
|
||||||
(concat create-user)))
|
(concat create-user)
|
||||||
|
(concat accounts-schema)))
|
||||||
|
|
||||||
(defn create-connection [uri]
|
(defn create-connection [uri]
|
||||||
(let [new-db? (d/create-database uri)
|
(let [new-db? (d/create-database uri)
|
||||||
conn (d/connect uri)]
|
conn (d/connect uri)]
|
||||||
(when new-db?
|
@(d/transact conn schema)
|
||||||
@(d/transact conn schema))
|
|
||||||
conn))
|
conn))
|
||||||
|
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
trades-submitter
|
trades-submitter
|
||||||
orders-submitter)))
|
orders-submitter)))
|
||||||
|
|
||||||
|
|
||||||
(defn -main [config securities-api exchange-apis-mult-chan]
|
(defn -main [config securities-api exchange-apis-mult-chan]
|
||||||
(let [ch (async/chan)]
|
(let [ch (async/chan)]
|
||||||
(async/tap exchange-apis-mult-chan ch)
|
(async/tap exchange-apis-mult-chan ch)
|
||||||
|
|||||||
@@ -54,7 +54,6 @@
|
|||||||
:db/cardinality :db.cardinality/one
|
:db/cardinality :db.cardinality/one
|
||||||
:db/unique :db.unique/identity
|
:db/unique :db.unique/identity
|
||||||
:db/doc "The type of security. For instance :equity or :currency."}
|
:db/doc "The type of security. For instance :equity or :currency."}
|
||||||
|
|
||||||
{
|
{
|
||||||
:db/ident :skirmish.security/description
|
:db/ident :skirmish.security/description
|
||||||
:db/valueType :db.type/string
|
:db/valueType :db.type/string
|
||||||
@@ -81,7 +80,6 @@
|
|||||||
|
|
||||||
(def ledger-schema
|
(def ledger-schema
|
||||||
[
|
[
|
||||||
|
|
||||||
{
|
{
|
||||||
:db/ident :skirmish.ledger/owner-public-key
|
:db/ident :skirmish.ledger/owner-public-key
|
||||||
:db/unique :db.unique/identity
|
:db/unique :db.unique/identity
|
||||||
@@ -101,14 +99,12 @@
|
|||||||
:db/cardinality :db.cardinality/one
|
:db/cardinality :db.cardinality/one
|
||||||
:db/doc "The sec kept in this account."}])
|
:db/doc "The sec kept in this account."}])
|
||||||
|
|
||||||
|
|
||||||
(def schema (-> []
|
(def schema (-> []
|
||||||
(concat schema-securities)
|
(concat schema-securities)
|
||||||
(concat ledger-schema)
|
(concat ledger-schema)
|
||||||
(concat create-securities)
|
(concat create-securities)
|
||||||
(concat print-securities)))
|
(concat print-securities)))
|
||||||
|
|
||||||
|
|
||||||
(defn create-connection [uri]
|
(defn create-connection [uri]
|
||||||
(let [new-db? (d/create-database uri)
|
(let [new-db? (d/create-database uri)
|
||||||
conn (d/connect uri)]
|
conn (d/connect uri)]
|
||||||
|
|||||||
@@ -58,16 +58,23 @@
|
|||||||
:emitter string?
|
:emitter string?
|
||||||
:symbol (s/? string?)))
|
:symbol (s/? string?)))
|
||||||
|
|
||||||
|
|
||||||
(defn get-new-security [raw-securities]
|
(defn get-new-security [raw-securities]
|
||||||
(if (s/valid? ::security raw-securities)
|
(if (s/valid? ::security raw-securities)
|
||||||
raw-securities
|
raw-securities
|
||||||
(throw+ {:error-type :4XX :status 400 :body {:error "Invalid security format."}})))
|
(throw+ {:error-type :4XX :status 400 :body {:error "Invalid security format."}})))
|
||||||
|
|
||||||
(defn get-security-from-db [conn sec-id]
|
(defn get-security-from-db [conn sec-id]
|
||||||
(let [e (d/pull (d/db conn) '[*] [:skirmish.security/sec-id sec-id])
|
(let [db (d/db conn)
|
||||||
{interest-rate :skirmish.security/interest-rate id :db/id} e
|
e (d/pull db '[*] [:skirmish.security/sec-id sec-id])
|
||||||
ret {:sec-id sec-id :interest-rate interest-rate}]
|
{interest-rate :skirmish.security/interest-rate
|
||||||
|
description :skirmish.security/description
|
||||||
|
id :db/id
|
||||||
|
type_ :skirmish.security/type} e
|
||||||
|
volume (d/q '[:find (sum ?a) .
|
||||||
|
:where [?e :skirmish.ledger/amount ?a]
|
||||||
|
[?e :skirmish.ledger/owner-public-key ?pk]]
|
||||||
|
db)
|
||||||
|
ret {:sec-id sec-id :interest-rate interest-rate :volume volume :type type_ :description description}]
|
||||||
(if (nil? id)
|
(if (nil? id)
|
||||||
(throw+ {:error-type :4XX :status 404 :body {:error "Security not found."}})
|
(throw+ {:error-type :4XX :status 404 :body {:error "Security not found."}})
|
||||||
ret)))
|
ret)))
|
||||||
@@ -156,15 +163,15 @@
|
|||||||
|
|
||||||
(defn create-routes-for-ledger [securities conn]
|
(defn create-routes-for-ledger [securities conn]
|
||||||
(routes
|
(routes
|
||||||
(context "/api/1" []
|
(context "/api/1/ledger" []
|
||||||
(GET "/" get-api-description)
|
(GET "/" get-api-description)
|
||||||
(GET "/ledger/accounts" [] (get-available-accounts conn))
|
(GET "/accounts" [] (get-available-accounts conn))
|
||||||
(GET "/ledger/accounts/:account-id" [] (get-account conn))
|
(GET "/accounts/:account-id" [] (get-account conn))
|
||||||
(GET "/ledger/securities" [] (get-available-securities conn)) ;; done
|
(GET "/securities" [] (get-available-securities conn)) ;; done
|
||||||
(POST "/ledger/securities" [] (create-security conn)) ;; done
|
(POST "/securities" [] (create-security conn)) ;; done
|
||||||
(GET "/ledger/securities/:sec-id" [] (get-security conn)) ;; done
|
(GET "/securities/:sec-id" [] (get-security conn)) ;; done
|
||||||
(PUT "/ledger/securities/:sec-id" [] (update-security conn)) ;; not done
|
(PUT "/securities/:sec-id" [] (update-security conn)) ;; not done
|
||||||
(POST "/ledger/securities/:sec-id" [] (emit-securities conn))) ;; done
|
(POST "/securities/:sec-id" [] (emit-securities conn))) ;; done
|
||||||
(not-found "not found")))
|
(not-found "not found")))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,6 @@
|
|||||||
[cljs.core.async :refer [<!] :refer-macros [go]]
|
[cljs.core.async :refer [<!] :refer-macros [go]]
|
||||||
[secretary.core :as secretary]))
|
[secretary.core :as secretary]))
|
||||||
|
|
||||||
|
|
||||||
(def lorem-ipsum ["Lorem ipsum dolor amet pickled bushwick next level adaptogen ugh franzen salvia hoodie man bun organic kinfolk. Hammock pickled banjo, artisan single-origin coffee brunch 90's occupy taxidermy. Put a bird on it gentrify offal tilde. Authentic put a bird on it prism semiotics, roof party banh mi typewriter. XOXO schlitz sriracha godard."
|
|
||||||
"Succulents shoreditch twee, VHS hammock hot chicken distillery. Edison bulb aesthetic pork belly meggings. 3 wolf moon artisan keytar blue bottle. Actually pok pok asymmetrical, banh mi before they sold out PBR&B portland tumblr."
|
|
||||||
"Gentrify palo santo enamel pin, tumeric jianbing thundercats shaman green juice chambray yr. Kale chips synth meditation chambray thundercats helvetica, cornhole whatever kickstarter ennui pop-up lo-fi godard. Austin unicorn brunch woke hammock. Coloring book kombucha occupy tofu wayfarers."])
|
|
||||||
|
|
||||||
|
|
||||||
(defn email? [s]
|
(defn email? [s]
|
||||||
(let [email-pattern #"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"]
|
(let [email-pattern #"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"]
|
||||||
(->> s str (re-matches email-pattern) some?)))
|
(->> s str (re-matches email-pattern) some?)))
|
||||||
@@ -49,7 +43,5 @@
|
|||||||
[:div
|
[:div
|
||||||
[:section.section
|
[:section.section
|
||||||
[:div.container
|
[:div.container
|
||||||
[:h1.title "lorem ipsum"]
|
[:img {:src "/images/amsterdam.svg"}]
|
||||||
[login state]
|
[login state]]]])
|
||||||
(for [[i sentence] (map vector (range) lorem-ipsum)]
|
|
||||||
[:p {:key i} sentence])]]])
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
(:require [reagent.core :refer [atom]]
|
(:require [reagent.core :refer [atom]]
|
||||||
[skirmish.wui.components.secunit :refer [secunit]]))
|
[skirmish.wui.components.secunit :refer [secunit]]))
|
||||||
|
|
||||||
|
|
||||||
(defn make-portfolio-summary-table [portfolio]
|
(defn make-portfolio-summary-table [portfolio]
|
||||||
[:table
|
[:table
|
||||||
[:thead
|
[:thead
|
||||||
@@ -13,9 +14,11 @@
|
|||||||
[:td [secunit (:sec-id sec-summary) (:amount sec-summary)]]
|
[:td [secunit (:sec-id sec-summary) (:amount sec-summary)]]
|
||||||
[:td [secunit :dapm (:face-value sec-summary)]]])]])
|
[:td [secunit :dapm (:face-value sec-summary)]]])]])
|
||||||
|
|
||||||
(defn page []
|
|
||||||
|
(defn page [{{accounts :skirmish.broker.user/accounts} :user}]
|
||||||
(let [porfolio [{:id 12 :sec-id :foo :amount 100 :face-value 1265}
|
(let [porfolio [{:id 12 :sec-id :foo :amount 100 :face-value 1265}
|
||||||
{:id 54 :sec-id :toto :amount 100 :face-value 1265}
|
{:id 54 :sec-id :toto :amount 100 :face-value 1265}
|
||||||
{:id 66 :sec-id :foo :amount 100 :face-value 1265}]]
|
{:id 66 :sec-id :foo :amount 100 :face-value 1265}]]
|
||||||
[:div.content
|
[:div.content
|
||||||
|
[:pre (str accounts)]
|
||||||
(make-portfolio-summary-table porfolio)]))
|
(make-portfolio-summary-table porfolio)]))
|
||||||
@@ -15,12 +15,14 @@
|
|||||||
[:li done "implement basic login in the wui"]
|
[:li done "implement basic login in the wui"]
|
||||||
[:li done "implement basic web server"]
|
[:li done "implement basic web server"]
|
||||||
[:li done "implement stupid login on server side."]
|
[:li done "implement stupid login on server side."]
|
||||||
[:li on-it "link the logic of the client-server login logic"]
|
[:li done "link the logic of the client-server login logic"]
|
||||||
[:li "add the notion of 'accounts' in the server. An
|
[:li done "add the notion of 'accounts' in the server. An
|
||||||
user should have many accounts; one for each security
|
user should have many accounts; one for each security
|
||||||
he owns"]
|
he owns"]
|
||||||
[:li "make the " [:a {:href "/portfolio"} "portfolio"] " page representing the use accounts"]
|
[:li on-it "make the " [:a {:href "/portfolio"} "portfolio"] " page representing the use accounts"]
|
||||||
|
[:li "Make sure the ledger can have accounts"]
|
||||||
[:li "when a new user logs in, he should receive some sort of money"]
|
[:li "when a new user logs in, he should receive some sort of money"]
|
||||||
|
[:li "\u22EE"]
|
||||||
[:li "implement buy/sell securities."]]]
|
[:li "implement buy/sell securities."]]]
|
||||||
|
|
||||||
[:li "Cleaning up..."
|
[:li "Cleaning up..."
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
[skirmish.wui.components.topbar :refer [top-bar]]
|
[skirmish.wui.components.topbar :refer [top-bar]]
|
||||||
[reagent.session :as session]
|
[reagent.session :as session]
|
||||||
[cljs-http.client :as http]
|
[cljs-http.client :as http]
|
||||||
;[taoensso.timbre :as timbre :refer-macros [info warn]]
|
|
||||||
[cljs.core.async :refer [<!] :refer-macros [go]]
|
[cljs.core.async :refer [<!] :refer-macros [go]]
|
||||||
[secretary.core :as secretary :include-macros true]
|
[secretary.core :as secretary :include-macros true]
|
||||||
[accountant.core :as accountant]))
|
[accountant.core :as accountant]))
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
(ns skirmish.broker.broker-test
|
||||||
|
(:require [midje.sweet :refer :all]
|
||||||
|
[orchestra.spec.test :as st]
|
||||||
|
[skirmish.broker.broker :refer [add-account-urls]]))
|
||||||
|
|
||||||
|
(st/instrument)
|
||||||
|
|
||||||
|
|
||||||
|
(facts "the broker util functions"
|
||||||
|
(fact "it should be able to add url to accounts"
|
||||||
|
(let [user {:skirmish.broker.user/accounts [{:skirmish.broker.account/id "foo"}]}
|
||||||
|
ret {:skirmish.broker.user/accounts [{:skirmish.broker.account/id "foo"
|
||||||
|
:skirmish.broker.account/url "http://localhost:1604/api/1/ledger/accounts/foo"}]}]
|
||||||
|
(add-account-urls user) => ret)))
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
(ns skirmish.exchange.exchange-test
|
(ns skirmish.exchange.exchange-test
|
||||||
(:import [skirmish.PersistentSortedList])
|
(:import (skirmish PersistentSortedList))
|
||||||
(:require [midje.sweet :refer :all]
|
(:require [midje.sweet :refer :all]
|
||||||
[orchestra.spec.test :as st]
|
[orchestra.spec.test :as st]
|
||||||
[skirmish.exchange.exchange :refer :all]
|
[skirmish.exchange.exchange :refer :all]
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
(st/instrument)
|
(st/instrument)
|
||||||
|
|
||||||
(def PersistentSortedList? (comp #(= % skirmish.PersistentSortedList) type))
|
(def PersistentSortedList? (comp #(= % PersistentSortedList) type))
|
||||||
|
|
||||||
(facts "the exchange as an whole"
|
(facts "the exchange as an whole"
|
||||||
(fact "process-sell-order should work when book empty"
|
(fact "process-sell-order should work when book empty"
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
(def mock-currencies [[:zimbabwean-dollar 1000000 :currency "zimbabwean dollar" "rot13" "zd"]])
|
(def mock-currencies [[:zimbabwean-dollar 1000000 :currency "zimbabwean dollar" "rot13" "zd"]])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defn create-some-securities [conn]
|
(defn create-some-securities [conn]
|
||||||
(let [cs (create-security conn)
|
(let [cs (create-security conn)
|
||||||
create-security-1 {:body (edn->stream (get mock-securities 0)) :headers {"accept" "application/edn"}}
|
create-security-1 {:body (edn->stream (get mock-securities 0)) :headers {"accept" "application/edn"}}
|
||||||
@@ -101,7 +99,7 @@
|
|||||||
request {:route-params {:sec-id :new-currency} :headers {"accept" "application/edn"}}
|
request {:route-params {:sec-id :new-currency} :headers {"accept" "application/edn"}}
|
||||||
resp ((get-security conn) request)]
|
resp ((get-security conn) request)]
|
||||||
resp => (spec-check ::ok)
|
resp => (spec-check ::ok)
|
||||||
(body resp) => {:sec-id :new-currency :interest-rate 100}))
|
(body resp) => {:sec-id :new-currency :interest-rate 100 :description nil :type nil :volume nil}))
|
||||||
|
|
||||||
(fact "we should not be able to get-security if it does not exists"
|
(fact "we should not be able to get-security if it does not exists"
|
||||||
(let [conn (create-conn)
|
(let [conn (create-conn)
|
||||||
|
|||||||
Reference in new issue
Block a user