Derive market order protection from visible opposing depth

This commit is contained in:
2026-12-03 07:18:25 +08:00
parent f90605bfc7
commit 5d82be0091
10 changed files with 201 additions and 33 deletions
+13
View File
@@ -0,0 +1,13 @@
{"op":"list","id":"list","market":"fixture","rules":"Simulated result","tick_size":"0.01"}
{"op":"fund","id":"a","account":"maker","cents":2000}
{"op":"fund","id":"b","account":"taker","cents":1000}
{"op":"split","id":"mint","market":"fixture","account":"maker","qty":7}
{"op":"open","id":"start","market":"fixture"}
{"op":"order","id":"ordinary","asset_id":"eb:YES:fixture","account":"maker","side":"sell","price":40,"qty":2}
{"op":"order","id":"complement","asset_id":"eb:NO:fixture","account":"maker","side":"buy","price":50,"qty":3}
{"op":"estimate","asset_id":"eb:YES:fixture","side":"buy","amount_cents":231,"tif":"FOK"}
{"op":"estimate","asset_id":"eb:YES:fixture","side":"buy","amount_cents":231,"tif":"FAK"}
{"op":"market_buy","id":"take","asset_id":"eb:YES:fixture","account":"taker","amount_cents":180,"tif":"FOK"}
{"op":"order","id":"bid-low","asset_id":"eb:YES:fixture","account":"maker","side":"buy","price":20,"qty":2}
{"op":"order","id":"bid-high","asset_id":"eb:YES:fixture","account":"maker","side":"buy","price":30,"qty":2}
{"op":"market_sell","id":"sell","asset_id":"eb:YES:fixture","account":"taker","qty":3,"tif":"FOK"}