85trust / 100

Decisions Exit

by api.onesource.io in Onchain & crypto

x402 APIPassing, checked 7 min ago

The Standard Reserve (TSR), an on-chain reserve protocol on Robinhood Chain. Everything relevant to deciding whether to exit a charter's branches right now, bundled into one call.

GET https://api.onesource.io/standard/v1/decisions/exit

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
116 ms typical, 116 ms slowest 5%
Last check
7 min ago
Next check
in 23 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X GET "https://api.onesource.io/standard/v1/decisions/exit?charter_id=42"
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.onesource.io%2Fstandard%2Fv1%2Fdecisions%2Fexit
const res = await pay("https://api.onesource.io/standard/v1/decisions/exit?charter_id=42");
console.log(await res.json());

Example input

{
  "charter_id": 42
}

Example output

{
  "as_of_basis": "parts_min",
  "as_of_block": 63499000,
  "assumptions": [
    "realizable_eth is a single-range constant-liquidity price-impact approximation..."
  ],
  "basis": "decision_composite",
  "chain_id": 4663,
  "network": "robinhood",
  "parts": {
    "exit_quote": {
      "data": {
        "gross_raw": "1000000000000000000",
        "net_raw": "950000000000000000"
      },
      "status": "ok"
    },
    "fee_curve": {
      "data": {
        "fee_rate_now_live_wad": "50000000000000000"
      },
      "status": "ok"
    },
    "fee_forecast": {
      "data": {
        "days_until_min_fee": 3
      },
      "status": "ok"
    },
    "governance": {
      "data": {
        "pending": []
      },
      "status": "ok"
    },
    "policy_outlook": {
      "data": {},
      "status": "ok"
    },
    "pool": {
      "data": {
        "tick": -1200
      },
      "status": "ok"
    },
    "sbills_alternative": {
      "data": {
        "alternative": {
          "amount_source": "exit_quote.net_raw",
          "basis": "derived",
          "exit_fee_estimate": {
            "fee_bps": 100,
            "fee_raw": "9500000000000000",
            "payout_raw": "940500000000000000"
          },
          "premium_raw": "20980733197036500",
          "rate_paid": {
            "rate_per_term_wad": "22084982312670000",
            "term_days": "15"
          },
          "term_days": "15"
        },
        "amount_raw": "950000000000000000"
      },
      "status": "ok"
    },
    "tax_schedule": {
      "data": {
        "current_sell_tax_bps_raw": "50"
      },
      "status": "ok"
    }
  },
  "parts_as_of_blocks": {
    "fee_curve": 63499000,
    "fee_forecast": 63499000
  },
  "summary": {
    "current_sell_tax_bps_raw": "50",
    "days_until_min_fee": 3,
    "fee_rate_now_live_wad": "50000000000000000",
    "fee_raw": "50000000000000000",
    "gross_raw": "1000000000000000000",
    "net_raw": "950000000000000000",
    "pending_governance_changes": 0,
    "realizable_eth_raw": "470000000000000",
    "sbills_alternative_amount_raw": "950000000000000000",
    "sbills_alternative_exit_fee_bps": 100,
    "sbills_alternative_premium_raw": "20980733197036500",
    "sbills_alternative_rate_paid_per_term_wad": "22084982312670000",
    "sbills_alternative_term_days": "15"
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
7 min agoPassed402116 ms$0.05
3 h agoPassed402122 ms$0.05
9 h agoPassed402115 ms$0.05