Cross-Foot a Decimal Matrix
accounting.cross_foot
Overview
Perform a bounded exact-decimal cross foot and return totals, signed differences, and the equality decision. Input shapes are closed, order is stable, and no currency conversion, materiality threshold, posting, or accounting policy is inferred.
You receive exact decimal totals, signed differences, and the resolved tolerance so the control can be reproduced. This guidance applies specifically to accounting.cross_foot.
Reliability
Closed shapes and bounded exact-decimal accumulation fail before expensive work. DECIMAL_INVALID means a malformed or over-limit amount; correct it. CONTROL_INVALID means ids, dimensions, or debit-credit sides violate the closed control; correct the named row. CURRENCY_MISMATCH means rows use different currencies; convert or split them. TOLERANCE_INVALID means tolerance is negative or malformed; send a non-negative decimal. ITEM_LIMIT_EXCEEDED means a row or column bound was exceeded; split the request. This guidance applies specifically to accounting.cross_foot.
Context footprint
The compact receipt replaces manual cross-checking while retaining totals and differences. This guidance applies specifically to accounting.cross_foot. A successful call costs 1 execution credit.
When to use it
When every row sum and every column sum of a decimal matrix must agree.
When there is a single vector rather than a matrix, or you need a trial-balance proof.
Scope
Non-goals
- Does not infer materiality, currency conversion, posting, or accounting policy This guidance applies specifically to accounting.cross_foot.
- Does not mutate a ledger, fetch files, or accept unbounded rows This guidance applies specifically to accounting.cross_foot.
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 |
|---|---|---|---|
| rows | array | Yes | From 1 through 10,000 closed {id, values, reportedTotal} rows of equal width. |
| tolerance | string | No | Optional absolute tolerance; omitted values resolve to zero. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| rowChecks | array | Yes | From 1 through 10,000 closed {id, calculatedTotal, reportedTotal, difference, withinTolerance} results in input order. |
| columnTotals | array | Yes | From 1 through 1,000 plain-decimal string totals in ascending column order. |
| grandTotal | string | Yes | Exact total of every matrix value. |
| withinTolerance | boolean | Yes | Whether every row difference is within tolerance. |
| tolerance | string | Yes | Resolved absolute tolerance. |
| rowCount | integer | Yes | Number of matrix rows. |
| columnCount | integer | Yes | Common matrix width. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"accounting.cross_foot","input":{"rows":[{"id":"north","values":["10","20"],"reportedTotal":"30"},{"id":"south","values":["5","15"],"reportedTotal":"20"}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("accounting.cross_foot", {"rows":[{"id":"north","values":["10","20"],"reportedTotal":"30"},{"id":"south","values":["5","15"],"reportedTotal":"20"}]});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. |
| CONTROL_INVALID | 400 | No | The request payload failed this skill's input validation. |
| CURRENCY_MISMATCH | 400 | No | The request payload failed this skill's input validation. |
| TOLERANCE_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 infer materiality, currency conversion, posting, or accounting policy This guidance applies specifically to accounting.cross_foot.
- Does not mutate a ledger, fetch files, or accept unbounded rows This guidance applies specifically to accounting.cross_foot.
- Currency conversion, posting, or inferred materiality This guidance applies specifically to accounting.cross_foot.
- Matrices or ledgers above the documented bounds This guidance applies specifically to accounting.cross_foot.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "accounting.cross_foot",
"input": {
"rows": [
{
"id": "north",
"values": [
"10",
"20"
],
"reportedTotal": "30"
},
{
"id": "south",
"values": [
"5",
"15"
],
"reportedTotal": "20"
}
]
}
}Examples
Exact equality
{
"rows": [
{
"id": "north",
"values": [
"10",
"20"
],
"reportedTotal": "30"
},
{
"id": "south",
"values": [
"5",
"15"
],
"reportedTotal": "20"
}
]
}{
"rowChecks": [
{
"id": "north",
"calculatedTotal": "30",
"reportedTotal": "30",
"difference": "0",
"withinTolerance": true
},
{
"id": "south",
"calculatedTotal": "20",
"reportedTotal": "20",
"difference": "0",
"withinTolerance": true
}
],
"columnCount": 2,
"tolerance": "0",
"withinTolerance": true,
"columnTotals": [
"15",
"35"
],
"rowCount": 2,
"grandTotal": "50"
}Explicit tolerance boundary
{
"tolerance": "0.01",
"rows": [
{
"id": "only",
"values": [
"9.99"
],
"reportedTotal": "10"
}
]
}{
"rowChecks": [
{
"id": "only",
"calculatedTotal": "9.99",
"reportedTotal": "10",
"difference": "-0.01",
"withinTolerance": true
}
],
"columnCount": 1,
"tolerance": "0.01",
"withinTolerance": true,
"columnTotals": [
"9.99"
],
"rowCount": 1,
"grandTotal": "9.99"
}Recommended use cases
- Deterministic cross foot
- Pre-posting fund-accounting equality controls This guidance applies specifically to accounting.cross_foot.
Avoid for
- Currency conversion, posting, or inferred materiality This guidance applies specifically to accounting.cross_foot.
- Matrices or ledgers above the documented bounds This guidance applies specifically to accounting.cross_foot.
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.