Skip to main content

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

MicroSkills Reference

Calculate Share Class Fx Hedge Allocate

fund.share_class_fx_hedge_allocate

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

Perform exact bounded share class fx hedge allocate from caller-supplied share-class values. Class eligibility, weights, and materiality remain caller-controlled.

You receive deterministic class allocation or control evidence without hidden class policy for fund.share_class_fx_hedge_allocate.

Reliability

DECIMAL_INVALID means a decimal is malformed or over limit; correct it. FUND_INPUT_INVALID means a class, weight, amount, or control value violates the closed domain; correct it. ZERO_DENOMINATOR means the weight sum is zero; supply positive total weight. ROUNDING_INVALID means scale must be 0 through 12 and mode HALF_EVEN; correct the profile. ITEM_LIMIT_EXCEEDED means a collection exceeds 10,000; reduce input. This guidance applies specifically to fund.share_class_fx_hedge_allocate.

Context footprint

The compact output replaces repeated share-class arithmetic for fund.share_class_fx_hedge_allocate. A successful call costs 1 execution credit.

When to use it

When a hedge result must be split across eligible classes and their weights.

When the amount is expense or income rather than a hedge result.

Scope

Note
Perform exact bounded share class fx hedge allocate from caller-supplied share-class values

Non-goals

  • Does not select class eligibility, weights, allocation basis, or materiality for fund.share_class_fx_hedge_allocate.
  • Does not infer prospectus, dealing, hedge, expense, income, or official NAV policy for fund.share_class_fx_hedge_allocate.

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
itemsarrayYesRequired ordered array of one through 10,000 closed share-class objects. Each object declares a unique non-blank `itemId` of at most 128 characters plus `hedgeResult`, `eligibleClasses`, `weights`, `roundingProfile`, and no other property.

Output schema

FieldTypeRequiredDescription
resultsarrayYesOrdered results preserving each input `itemId` exactly once.
countintegerYesNumber of input items and output 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":"fund.share_class_fx_hedge_allocate","input":{"items":[{"itemId":"class-1","hedgeResult":"-100","eligibleClasses":["A","B"],"weights":[{"classId":"A","weight":"3"},{"classId":"B","weight":"1"}],"roundingProfile":{"scale":2,"mode":"HALF_EVEN"}}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

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

const { output } = await sq.execute("fund.share_class_fx_hedge_allocate", {"items":[{"itemId":"class-1","hedgeResult":"-100","eligibleClasses":["A","B"],"weights":[{"classId":"A","weight":"3"},{"classId":"B","weight":"1"}],"roundingProfile":{"scale":2,"mode":"HALF_EVEN"}}]});

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.
FUND_INPUT_INVALID400NoThe request payload failed this skill's input validation.
ZERO_DENOMINATOR400NoThe request payload failed this skill's input validation.
ROUNDING_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 select class eligibility, weights, allocation basis, or materiality for fund.share_class_fx_hedge_allocate.
  • Does not infer prospectus, dealing, hedge, expense, income, or official NAV policy for fund.share_class_fx_hedge_allocate.
  • Eligibility, policy, market sourcing, or materiality decisions for fund.share_class_fx_hedge_allocate.

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "fund.share_class_fx_hedge_allocate",
  "input": {
    "items": [
      {
        "itemId": "class-1",
        "hedgeResult": "-100",
        "eligibleClasses": [
          "A",
          "B"
        ],
        "weights": [
          {
            "classId": "A",
            "weight": "3"
          },
          {
            "classId": "B",
            "weight": "1"
          }
        ],
        "roundingProfile": {
          "scale": 2,
          "mode": "HALF_EVEN"
        }
      }
    ]
  }
}

Examples

Verified primary

Inputjson
{
  "items": [
    {
      "itemId": "class-1",
      "hedgeResult": "-100",
      "eligibleClasses": [
        "A",
        "B"
      ],
      "weights": [
        {
          "classId": "A",
          "weight": "3"
        },
        {
          "classId": "B",
          "weight": "1"
        }
      ],
      "roundingProfile": {
        "scale": 2,
        "mode": "HALF_EVEN"
      }
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "class-1",
      "classHedgeResults": [
        {
          "classId": "A",
          "amount": "-75",
          "exactAmount": "-75"
        },
        {
          "classId": "B",
          "amount": "-25",
          "exactAmount": "-25"
        }
      ],
      "residual": "0"
    }
  ],
  "count": 1
}
Tip
Independent exact-decimal W12 vector.

Verified alternative

Inputjson
{
  "items": [
    {
      "itemId": "class-2",
      "hedgeResult": "0",
      "eligibleClasses": [
        "A"
      ],
      "weights": [
        {
          "classId": "A",
          "weight": "1"
        }
      ],
      "roundingProfile": {
        "scale": 2,
        "mode": "HALF_EVEN"
      }
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "class-2",
      "classHedgeResults": [
        {
          "classId": "A",
          "amount": "0",
          "exactAmount": "0"
        }
      ],
      "residual": "0"
    }
  ],
  "count": 1
}
Tip
Materially different exact-decimal W12 vector.
  • Exact share-class allocation evidence for fund.share_class_fx_hedge_allocate.
  • Independent class rollup or reconciliation for fund.share_class_fx_hedge_allocate.

Avoid for

  • Eligibility, policy, market sourcing, or materiality decisions for fund.share_class_fx_hedge_allocate.

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

mathfinancefund-accounting