SPB Git

Repository Public

execution-risk.json 6.1 KB 37 lines json

1{2  "state": {3    "switches": { "killSwitch": { "on": true, "at": 1793999940000, "by": { "kind": "owner", "id": "owner" }, "reason": "arrêt d'urgence" }, "readOnly": { "on": false, "at": null, "by": null, "reason": null } },4    "auto": { "totalLoss": true, "drawdown": true, "dailyLoss": false },5    "limits": {6      "paper": { "mode": "paper", "stored": {}, "defaults": { "maxPriceAgeMs": { "per": { "coingecko": 900000 }, "default": 15000 }, "maxBookAgeMs": 15000, "minPriceSources": 1, "maxSourceDeviationBps": "1000", "maxSlippageBps": "500", "minLiquidity": { "withinBps": "500", "multiple": "1" }, "minLiquidationDistanceBps": "200", "maxOrdersPerMinute": 60, "maxOrdersPerHour": 1000, "maxOrdersPerDay": 5000, "maxOrderNotional": "10000000", "maxPositionNotional": { "per": {}, "default": "20000000" } },7        "effective": { "maxBookAgeMs": 15000, "minPriceSources": 1, "maxOrderNotional": "10000000" }, "missing": [] },8      "live": { "mode": "live", "stored": { "maxDailyLoss": "500", "allowedVenues": ["hyperliquid"], "futureLimit": "7" },9        "defaults": { "maxPriceAgeMs": { "per": { "coingecko": 900000 }, "default": 10000 }, "maxBookAgeMs": 10000, "minPriceSources": 2, "maxSourceDeviationBps": "200", "maxSlippageBps": "100", "minLiquidity": { "withinBps": "100", "multiple": "2" }, "minLiquidationDistanceBps": "1000", "maxOrdersPerMinute": 6, "maxOrdersPerHour": 60, "maxOrdersPerDay": 200 },10        "effective": { "minPriceSources": 2, "maxDailyLoss": "500", "allowedVenues": ["hyperliquid"] },11        "effectiveOwner": { "minPriceSources": 2, "maxDailyLoss": "500", "allowedVenues": ["hyperliquid"], "maxOrderNotional": "5000" },12        "seed": { "at": 1793000000000, "limits": { "allowedVenues": ["hyperliquid"], "maxOrderNotional": "5000" }, "sources": [{ "field": "maxOrderNotional", "from": "policy.maxOrderNotional (minimum)", "accounts": ["6e0f8a44-1b7c-4f1e-9d55-0000000000b1"] }], "notSeeded": ["maxDailyNotional", "maxNetExposure"], "accounts": [{ "id": "6e0f8a44-1b7c-4f1e-9d55-0000000000b1", "venue": "hyperliquid", "network": "mainnet" }] },13        "missing": ["maxDailyNotional", "maxNetExposure"], "missingForAutomation": ["allowedInstruments", "maxOrderNotional"], "ownerOrdersRefused": true, "automationOrdersRefused": true }14    },15    "exposure": {16      "paper": { "book": "paper", "ts": 1794000000000, "equity": "10000", "peakEquity": "10250.5", "grossExposure": "3000", "leverage": "0.3000",17        "byAsset": [{ "asset": "BTC", "long": "3000", "short": "0", "net": "3000" }], "byVenue": [{ "venue": "hyperliquid", "gross": "3000" }],18        "collateral": [{ "venue": "hyperliquid", "accountId": "6e0f8a44-1b7c-4f1e-9d55-0000000000a2", "equity": "10000", "collateral": "10000", "freeCollateral": "9000", "marginUsed": "1000", "shareBps": "10000" }],19        "positions": [{ "venue": "hyperliquid", "accountId": "6e0f8a44-1b7c-4f1e-9d55-0000000000a2", "asset": "BTC", "instrument": "hyperliquid:BTC", "side": "long", "size": "0.05", "markPrice": "60000", "notional": "3000", "leverage": "3", "liquidationPrice": "41000", "liquidationDistanceBps": "3166.66", "unrealizedPnl": "12.5", "source": "paper" }],20        "errors": [], "pnl": { "realizedToday": "0", "realizedTotal": "-4.2" } },21      "live": { "book": "live-mainnet", "error": "live accounts: signer unreachable" },22      "liveTestnet": { "book": "live-testnet", "ts": 1794000000000, "equity": "0", "peakEquity": "0", "grossExposure": "0", "leverage": null, "byAsset": [], "byVenue": [], "collateral": [], "positions": [], "errors": [], "pnl": {} }23    },24    "decisions": [25      { "id": 812, "at": 1793999990000, "orderId": "0c8f4c9e-1f7b-4a64-8a26-000000000001", "clientOrderId": "ui-order-0001", "kind": "order", "preview": false, "principal": { "kind": "api_key", "id": "spk_0123456789ab" }, "mode": "live", "venue": "hyperliquid", "instrument": "hyperliquid:BTC", "decision": "deny", "reducing": false,26        "failed": ["order_notional", "kill_switch"], "failing": [{ "id": "order_notional", "observed": "6850", "limit": "5000", "detail": "order notional 6850 is above the limit 5000" }, { "id": "kill_switch", "observed": "on", "limit": null, "detail": "the kill switch is on (arrêt d'urgence)" }] },27      { "id": 811, "at": 1793999980000, "orderId": null, "clientOrderId": null, "kind": "order", "preview": true, "principal": { "kind": "owner", "id": "owner" }, "mode": "paper", "venue": "hyperliquid", "instrument": null, "decision": "allow", "reducing": true, "failed": [], "failing": [] }28    ],29    "locks": [{ "id": "deriv_live_mainnet", "on": false, "why": "SPW_DERIV_LIVE_MAINNET is not \"on\"" }, { "id": "trading_api_execution", "on": false, "why": "SPW_TRADING_API_EXECUTION is not \"on\": no NEW live risk is placed through the trading API; cancels and strictly reducing orders still pass; paper works" }],30    "ts": 179400000000031  },32  "riskDeniedError": { "error": "risk_denied", "message": "order_notional: order notional 6850 is above the limit 5000",33    "data": { "failed": ["order_notional", "future_check"], "checks": [{ "id": "order_notional", "ok": false, "observed": "6850", "limit": "5000", "detail": "order notional 6850 is above the limit 5000", "exempt": false }, { "id": "future_check", "ok": false, "observed": null, "limit": null, "detail": "a check this version does not know", "exempt": false }], "decisionId": 812,34      "order": { "id": "0c8f4c9e-1f7b-4a64-8a26-000000000001", "orderId": "0c8f4c9e-1f7b-4a64-8a26-000000000001", "mode": "live", "venue": "hyperliquid", "network": "mainnet", "accountId": "6e0f8a44-1b7c-4f1e-9d55-0000000000b1", "instrument": "hyperliquid:BTC", "side": "buy", "type": "limit", "size": "0.1", "price": "68500", "triggerPrice": null, "reduceOnly": false, "tif": "gtc", "status": "REJECTED", "final": true, "reasonCode": "RISK_DENIED", "reason": "order_notional: order notional 6850 is above the limit 5000", "rejectCode": "risk_denied", "engineStatus": null, "filled": "0", "avgFillPrice": null, "createdAt": 1793999990000, "updatedAt": 1793999990000 } } },35  "mandateDeniedError": { "error": "mandate_denied", "message": "the order is outside the mandate: ORDER_NOTIONAL_EXCEEDED, LEVERAGE_EXCEEDED", "data": { "reasons": ["ORDER_NOTIONAL_EXCEEDED", "LEVERAGE_EXCEEDED"] } }36}37
Files main
Menu

Theme