Calculate Cost Amount
tax_lot.cost_amount
Overview
Perform exact bounded cost amount from caller-supplied tax-lot values. Lot identity, classification, and matching policy remain caller-controlled.
You receive deterministic tax-lot arithmetic and conservation without hidden policy for tax_lot.cost_amount.
Reliability
DECIMAL_INVALID means a decimal is malformed or over limit; correct it. TAX_LOT_INPUT_INVALID means a lot, identity, quantity, cost, or rounding domain is invalid; correct it. ZERO_DENOMINATOR means a quantity denominator is zero; provide a positive quantity. LOT_INCOMPATIBLE means merge identities differ; submit homogeneous lots. ITEM_LIMIT_EXCEEDED means a collection exceeds 10,000 items; reduce it. This guidance applies specifically to tax_lot.cost_amount.
Context footprint
The compact output replaces repeated lot arithmetic for tax_lot.cost_amount. A successful call costs 1 execution credit.
When to use it
When quantity times unit cost plus allocated costs must become the lot's cost amount.
When you already hold proceeds and allocated cost and need realized P&L instead.
Scope
Non-goals
- Does not select lots, infer tax treatment, or classify costs for tax_lot.cost_amount.
- Does not infer security identity, currency conversion, or fractional-disposal policy for tax_lot.cost_amount.
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 calculations processed in caller order. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| results | array | Yes | From 1 through 10,000 results preserving input order, each a closed itemId plus the calculated scalars. |
| count | integer | Yes | Number of requested 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":"tax_lot.cost_amount","input":{"items":[{"itemId":"lot-operation-1","quantity":"10","unitCost":"12","allocatedCosts":"5"}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("tax_lot.cost_amount", {"items":[{"itemId":"lot-operation-1","quantity":"10","unitCost":"12","allocatedCosts":"5"}]});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. |
| TAX_LOT_INPUT_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 select lots, infer tax treatment, or classify costs for tax_lot.cost_amount.
- Does not infer security identity, currency conversion, or fractional-disposal policy for tax_lot.cost_amount.
- Tax advice, lot matching, wash-sale policy, or currency conversion for tax_lot.cost_amount.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "tax_lot.cost_amount",
"input": {
"items": [
{
"itemId": "lot-operation-1",
"quantity": "10",
"unitCost": "12",
"allocatedCosts": "5"
}
]
}
}Examples
Verified primary
{
"items": [
{
"itemId": "lot-operation-1",
"quantity": "10",
"unitCost": "12",
"allocatedCosts": "5"
}
]
}{
"results": [
{
"itemId": "lot-operation-1",
"costAmount": "125"
}
],
"count": 1
}Verified alternative
{
"items": [
{
"itemId": "lot-operation-2",
"quantity": "1",
"unitCost": "0",
"allocatedCosts": "0"
}
]
}{
"results": [
{
"itemId": "lot-operation-2",
"costAmount": "0"
}
],
"count": 1
}Recommended use cases
- Exact lot arithmetic reperformance for tax_lot.cost_amount.
- Bounded conservation evidence for tax_lot.cost_amount.
Avoid for
- Tax advice, lot matching, wash-sale policy, or currency conversion for tax_lot.cost_amount.
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.