Value value swaps
derivatives.value_swaps
Overview
Calculate bounded deterministic value swaps over explicit ordered cash-flow arrays with closed schemas, deterministic decimal arithmetic, bounded counts, and no hidden market-data lookup.
We provide bounded swap arithmetic that preserves audit identities.
Reliability
DERIVATIVE_INPUT_INVALID and ITEM_LIMIT_EXCEEDED identify closed-domain or bound failures.
Context footprint
One batch replaces per-swap orchestration loops. A successful call costs 1 execution credit.
When to use it
When a bounded book of swaps already has both legs' cash flows and must be netted by orientation.
When you only have one isolated leg, or swap identifiers and orientation are still missing.
Scope
Non-goals
- Does not construct schedules or curves.
- Does not fetch rates, cash flows, or currencies.
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 |
|---|---|---|---|
| swaps | array | Yes | From 1 through 1,000 closed swap objects with at most 10,000 total cash-flow rows. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| results | array | Yes | From 1 through 1,000 swap results preserving input order, each a closed present-value receipt. |
| count | integer | Yes | Number of requested and emitted swaps. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"derivatives.value_swaps","input":{"swaps":[{"swapId":"S1","currency":"USD","orientation":"RECEIVE_FLOAT_PAY_FIXED","fixedCashFlows":["20"],"fixedDiscountFactors":["0.99"],"floatingCashFlows":["25"],"floatingDiscountFactors":["0.99"]}]}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("derivatives.value_swaps", {"swaps":[{"swapId":"S1","currency":"USD","orientation":"RECEIVE_FLOAT_PAY_FIXED","fixedCashFlows":["20"],"fixedDiscountFactors":["0.99"],"floatingCashFlows":["25"],"floatingDiscountFactors":["0.99"]}]});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. |
| DERIVATIVE_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 construct schedules or curves.
- Does not fetch rates, cash flows, or currencies.
- Unbounded books or implicit market data.
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "derivatives.value_swaps",
"input": {
"swaps": [
{
"swapId": "S1",
"currency": "USD",
"orientation": "RECEIVE_FLOAT_PAY_FIXED",
"fixedCashFlows": [
"20"
],
"fixedDiscountFactors": [
"0.99"
],
"floatingCashFlows": [
"25"
],
"floatingDiscountFactors": [
"0.99"
]
}
]
}
}Examples
Verified vector
{
"swaps": [
{
"swapId": "S1",
"currency": "USD",
"orientation": "RECEIVE_FLOAT_PAY_FIXED",
"fixedCashFlows": [
"20"
],
"fixedDiscountFactors": [
"0.99"
],
"floatingCashFlows": [
"25"
],
"floatingDiscountFactors": [
"0.99"
]
}
]
}{
"results": [
{
"swapId": "S1",
"currency": "USD",
"fixedLegPV": "19.8",
"floatingLegPV": "24.75",
"netPresentValue": "4.95",
"orientation": "RECEIVE_FLOAT_PAY_FIXED"
}
],
"count": 1
}Repeated vector
{
"swaps": [
{
"swapId": "S1",
"currency": "USD",
"orientation": "RECEIVE_FLOAT_PAY_FIXED",
"fixedCashFlows": [
"20"
],
"fixedDiscountFactors": [
"0.99"
],
"floatingCashFlows": [
"25"
],
"floatingDiscountFactors": [
"0.99"
]
}
]
}{
"results": [
{
"swapId": "S1",
"currency": "USD",
"fixedLegPV": "19.8",
"floatingLegPV": "24.75",
"netPresentValue": "4.95",
"orientation": "RECEIVE_FLOAT_PAY_FIXED"
}
],
"count": 1
}Recommended use cases
- Independent swap valuation from explicit cash flows.
- Deterministic NAV support calculations.
Avoid for
- Unbounded books or implicit market data.
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.