Skip to main content
GET
/
v1
/
runtime
/
state
Get runtime state
curl --request GET \
  --url https://api.firmament.shaikazeem.com/v1/runtime/state
const options = {method: 'GET'};

fetch('https://api.firmament.shaikazeem.com/v1/runtime/state', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "state": {
    "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "started_at": "2023-11-07T05:31:56Z",
    "inventory": {
      "balances": [
        {
          "asset": "USDC",
          "amount_raw": 1
        }
      ],
      "quoteable_thresholds": [
        {
          "asset": "USDC",
          "amount_raw": 1
        }
      ],
      "max_drift_bps": 123,
      "status": "runtime_ready"
    },
    "risk": {
      "last_decision": {
        "status": "<string>",
        "checks": [
          "<string>"
        ]
      },
      "active_rejections": [],
      "require_taker_allowlist": true,
      "max_price_staleness_seconds": 2
    },
    "pnl": {
      "realized_spread_usdc_estimate": "<string>",
      "fees_usdc_estimate": "<string>",
      "rebalance_cost_usdc_estimate": "<string>",
      "net_usdc_estimate": "<string>"
    },
    "rfq": {
      "active_quote_count": 1,
      "accepted_quote_count": 1,
      "rejected_quote_count": 1,
      "active_settlement_count": 1
    },
    "rebalance": {
      "pending_swap_count": 1,
      "completed_swap_count": 1
    },
    "gateway": {
      "enabled": true,
      "usdc_refill_threshold_raw": 1,
      "usdc_refill_target_raw": 1,
      "status": "not_checked"
    },
    "recent_events": [
      {
        "event": {}
      }
    ]
  }
}

Response

200 - application/json

Runtime state projection.

state
object
required