docs(spec): piano micro-test mainnet + token Cerbero env-configurabile
Piano operativo per validare l'edge su mainnet con poco denaro reale (il gate per scalare). Fasi: smoke -> fade-only €1000 2-4 sett -> verdetto ledger-vs-backtest -> espansione. Sizing motivato (fades €1000 = rumore arrotondamento 2.6% BTC; pairs esclusi: 30% a quella taglia). Token ora da env CERBERO_TOKEN (default testnet invariato) -> switch mainnet = solo .env, niente codice. is_mainnet() helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,30 @@
|
||||
"""Client HTTP per Cerbero MCP — Deribit testnet."""
|
||||
"""Client HTTP per Cerbero MCP — Deribit.
|
||||
|
||||
Ambiente determinato dal TOKEN (vedi API_REFERENCE): TESTNET_TOKEN -> upstream
|
||||
testnet, MAINNET_TOKEN -> upstream live. Default = testnet. Per il micro-test
|
||||
mainnet basta esportare CERBERO_TOKEN (e opzionalmente CERBERO_BOT_TAG) nel `.env`
|
||||
— NESSUNA modifica di codice. Vedi docs/specs/mainnet-microtest-plan.md."""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
import os
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
BASE_URL = "https://cerbero-mcp.tielogic.xyz"
|
||||
TOKEN = "_hm0FkyC67P9OXJTy7R9SE2lfhGz_Wa6i89KqH_uXrk"
|
||||
BOT_TAG = "pythagoras-paper"
|
||||
BASE_URL = os.environ.get("CERBERO_BASE_URL", "https://cerbero-mcp.tielogic.xyz")
|
||||
# Token TESTNET di default; override via env CERBERO_TOKEN per puntare a mainnet.
|
||||
TESTNET_TOKEN = "_hm0FkyC67P9OXJTy7R9SE2lfhGz_Wa6i89KqH_uXrk"
|
||||
TOKEN = os.environ.get("CERBERO_TOKEN", TESTNET_TOKEN)
|
||||
BOT_TAG = os.environ.get("CERBERO_BOT_TAG", "pythagoras-paper")
|
||||
TIMEOUT = 15
|
||||
|
||||
|
||||
def is_mainnet() -> bool:
|
||||
"""True se il token attivo NON è quello testnet di default (= upstream live)."""
|
||||
return TOKEN != TESTNET_TOKEN
|
||||
|
||||
|
||||
@dataclass
|
||||
class CerberoClient:
|
||||
base_url: str = BASE_URL
|
||||
|
||||
Reference in New Issue
Block a user