Expose exact midpoint quotes for individual and batched assets

This commit is contained in:
2026-12-03 09:59:12 +08:00
parent d26c801888
commit b47058d75e
8 changed files with 180 additions and 49 deletions
+12
View File
@@ -48,3 +48,15 @@ POST http://127.0.0.1:9002/spreads
Content-Type: application/json
[{"token_id":"eb:YES:demo"},{"token_id":"eb:NO:demo"}]
### Load midpoint.jsonl into the same database first. Expected mid is "0.085".
GET http://127.0.0.1:9002/midpoint?token_id=eb%3AYES%3Amid-example
### Midpoints for YES and NO are "0.085" and "0.915".
GET http://127.0.0.1:9002/midpoints?token_ids=eb%3AYES%3Amid-example%2Ceb%3ANO%3Amid-example
### Same query with a JSON body
POST http://127.0.0.1:9002/midpoints
Content-Type: application/json
[{"token_id":"eb:YES:mid-example"},{"token_id":"eb:NO:mid-example"}]