feat: pause log, asymmetry and daily summary for 1Click quote probes
The probe record from 6b3bf76 says, minute by minute, whether 1Click
quoted QTC. This turns it into the episodes a reader looks for.
- Pauses: runs of consecutive unquoted minutes per direction and pair,
found by blackbeard_core::quote_probe::pauses on the every-minute probes
only. A quote ends a pause. An unanswered minute does not, since nothing
is known about it, so it is counted inside. More than 15 minutes
without answers ends a pause as unobserved, not as continuing unseen.
Each pause carries how many of its minutes a solver alone could have
filled it, and the pool's price at its start, at its end, and 1 and 4
hours after. The price comes from the probe's own pool readings, not
from any quote, and the note says a later price move is not evidence
of why a pause happened.
- Asymmetry: per counter, buy availability minus sell availability.
- Daily summary: per UTC day over the last month, rendered as UTC days.
Pauses are computed with a day of lookback before the window, and one
already under way at the start of the record is marked as such.
Refs #45
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015tyzzRVjH9AdwGtYwsH5VC
This commit is contained in:
+60
@@ -0,0 +1,60 @@
|
||||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n select date_trunc('day', at, 'UTC') as \"day!\", direction, counter,\n count(*) filter (where outcome <> 'failed') as \"answered!\",\n count(*) filter (where outcome = 'quoted') as \"quoted!\",\n count(*) filter (where outcome = 'no_liquidity' and solvers_able > 0)\n as \"while_able!\",\n count(*) filter (where outcome = 'failed') as \"failed!\"\n from quote_probe\n where chain = $1 and asset = $2 and at >= $3\n group by 1, 2, 3\n order by 1 desc, 2, 3\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "day!",
|
||||
"type_info": "Timestamptz"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "direction",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "counter",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 3,
|
||||
"name": "answered!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 4,
|
||||
"name": "quoted!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 5,
|
||||
"name": "while_able!",
|
||||
"type_info": "Int8"
|
||||
},
|
||||
{
|
||||
"ordinal": 6,
|
||||
"name": "failed!",
|
||||
"type_info": "Int8"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text",
|
||||
"Text",
|
||||
"Timestamptz"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"hash": "96059d0f7ccb72eb51db5603f94b8df57b3d53185b2d2074c0a9e4731a80eb9d"
|
||||
}
|
||||
Reference in New Issue
Block a user