Calculate Merger Exchange Consideration
corporate_action.merger_exchange
Overview
Perform bounded exact-decimal merger exchange 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.merger_exchange.
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.merger_exchange.
Context footprint
The compact result replaces repeated prompt ratio and basis arithmetic for corporate_action.merger_exchange. A successful call costs 1 execution credit.
When to use it
When target shares must be exchanged into cash and/or acquirer shares at explicit terms.
When the event is a spin-off or split, not an exchange into acquirer consideration.
Scope
Non-goals
- Does not determine eligibility, record dates, tax, legal treatment, or accounting classification for corporate_action.merger_exchange.
- Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.merger_exchange.
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 |
|---|---|---|---|
| items | array | Yes | From 1 through 10,000 closed eligible-position objects processed in caller order. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| results | array | Yes | From 1 through 10,000 calculated results preserving input order. |
| count | integer | Yes | Number of input items and emitted results. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"corporate_action.merger_exchange","input":{"items":[{"itemId":"position-1","oldShares":"10","exchangeRatio":"1.5","cashPerShare":"2","fractionPolicy":{"mode":"FLOOR"}}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("corporate_action.merger_exchange", {"items":[{"itemId":"position-1","oldShares":"10","exchangeRatio":"1.5","cashPerShare":"2","fractionPolicy":{"mode":"FLOOR"}}]});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. |
| FRACTION_POLICY_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.merger_exchange.
- Does not fetch corporate-action feeds, prices, FX rates, or cash-in-lieu values for corporate_action.merger_exchange.
- Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.merger_exchange.
- Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.merger_exchange.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "corporate_action.merger_exchange",
"input": {
"items": [
{
"itemId": "position-1",
"oldShares": "10",
"exchangeRatio": "1.5",
"cashPerShare": "2",
"fractionPolicy": {
"mode": "FLOOR"
}
}
]
}
}Examples
Verified calculation
{
"items": [
{
"itemId": "position-1",
"oldShares": "10",
"exchangeRatio": "1.5",
"cashPerShare": "2",
"fractionPolicy": {
"mode": "FLOOR"
}
}
]
}{
"results": [
{
"itemId": "position-1",
"newShares": "15",
"cashConsideration": "20",
"fractionalShares": "0",
"rawShares": "15",
"fractionPolicy": {
"mode": "FLOOR"
}
}
],
"count": 1
}Alternative calculation
{
"items": [
{
"itemId": "position-2",
"oldShares": "3",
"exchangeRatio": "0.5",
"cashPerShare": "0",
"fractionPolicy": {
"mode": "FLOOR"
}
}
]
}{
"results": [
{
"itemId": "position-2",
"newShares": "1",
"cashConsideration": "0",
"fractionalShares": "0.5",
"rawShares": "1.5",
"fractionPolicy": {
"mode": "FLOOR"
}
}
],
"count": 1
}Recommended use cases
- Auditable exact-decimal corporate-action arithmetic for corporate_action.merger_exchange.
- Bounded basis or entitlement calculations with every ratio and policy explicit for corporate_action.merger_exchange.
Avoid for
- Eligibility, tax, legal, market, or accounting-policy decisions for corporate_action.merger_exchange.
- Inputs outside the published scalar or 10,000-row allocation bound for corporate_action.merger_exchange.
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.