Serve last execution prices and directions for individual and batch token queries

This commit is contained in:
2026-12-03 09:25:44 +08:00
parent 9b25fdc424
commit b523a8890f
11 changed files with 220 additions and 16 deletions
+12
View File
@@ -15,3 +15,15 @@ GET http://127.0.0.1:9002/v2/prices-history?token_id=eb%3AYES%3Ademo&interval=1h
### Replace the cursor placeholder with pagination.next_cursor from the previous response
GET http://127.0.0.1:9002/v2/prices-history?token_id=eb%3AYES%3Ademo&cursor={{next_cursor}}
### Last execution for one outcome
GET http://127.0.0.1:9002/last-trade-price?token_id=eb%3AYES%3Ademo
### Last executions for both outcomes from one SQLite snapshot
GET http://127.0.0.1:9002/last-trades-prices?token_ids=eb%3AYES%3Ademo%2Ceb%3ANO%3Ademo
### Batch last executions in JSON
POST http://127.0.0.1:9002/last-trades-prices
Content-Type: application/json
[{"token_id":"eb:YES:demo"},{"token_id":"eb:NO:demo"}]