Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Calculate Base-Currency Position Value

portfolio.position_base_market_value

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
No network

Overview

Perform bounded exact-decimal position base market value with every position input explicit. Closed bounded inputs and no inferred market data apply.

You receive deterministic position or exposure evidence without hidden portfolio assumptions for portfolio.position_base_market_value.

Reliability

DECIMAL_INVALID means a decimal is malformed or over limit; correct it. PORTFOLIO_INPUT_INVALID means a factor, collection, or identifier violates its domain; correct it. DUPLICATE_ID means two records use the same identifier and grouping would be ambiguous; supply unique record ids before retrying. CURRENCY_INVALID means an ISO code is unsupported or not uppercase; correct it. ITEM_LIMIT_EXCEEDED means a collection exceeds 10,000; reduce input. This guidance applies specifically to portfolio.position_base_market_value.

Context footprint

The compact result replaces repeated prompt portfolio arithmetic for portfolio.position_base_market_value. A successful call costs 1 execution credit.

When to use it

When a local market value must be converted into a base currency at an explicit FX rate.

When the value is already in base currency, or the FX rate is still a live quote to fetch.

Scope

Note
Perform bounded exact-decimal position base market value with every position input explicit

Non-goals

  • Does not fetch prices, FX rates, positions, or classifications for portfolio.position_base_market_value.
  • Does not apply legal, regulatory, tax, or accounting policy for portfolio.position_base_market_value.

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

math

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input64 KB

How we handle your data

Sensitive input, safe output
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
itemsarrayYesFrom 1 through 10,000 closed calculations processed in caller order.

Output schema

FieldTypeRequiredDescription
resultsarrayYesFrom 1 through 10,000 results preserving input order, each a closed itemId plus the calculated scalars.
countintegerYesNumber of requested and emitted results.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"portfolio.position_base_market_value","input":{"items":[{"itemId":"position-1","localMarketValue":"100","fxRate":"1.2","baseCurrency":"USD"}]}}'
Integrations
TypeScript SDK
import { Squillify } from "@squillify/sdk";

const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });

const { output } = await sq.execute("portfolio.position_base_market_value", {"items":[{"itemId":"position-1","localMarketValue":"100","fxRate":"1.2","baseCurrency":"USD"}]});

Errors

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.
DECIMAL_INVALID400NoThe request payload failed this skill's input validation.
PORTFOLIO_INPUT_INVALID400NoThe request payload failed this skill's input validation.
ITEM_LIMIT_EXCEEDED429NoA size, quota, rate, or time limit was exceeded.
CURRENCY_INVALID400NoThe request payload failed this skill's input validation.

Other limits

LimitValue
Recommended inline bytes32 KiB

Limitations

  • Does not fetch prices, FX rates, positions, or classifications for portfolio.position_base_market_value.
  • Does not apply legal, regulatory, tax, or accounting policy for portfolio.position_base_market_value.
  • Inferred prices, factors, currencies, or grouping for portfolio.position_base_market_value.

How to call

POST /v1/execute (requires authentication)

Request bodyjson
{
  "skillKey": "portfolio.position_base_market_value",
  "input": {
    "items": [
      {
        "itemId": "position-1",
        "localMarketValue": "100",
        "fxRate": "1.2",
        "baseCurrency": "USD"
      }
    ]
  }
}

Examples

Verified calculation

Inputjson
{
  "items": [
    {
      "itemId": "position-1",
      "localMarketValue": "100",
      "fxRate": "1.2",
      "baseCurrency": "USD"
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "position-1",
      "baseMarketValue": "120",
      "baseCurrency": "USD",
      "conversionTrace": {
        "localMarketValue": "100",
        "fxRate": "1.2"
      }
    }
  ],
  "count": 1
}
Tip
Returns the primary independently recomputed W09 vector.

Alternative calculation

Inputjson
{
  "items": [
    {
      "itemId": "position-2",
      "localMarketValue": "-5",
      "fxRate": "2",
      "baseCurrency": "EUR"
    }
  ]
}
Expected outputjson
{
  "results": [
    {
      "itemId": "position-2",
      "baseMarketValue": "-10",
      "baseCurrency": "EUR",
      "conversionTrace": {
        "localMarketValue": "-5",
        "fxRate": "2"
      }
    }
  ],
  "count": 1
}
Tip
Returns a materially different independently recomputed W09 vector.
  • Auditable position algebra for portfolio.position_base_market_value.
  • Bounded explicit portfolio calculations for portfolio.position_base_market_value.

Avoid for

  • Inferred prices, factors, currencies, or grouping for portfolio.position_base_market_value.

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.

Tags

portfoliomathfinance