feat: paper trader su USDC (ETH_USDC-PERPETUAL), pronto per operatività reale

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-27 09:57:26 +02:00
parent bf26eb0439
commit 8c4ddebe85
3 changed files with 20 additions and 17 deletions
+6 -6
View File
@@ -32,19 +32,19 @@ else:
print("\n--- ACCOUNT DERIBIT TESTNET ---")
c = CerberoClient()
try:
acc = c.get_account_summary()
print(f" Equity: {acc['equity']:.2f}")
print(f" Balance: {acc['balance']:.2f}")
print(f" PnL: {acc['total_pnl']:.2f}")
acc = c.get_account_summary("USDC")
print(f" Equity: ${acc['equity']:,.2f}")
print(f" Balance: ${acc['balance']:,.2f}")
print(f" PnL: ${acc['total_pnl']:,.2f}")
except Exception as e:
print(f" Errore: {e}")
# Posizioni
try:
pos = c.get_positions()
pos = c.get_positions("USDC")
print(f"\n Posizioni aperte: {len(pos)}")
for p in pos:
print(f" {p}")
print(f" {p.get('instrument','?')}: {p.get('size',0)} {p.get('direction','?')} @ ${p.get('avg_price',0)}")
except Exception as e:
print(f" Errore: {e}")