You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21-13Lines changed: 21 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
2
2
3
3
# High level
4
4
5
-
Builds a live orderbook from http snapshots from N configurable exchanges and updates it through
6
-
websocket depth updates. After a update the best ten asks and bids aswell as well as the spread
7
-
are provided through a grpc server endpoint
5
+
Builds a live orderbook from http snapshots from N configurable exchanges and then updates the orderbook
6
+
through soft real time websocket depth updates. After a update the best ten asks and bids aswell as well
7
+
as the spread are provided through a grpc server endpoint
8
8
9
9
# Lower level
10
10
@@ -13,13 +13,18 @@ pinned threads.
13
13
14
14
Orderbook is ran with multiplie threads. One for writing to the book the others for reading it.
15
15
16
+
## Orderbook structure
17
+
18
+
// todo -- update my reasoning here ... on why i didn't just use a simple red black tree
19
+
16
20
# Configuration
17
21
18
22
Exchange boots through a config by running `./orderbook-quoter-server --config=$(CONFIG_LOCATION)`. The
19
23
amount of exchanges in the exchange array must be equal to the orderbook's `exchange_count`. Every
20
24
`depth` field must be equal in the exchanges and orderbook's depth field should cover the entire
21
-
expected trading range for the lifetime of this service. The larger expected volatility the higher the orderbook's
22
-
depth needs to be.
25
+
expected trading range for the lifetime of this service.
26
+
27
+
The larger expected volatility the higher the orderbook's depth needs to be.
23
28
24
29
```
25
30
exchanges:
@@ -85,9 +90,9 @@ Wrapper around exchange stream to handle websocket sinks and other functionality
85
90
86
91
### DepthDriver
87
92
88
-
Provides a controlling interface to all exchange streams.
93
+
Provides a controlling interface to all exchange streams that push depths.
89
94
90
-
Future work:
95
+
#### Future work:
91
96
92
97
(1) Needs to handle orderbook reset and orderbook snapshot
93
98
retriggering with correct sequencing (https://github.com/binance/binance-spot-api-docs/blob/master/web-socket-streams.md#how-to-manage-a-local-order-book-correctly)
@@ -104,7 +109,7 @@ Has 2 states:
104
109
105
110
(2) Updating the the orderbook with ws depths and then reading the orderbook for best deals
106
111
107
-
Future work:
112
+
#### Future work:
108
113
109
114
(1) A state when the orderbook is needs rebuilding if a ExchangeStream websocket connection fails.
110
115
@@ -122,24 +127,27 @@ Future work:
122
127
123
128
#### 1. Depth Generator
124
129
125
-
Generates depths in many different sequences.
130
+
Generates depths in many different sequences: upward, downward through
131
+
hacking a brownian motion stochastic process.
126
132
127
-
Future Work:
133
+
##### Future Work:
128
134
129
135
Oscillating Depths rather then just upward and downward trends
130
136
131
137
#### 2. Exchange Stubs
132
138
133
-
Provides both HTTP and websocket endpoints for depths. Leverages depth generator.
139
+
Provides both HTTP and websocket endpoints for depths. Leverages depth generator
140
+
as a dependency.
134
141
135
142
#### 3. Exchange Server
136
143
137
-
Dockerized exchange stub for full integration testing.
144
+
Dockerized exchange stub for full integration testing. Leverages exchange stub as a
145
+
dependency.
138
146
139
147
### Quote GRPC Server
140
148
141
149
Takes the spread and provides the best ten deals and asks to a grpc client
0 commit comments