portfolio

portfolio is a skill for Claude Code from marketcalls/openalgo-claude-plugin. It costs 26 tokens per session (3,095 once invoked), scanned A, original, MIT.

A trading-portfolio tool for OpenAlgo, a software service that connects code to brokerage accounts. It provides access to balances, positions, holdings, orders, trades, and margin information.

In plain words
What is it for?
Use it to review funds, positions, holdings, order history, trade history, margin, and account information through Python scripts or code.
Why use it?
It puts common account and trading details in one interface instead of requiring separate checks. It also helps calculate the margin needed for a proposed trade.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the openalgo-python plugin — 6 skills shipped together

Good fit Use it to review funds, positions, holdings, order history, trade history, margin, and account information through Python scripts or code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marketcalls/openalgo-claude-plugin/portfolio
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add marketcalls/openalgo-claude-plugin --skill portfolio
Clone the repo
git clone --depth 1 https://github.com/marketcalls/openalgo-claude-plugin

Made for: Claude Code.

Or install openalgo-python, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for portfolio

README.md
[![agentmods](https://agentmods.dev/badge/skills/marketcalls/openalgo-claude-plugin/portfolio/github.svg)](https://agentmods.dev/skills/marketcalls/openalgo-claude-plugin/portfolio)
Your own site
<a href="https://agentmods.dev/skills/marketcalls/openalgo-claude-plugin/portfolio"><img src="https://agentmods.dev/badge/skills/marketcalls/openalgo-claude-plugin/portfolio/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for portfolio

Your own site · 80×15
<a href="https://agentmods.dev/skills/marketcalls/openalgo-claude-plugin/portfolio"><img src="https://agentmods.dev/badge/skills/marketcalls/openalgo-claude-plugin/portfolio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,095 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.03095
Opus 5 $0.00013 $0.01548
Sonnet 5 $0.00005 $0.00619
Haiku 4.5 $0.00003 $0.00310

Measured 12d ago against content hash ff62492b5c5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

portfolio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/margin.py, scripts/portfolio.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/openalgo-python/skills/portfolio/SKILL.md · 593 lines

How it starts

The opening of the file, as written. The whole thing — 593 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OpenAlgo Portfolio Management

Manage your trading portfolio using OpenAlgo's unified Python SDK. Access funds, positions, holdings, orders, trades, and margin information.

Environment Setup

from openalgo import api

client = api(
    api_key='your_api_key_here',
    host='http://127.0.0.1:5000'
)

Quick Start Scripts

Portfolio Summary

python scripts/portfolio.py --summary

View Positions

python scripts/portfolio.py --positions

View Holdings

python scripts/portfolio.py --holdings

Calculate Margin

python scripts/margin.py --symbol NIFTY30JAN2526000CE --exchange NFO --action SELL --quantity 75

Core API Methods

1. Funds

Get account balance and margin information:

response = client.funds()

Response:

{
  "status": "success",
  "data": {
    "availablecash": "320.66",
    "collateral": "0.00",
    "m2mrealized": "3.27",
    "m2munrealized": "-7.88",
    "utiliseddebits": "679.34"
  }
}

Fields Explained:

  • availablecash: Cash available for new trades
  • collateral: Pledged collateral value
  • m2mrealized: Realized Mark-to-Market P&L
  • m2munrealized: Unrealized Mark-to-Market P&L
  • utiliseddebits: Margin utilized for open positions

2. Position Book

Get all open positions:

response = client.positionbook()

Response:

{
  "status": "success",
  "data": [
    {
      "symbol": "RELIANCE",
      "exchange": "NSE",
      "product": "MIS",
      "quantity": "10",
      "average_price": "1180.50",
      "ltp": "1189.90",
      "pnl": "94.00"
    },
    {
      "symbol": "SBIN",
      "exchange": "NSE",
      "product": "MIS",
      "quantity": "-5",
      "average_price": "770.20",
      "ltp": "769.80",
      "pnl": "2.00"
    }
  ]
}

Notes:

  • Positive quantity = Long position
  • Negative quantity = Short position
  • P&L is calculated as (LTP - Avg Price) * Quantity

3. Holdings

Get delivery holdings (CNC):

Read the full file on GitHub · 593 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 593 lines · 26 tokens per session scan A ff62492b5c5b

Subscribe to this mod's changes

portfolio is a skill published in the GitHub repository marketcalls/openalgo-claude-plugin (3 stars, last pushed 8mo ago), licensed MIT. It adds 26 tokens to every session and 3,095 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

technical-documentation

Audit, write, and improve developer documentation using Google's Developer Documentation Style Guide and Technical Writing courses. Use this skill for any documentation work, even when the user names no style guide: "audit our docs", "review this README", "write a README", "getting started guide", "how-to or…

wondelai/skills · 204 tokens

top-design

Create award-winning, immersive web experiences at the level of Awwwards-featured agencies. Use when the user mentions "Awwwards quality", "make my site stunning", "scroll animations", "parallax storytelling", "cinematic web design", "portfolio site", or "brand experience". Also trigger when elevating a standard…

wondelai/skills · 113 tokens

design-everyday-things

Apply foundational design principles: affordances, signifiers, constraints, feedback, and conceptual models. Use when the user mentions "why is this confusing", "affordance", "error prevention", "discoverability", "human-centered design", "mental model", "mapping", "seven stages of action", "users keep making…

wondelai/skills · 132 tokens

design-sprint

Run a structured 5-day process to prototype, test, and validate product ideas with real users. Use when the user mentions "design sprint", "validate before we build", "rapid prototype", "test with users", or "should we build this". Also trigger when a team is stuck in endless debate over a high-stakes product…

wondelai/skills · 137 tokens

improve-retention

Diagnose and fix retention problems using behavior design (B=MAP). Use when the user mentions "users sign up but dont stick around", "activation rate", "onboarding friction", "retention metrics", "why users dont complete", "churn analysis", or "aha moment". Also trigger when analyzing cohort retention curves…

wondelai/skills · 129 tokens

web-typography

Select, pair, and implement typefaces for web projects. Use when the user mentions "font pairing", "which typeface", "line height", "responsive typography", "web font loading", "type hierarchy", "variable fonts", "FOUT/FOIT", "typographic scale", or "the text is hard to read". Also trigger when choosing between system…

wondelai/skills · 128 tokens