Allocate Basis by Fair Value
corporate_action.allocate_basis_by_fair_value
Overview
Perform bounded exact-decimal allocate basis by fair value 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.allocate_basis_by_fair_value.
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.allocate_basis_by_fair_value.
Context footprint
The compact result replaces repeated prompt ratio and basis arithmetic for corporate_action.allocate_basis_by_fair_value. A successful call costs 1 execution credit.
When to use it
When tax basis must be split across surviving lines in proportion to explicit fair values.
When you need a split or dividend entitlement rather than a fair-value basis allocation.
Scope
Non-goals
- Does not determine eligibility, record dates, tax, legal treatment, or accounting classification for corporate_action.allocate_basis_by_fair_value.
- Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.allocate_basis_by_fair_value.
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
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.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| totalBasis | string | Yes | Non-negative total basis to allocate. Required finite plain decimal with at most 100 significant digits and scale 40; exponent notation is invalid. |
| fairValues | array | Yes | Input-order array of one through 10,000 closed objects with unique string `id` and non-negative decimal `fairValue`. |
| roundingProfile | object | Yes | Closed rounding object with published string `mode` and integer `scale` from 0 through 12. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| allocatedBasis | array | Yes | Input-order array of closed result objects with string `id`, fixed-scale decimal `basis`, and normalized decimal `exactBasis`. |
| residual | string | Yes | Total basis minus the sum of rounded allocations. Returned as a normalized plain-decimal string. |
| roundingProfile | object | Yes | Closed resolved object with string `mode`, integer `scale`, and string `point` fixed to final. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"corporate_action.allocate_basis_by_fair_value","input":{"totalBasis":"100","fairValues":[{"id":"parent","fairValue":"1"},{"id":"child","fairValue":"3"}],"roundingProfile":{"mode":"HALF_UP","scale":2}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("corporate_action.allocate_basis_by_fair_value", {"totalBasis":"100","fairValues":[{"id":"parent","fairValue":"1"},{"id":"child","fairValue":"3"}],"roundingProfile":{"mode":"HALF_UP","scale":2}});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| DECIMAL_INVALID | 400 | No | The request payload failed this skill's input validation. |
| CORPORATE_ACTION_INVALID | 400 | No | The request payload failed this skill's input validation. |
| ZERO_DENOMINATOR | 400 | No | The request payload failed this skill's input validation. |
| ROUNDING_INVALID | 400 | No | The request payload failed this skill's input validation. |
| ITEM_LIMIT_EXCEEDED | 429 | No | A size, quota, rate, or time limit was exceeded. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not determine eligibility, record dates, tax, legal treatment, or accounting classification for corporate_action.allocate_basis_by_fair_value.
- Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.allocate_basis_by_fair_value.
- Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.allocate_basis_by_fair_value.
- Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.allocate_basis_by_fair_value.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "corporate_action.allocate_basis_by_fair_value",
"input": {
"totalBasis": "100",
"fairValues": [
{
"id": "parent",
"fairValue": "1"
},
{
"id": "child",
"fairValue": "3"
}
],
"roundingProfile": {
"mode": "HALF_UP",
"scale": 2
}
}
}Examples
Verified calculation
{
"totalBasis": "100",
"fairValues": [
{
"id": "parent",
"fairValue": "1"
},
{
"id": "child",
"fairValue": "3"
}
],
"roundingProfile": {
"mode": "HALF_UP",
"scale": 2
}
}{
"allocatedBasis": [
{
"id": "parent",
"basis": "25.00",
"exactBasis": "25"
},
{
"id": "child",
"basis": "75.00",
"exactBasis": "75"
}
],
"residual": "0",
"roundingProfile": {
"mode": "HALF_UP",
"scale": 2,
"point": "final"
}
}Alternative calculation
{
"totalBasis": "0.05",
"fairValues": [
{
"id": "a",
"fairValue": "1"
},
{
"id": "b",
"fairValue": "1"
}
],
"roundingProfile": {
"mode": "HALF_EVEN",
"scale": 2
}
}{
"allocatedBasis": [
{
"id": "a",
"basis": "0.02",
"exactBasis": "0.025"
},
{
"id": "b",
"basis": "0.02",
"exactBasis": "0.025"
}
],
"residual": "0.01",
"roundingProfile": {
"mode": "HALF_EVEN",
"scale": 2,
"point": "final"
}
}Recommended use cases
- Auditable exact-decimal corporate-action arithmetic for corporate_action.allocate_basis_by_fair_value.
- Bounded basis or entitlement calculations with every ratio and policy explicit for corporate_action.allocate_basis_by_fair_value.
Avoid for
- Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.allocate_basis_by_fair_value.
- Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.allocate_basis_by_fair_value.
Related skills
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.