Index: bots/main.go
===================================================================
--- bots/main.go	(revision b715712c7d5d3ee27c932a8a9d8e0a2bc6e85127)
+++ bots/main.go	(revision ef1c1c725137d93fa85292f43440214aaddcdf05)
@@ -84,4 +84,12 @@
 			log.Printf("  %-8s  %.6f  qty=%.4f  side=%s", m.symbol, m.price, qty, side)
 		}
+		// P7 background job: the prices just moved, so fill any resting
+		// limit order the new market price has reached.
+		var filled int
+		if err := db.QueryRow(`SELECT fill_marketable_orders()`).Scan(&filled); err != nil {
+			log.Printf("fill_marketable_orders: %v", err)
+		} else if filled > 0 {
+			log.Printf("  filled %d resting limit order(s) at the new market price", filled)
+		}
 		time.Sleep(*interval)
 	}
