Match complementary binary orders and settle paired issuance or merge
This commit is contained in:
@@ -43,7 +43,14 @@ impl Exchange {
|
||||
if payload == json!({"op":"state"}) {
|
||||
let tx = self.db.transaction()?;
|
||||
let mut state = Map::new();
|
||||
for table in ["accounts", "markets", "positions", "orders", "fills"] {
|
||||
for table in [
|
||||
"accounts",
|
||||
"markets",
|
||||
"positions",
|
||||
"orders",
|
||||
"fills",
|
||||
"paired_fills",
|
||||
] {
|
||||
let mut stmt = tx.prepare(&format!("SELECT * FROM {table} ORDER BY rowid"))?;
|
||||
let names: Vec<String> =
|
||||
stmt.column_names().into_iter().map(str::to_owned).collect();
|
||||
|
||||
Reference in New Issue
Block a user