Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Calculate Spin-Off Quantity

corporate_action.spin_off_quantity

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

Perform bounded exact-decimal spin off quantity with every ratio, quantity, and policy explicit. Closed input, fixed precision, typed failures, and no ambient corporate-action data apply.

You receive a bounded entitlement or basis result with explicit policy receipts for corporate_action.spin_off_quantity.

Reliability

DECIMAL_INVALID means a decimal is malformed or over limit; correct it. CORPORATE_ACTION_INVALID means a quantity, ratio, price, id, or row violates the published action domain; correct it. ZERO_DENOMINATOR means a ratio denominator or fair-value sum is zero; supply a positive denominator. ROUNDING_INVALID means mode or scale is unsupported; select a published profile. FRACTION_POLICY_INVALID means the closed fraction policy is unsupported; select PRESERVE or FLOOR. FLOOR_POLICY_INVALID means the basis floor policy is unsupported; select ZERO_WITH_EXCESS. ITEM_LIMIT_EXCEEDED means fairValues exceeds 10,000 rows; reduce input. This guidance applies specifically to corporate_action.spin_off_quantity.

Context footprint

The compact result replaces repeated prompt ratio and basis arithmetic for corporate_action.spin_off_quantity. A successful call costs 1 execution credit.

When to use it

When parent quantity and a spin ratio must become the child-share entitlement.

When the child is received via merger exchange rather than a spin ratio.

Scope

Note
Perform bounded exact-decimal spin off quantity with every ratio, quantity, and policy explicit

Non-goals

  • Does not determine eligibility, record dates, tax, legal treatment, or accounting classification for corporate_action.spin_off_quantity.
  • Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.spin_off_quantity.

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

math

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
What this means

This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.

Squillify guarantees
  • Runs inside Squillify
  • This skill runs inside Squillify.
  • Payloads are not sent to an external service by this skill.
  • Squillify does not permanently store submitted payloads.
  • Telemetry records metadata only, not submitted content.
  • Submitted payloads are not used for training.
  • Submitted payloads are not reviewed by humans.
  • This skill does not target sensitive data.
  • The response does not contain submitted content.
Your responsibility

Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
itemsarrayYesFrom 1 through 10,000 closed eligible-position objects processed in caller order.

Output schema

FieldTypeRequiredDescription
resultsarrayYesFrom 1 through 10,000 calculated results preserving input order.
countintegerYesNumber of input items and emitted results.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"corporate_action.spin_off_quantity","input":{"items":[{"itemId":"position-1","parentQuantity":"100","ratio":"0.2","fractionPolicy":{"mode":"PRESERVE"}}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("corporate_action.spin_off_quantity", {"items":[{"itemId":"position-1","parentQuantity":"100","ratio":"0.2","fractionPolicy":{"mode":"PRESERVE"}}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
DECIMAL_INVALID400NoThe request payload failed this skill's input validation.
CORPORATE_ACTION_INVALID400NoThe request payload failed this skill's input validation.
FRACTION_POLICY_INVALID400NoThe request payload failed this skill's input validation.
ITEM_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not determine eligibility, record dates, tax, legal treatment, or accounting classification for corporate_action.spin_off_quantity.
  • Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.spin_off_quantity.
  • Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.spin_off_quantity.
  • Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.spin_off_quantity.

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "corporate_action.spin_off_quantity",
  "input": {
    "items": [
      {
        "itemId": "position-1",
        "parentQuantity": "100",
        "ratio": "0.2",
        "fractionPolicy": {
          "mode": "PRESERVE"
        }
      }
    ]
  }
}

Examples

Verified calculation

Inputjson
{
  "items": [
    {
      "itemId": "position-1",
      "parentQuantity": "100",
      "ratio": "0.2",
      "fractionPolicy": {
        "mode": "PRESERVE"
      }
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "position-1",
      "childQuantity": "20",
      "fractionalQuantity": "0",
      "rawQuantity": "20",
      "fractionPolicy": {
        "mode": "PRESERVE"
      }
    }
  ],
  "count": 1
}
Tip
Returns the primary independently recomputed W07 vector.

Alternative calculation

Inputjson
{
  "items": [
    {
      "itemId": "position-2",
      "parentQuantity": "7",
      "ratio": "0.5",
      "fractionPolicy": {
        "mode": "FLOOR"
      }
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "position-2",
      "childQuantity": "3",
      "fractionalQuantity": "0.5",
      "rawQuantity": "3.5",
      "fractionPolicy": {
        "mode": "FLOOR"
      }
    }
  ],
  "count": 1
}
Tip
Returns a materially different independently recomputed W07 vector.
  • Auditable exact-decimal corporate-action arithmetic for corporate_action.spin_off_quantity.
  • Bounded basis or entitlement calculations with every ratio and policy explicit for corporate_action.spin_off_quantity.

Avoid for

  • Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.spin_off_quantity.
  • Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.spin_off_quantity.

Composable with

Safety & privacy

  • Runs without calling any external service.
  • Your payloads are never stored permanently.
  • Telemetry captures metadata only — never your payload contents.
  • We never train models on your payloads.
  • No human reviews your payloads.

Tags

mathfinancecorporate-action