Changeset ef1c1c7 for bots


Ignore:
Timestamp:
09/24/26 17:43:19 (6 days ago)
Author:
Stefan <trsunovstefan@…>
Branches:
main
Children:
0cee8ec
Parents:
a531b45
Message:

Wiki docs, phase 6 and phase 7 added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bots/main.go

    ra531b45 ref1c1c7  
    8484                        log.Printf("  %-8s  %.6f  qty=%.4f  side=%s", m.symbol, m.price, qty, side)
    8585                }
     86                // P7 background job: the prices just moved, so fill any resting
     87                // limit order the new market price has reached.
     88                var filled int
     89                if err := db.QueryRow(`SELECT fill_marketable_orders()`).Scan(&filled); err != nil {
     90                        log.Printf("fill_marketable_orders: %v", err)
     91                } else if filled > 0 {
     92                        log.Printf("  filled %d resting limit order(s) at the new market price", filled)
     93                }
    8694                time.Sleep(*interval)
    8795        }
Note: See TracChangeset for help on using the changeset viewer.