From a34b40e69f66670d8c8ccadb2c380b675ccdcf1a Mon Sep 17 00:00:00 2001 From: jaxperro Date: Thu, 9 Jul 2026 20:37:08 -0400 Subject: [PATCH] probe v2: setup_trading_approvals before first order (the SDK's onboarding call) Co-Authored-By: Claude Fable 5 --- host/order_probe_v2.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/host/order_probe_v2.py b/host/order_probe_v2.py index 7160d7ab..d71bae84 100644 --- a/host/order_probe_v2.py +++ b/host/order_probe_v2.py @@ -59,6 +59,23 @@ def dump(label, obj): if d else repr(obj)[:800]) with client: + print("gasless ready:", getattr(client, "is_gasless_ready", "?")) + print("running setup_trading_approvals()…") + try: + h = client.setup_trading_approvals() + if h is not None and hasattr(h, "wait"): + out = h.wait() + print(" approvals outcome:", str(out)[:200]) + else: + print(" approvals result:", str(h)[:200]) + except Exception as e: + print(" setup_trading_approvals:", type(e).__name__, str(e)[:250]) + try: + b = client.get_balance_allowance(asset_type="COLLATERAL") + print(" exchange-view balance:", str(b)[:300]) + except Exception as e: + print(" balance check:", type(e).__name__, str(e)[:150]) + print("\nBUY $5.00 FAK…") try: r = client.place_market_order(token_id=tok, side="BUY", amount=5, order_type="FAK")