99 "threshold" : 2.0 ,
1010 "interval_sec" : 1 ,
1111 "coins" : [" BTC" , " ETH" , " XRP" ],
12- "buy_group " : {
12+ "group_a " : {
1313 "quote_currency" : " USDT" ,
1414 "exchanges" : [" bybit" ]
1515 },
16- "sell_group " : {
16+ "group_b " : {
1717 "quote_currency" : " KRW" ,
1818 "exchanges" : [" upbit" ]
1919 },
@@ -71,8 +71,8 @@ Same as single binary config, plus `listen_port`. Credentials are **not** needed
7171| ` threshold ` | Premium percentage that triggers a trade |
7272| ` interval_sec ` | Display table refresh interval (seconds) |
7373| ` coins ` | Coins to monitor/trade (e.g., ` ["BTC", "ETH", "XRP"] ` ) |
74- | ` buy_group ` | Exchanges to buy on — ` quote_currency ` + exchange names |
75- | ` sell_group ` | Exchanges to sell on — ` quote_currency ` + exchange names |
74+ | ` group_a ` | Exchange group A — ` quote_currency ` + exchange names |
75+ | ` group_b ` | Exchange group B — ` quote_currency ` + exchange names |
7676| ` cross_rate ` | Currency conversion config (averaged mid-price from ` sources ` ) |
7777| ` trade.* ` | See [ Trading] ( trading.md#configuration ) |
7878| ` listen_port ` | Master TCP listen port (master config only) |
@@ -107,7 +107,7 @@ Environment variables take precedence over the config file.
107107```
108108./spot_arb [--config <path>] [--threshold <pct>] [--interval <sec>]
109109 [--web PORT] [--dry-run] [--benchmark] [--bench-rounds N]
110- [--latency-log <path>]
110+ [--bench-warmup N] [-- latency-log <path>] [--trade-db <path>]
111111```
112112
113113| Flag | Default | Description |
@@ -118,8 +118,10 @@ Environment variables take precedence over the config file.
118118| ` --web PORT ` | * (off)* | Start web dashboard on PORT |
119119| ` --dry-run ` | * (off)* | Simulate trades without placing real orders |
120120| ` --benchmark ` | * (off)* | Run order latency benchmark and exit |
121- | ` --bench-rounds ` | ` 5 ` | Number of benchmark rounds |
122- | ` --latency-log ` | * (off)* | CSV file for trade execution data |
121+ | ` --bench-rounds ` | ` 20 ` | Number of benchmark rounds |
122+ | ` --bench-warmup ` | ` 5 ` | Number of benchmark warmup rounds |
123+ | ` --latency-log ` | * (off)* | CSV file for trade latency data (truncated on restart) |
124+ | ` --trade-db ` | * (off)* | SQLite database for persistent trade history |
123125
124126### ` spot_master `
125127
@@ -200,21 +202,22 @@ graph TD
200202
201203### systemd service files
202204
203- === "Master "
205+ === "Single Binary "
204206
205207 ```ini
206- # /etc/systemd/system/spot-master .service
208+ # /etc/systemd/system/spot-arb .service
207209 [Unit]
208- Description=Spot Arbitrage Master
210+ Description=Spot Arbitrage
209211 After=network.target
210212
211213 [Service]
212214 Type=simple
213215 User=ubuntu
214216 WorkingDirectory=/home/ubuntu/spot_arbitrage
215- ExecStart=/home/ubuntu/spot_arbitrage/build/spot_master \
216- --config config_master.json \
217- --latency-log /var/log/spot_trades.csv
217+ ExecStart=/home/ubuntu/spot_arbitrage/build/spot_arb \
218+ --config config.json \
219+ --latency-log /var/log/spot_trades.csv \
220+ --trade-db /var/lib/spot_arb/trades.db
218221 Restart=always
219222 RestartSec=3
220223 LimitNOFILE=65536
@@ -223,20 +226,21 @@ graph TD
223226 WantedBy=multi-user.target
224227 ```
225228
226- === "Slave "
229+ === "Master "
227230
228231 ```ini
229- # /etc/systemd/system/spot-slave .service
232+ # /etc/systemd/system/spot-master .service
230233 [Unit]
231- Description=Spot Arbitrage Slave
234+ Description=Spot Arbitrage Master
232235 After=network.target
233236
234237 [Service]
235238 Type=simple
236239 User=ubuntu
237240 WorkingDirectory=/home/ubuntu/spot_arbitrage
238- ExecStart=/home/ubuntu/spot_arbitrage/build/spot_slave \
239- --config config_slave.json
241+ ExecStart=/home/ubuntu/spot_arbitrage/build/spot_master \
242+ --config config_master.json \
243+ --latency-log /var/log/spot_trades.csv
240244 Restart=always
241245 RestartSec=3
242246 LimitNOFILE=65536
@@ -245,21 +249,20 @@ graph TD
245249 WantedBy=multi-user.target
246250 ```
247251
248- === "Single Binary "
252+ === "Slave "
249253
250254 ```ini
251- # /etc/systemd/system/spot-arb .service
255+ # /etc/systemd/system/spot-slave .service
252256 [Unit]
253- Description=Spot Arbitrage
257+ Description=Spot Arbitrage Slave
254258 After=network.target
255259
256260 [Service]
257261 Type=simple
258262 User=ubuntu
259263 WorkingDirectory=/home/ubuntu/spot_arbitrage
260- ExecStart=/home/ubuntu/spot_arbitrage/build/spot_arb \
261- --config config.json \
262- --latency-log /var/log/spot_trades.csv
264+ ExecStart=/home/ubuntu/spot_arbitrage/build/spot_slave \
265+ --config config_slave.json
263266 Restart=always
264267 RestartSec=3
265268 LimitNOFILE=65536
0 commit comments