-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamends.html
49 lines (45 loc) · 1.93 KB
/
amends.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<html>
<body>
<h1>Solution for Making Amends</h1>
<h2>Getting the accounts</h2>
<p>
The first step is getting the accounts that are trading the stock.
Luckily the DELETE command leaks information in the error message. If
you try to delete an order that isn't yours, it will happily tell you
who it actually belongs to. Also worth nothing is that if you try to
delete an order that doesn't exist, it will tell you the currently
highest order ID. Might be handy in the future.
</p>
<h2>Getting account orders</h2>
<p>
Once we have the accounts, we have to get their trades. The execution
tape requires no authentication other than the account, which we now
have. So, we:
<ul>
<li>Bootstrap by finding the accounts for the 50 first orders.</li>
<li>Start a websocket for each account, and gather the orders they make.</li>
<li>If we get an execution, where one of the order IDs are unknown,
we look up who made the order, and start a new websocket if this is
a new account.</li>
<li>Rinse and repeat, finally draw fancy graphs once we have enough orders.</li>
</ul>
</p>
<h2>The proof</h2>
<img src=HAT96103587.png>
<p>
The HAT96103587 account has some rather weird trading patterns. I can't
really say that this image shows definitive proof that he's insider
trading, but he was the one that stood out. I also had some trouble
with the websockets, so I wasn't able to gather as much information as
I'd like. The websockets died with this
</p>
<p>
<q>
Internal server error (w/ message broker) when attempting to establish websocket
</q>
</p>
<p>
error message after a couple thousands orders.
</p>
</body>
</html>