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:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user