feat(V2): X-Bot-Tag header obbligatorio + endpoint /admin/audit con filtri
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,7 @@ def _configure_audit_sink() -> None:
|
||||
def audit_write_op(
|
||||
*,
|
||||
actor: str | None = None,
|
||||
bot_tag: str | None = None,
|
||||
action: str,
|
||||
exchange: str,
|
||||
target: str | None = None,
|
||||
@@ -78,6 +79,7 @@ def audit_write_op(
|
||||
|
||||
actor: identificatore di chi ha invocato (es. "testnet", "mainnet",
|
||||
oppure None per logging anonimo).
|
||||
bot_tag: identificatore del bot chiamante (header X-Bot-Tag).
|
||||
action: nome del tool (es. "place_order", "cancel_order").
|
||||
exchange: identificatore servizio (deribit, bybit, alpaca, hyperliquid).
|
||||
target: instrument/symbol/order_id su cui si agisce.
|
||||
@@ -91,6 +93,7 @@ def audit_write_op(
|
||||
"action": action,
|
||||
"exchange": exchange,
|
||||
"actor": actor,
|
||||
"bot_tag": bot_tag,
|
||||
"target": target,
|
||||
"payload": payload or {},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user