pcmarts/crypto-balanced-portolio-builder · v1.0.1
What an agent reads when it fetches this URL: the whole manifest, in order, with the offer on the last line as a 402 it can pay. Nothing here is a button — an agent does not click, it signs. The page a person reads is here.
Pack · 4 docs · 3 assets · 3 other files · 10 files · text 62.8 kB · binary 2.5 MB (98%) · HTML 100% · MIT, resale permitted
scan passed 2026-09-16 · scanner 2026.09.1 · 2 releases · last release 1 day ago · 10% of files seen elsewhere
computed 2026-09-16 12:44 UTC · analyzer 0.1.0Security scan report
Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git are listed below.
- secrets
- none found
- X402 Git
- size limits
- within caps
- X402 Git
- known malware
- no dependency manifests to check
- OSV
- known vulnerabilities
- no dependency manifests to check
- OSV
- dependency behaviour
- no dependency manifests to check
- Socket
- instruction smuggling
- none found
- X402 Git
- what it can do
- listed below
- X402 Git
What this can do
- Tools
- none
- Runs
- nothing
- Talks to
- api.coingecko.com
- www.coingecko.com
- Reads
- no environment variables
- At install
- nothing runs
- Links to
- coingecko.com
- help.coinstats.app
- img.shields.io
Findings (2)
- LOWcrypto_portfolio_capped_v4.html — Talks to api.coingecko.com
- LOWcrypto_portfolio_capped_v4.html — Talks to www.coingecko.com
Description self_reported
Written by the creator. Not verified by this platform — everything above and below this section is computed from the repository.
Balances your crypto portfolio using coinstats export
When to use it. you need a coinstats export balancer interface
Readme
Crypto Portfolio by Market Cap
Build a market-cap-weighted crypto portfolio with per-asset caps, then get an exact buy/sell list to rebalance. Built with CoinStats users in mind, but any holdings CSV works.

Who this is for
CoinStats users who want to rebalance quickly. CoinStats tells you what you own, but not what to buy or sell to reach a target allocation. Export your Balances CSV, set a target, upload the file, and you get a per-coin BUY / SELL / HOLD list with exact units and dollar amounts. The export steps are documented below with screenshots.
Anyone who wants a market-cap-weighted portfolio. You don't need CoinStats, or any holdings file at all. Set a portfolio size, a number of coins and a maximum weight per coin, and the tool builds the allocation from live market data. If you track holdings somewhere else, any CSV with a Symbol column and an Amount column gives you the same rebalancing list.
Either way, the whole thing is one HTML file that runs in your browser. No accounts, no servers, no API keys, no install. Your holdings never leave your machine.
Quick start
- Download
crypto_portfolio_capped_v4.html. - Open it in any modern browser (double-click it).
- Set your inputs and click Build Portfolio. This fetches live market caps from CoinGecko and builds your target allocation.
- Optional: under Rebalance from CoinStats, upload your holdings CSV and click Compare Holdings.
- Read the Portfolio Adjustments Needed table, or click Download Adjustments CSV.
Want to try step 4 before exporting anything? Upload docs/sample-coinstats-balances.csv.
Exporting your balances from CoinStats
If you use CoinStats, this is the file to upload in step 4. CoinStats currently marks CSV export as a Premium feature.
Web (coinstats.app)
- Go to the Portfolio Tracker page and select the portfolio you want to rebalance.
- Open the Assets tab.
- Click the Export button (the download icon at the top right of the assets table).
- Choose Balances. Save the CSV file.

Mobile app (iOS / Android)
- Open the Portfolio tab and pick the portfolio you want to rebalance.
- Tap the three-dot button below the chart.
- Tap Portfolio Settings.
- Scroll down and tap Export Data.
- Choose Balances and save or share the CSV file, then get it onto the computer where you'll open the tool.

Steps and screenshots are from the CoinStats help article How to Export Transactions to CSV. If the CoinStats interface changes, that article is the source of truth.
Export Balances rather than Transaction History. The transaction export lists individual trades, not what you currently hold.
Using a CSV from somewhere else
The tool only needs two columns: Symbol and Amount (column names are matched case-insensitively, and an Amount or Total column both work). Extra columns are ignored. Multiple rows for the same symbol are summed, so a coin held on several exchanges or wallets is treated as one position. Exports from most other trackers and exchanges will work as-is or after renaming a header.
What the tool does
Builds a target allocation
- Pulls the top N coins by market cap from CoinGecko (live, paginated, deduplicated by symbol).
- Weights each coin by market cap, clips anything over your per-coin cap, and redistributes the excess proportionally until every dollar is allocated.
- Lets you pin specific coins to exact percentages with custom targets. Whatever remains is spread across the market-cap-weighted coins.
- Excludes stablecoins by default, plus a default exclusion list you can edit.
Compares it against your current holdings
- Every coin you hold or should hold gets an action: BUY, SELL or HOLD.
- Shows current units, target units, the delta, and the same in USD.
- Coins you hold that are not in the target get a SELL row so nothing is silently ignored.
- Summary chips: current value, target value, number of buys and sells, net adjustment.
Exports
- Target allocation as CSV or JSON, respecting the current sort order.
- Adjustments list as a separate CSV once you've compared holdings.
Interface
- Sortable results table with inline weight bars showing the cap and any clipped portion.
- Donut chart with hover highlighting synced to the legend.
- Dark, responsive, keyboard accessible. Coin names link to CoinGecko.
How the allocation maths works
- Fetch the top N coins by market cap from CoinGecko.
- Compute baseline weights as
coin market cap / total market cap. - Apply the per-coin cap and redistribute clipped weight proportionally until fully allocated.
- Subtract any custom targets first; the rest of the portfolio is allocated by market cap.
- Convert weights to target USD and target units using your portfolio value.
- If you uploaded holdings, compare target units against what you hold to produce the buy/sell list.
Development
- Stack: HTML + CSS + vanilla JS, no dependencies
- Single file: edit crypto_portfolio_capped_v4.html directly
- Testing: open the file in a browser; there is no build
Notes & limitations
- Uses CoinGecko's free public API for market data. Rate limits (HTTP 429) are handled with retry/backoff, but heavy refreshing will still get throttled.
- Prices come from CoinGecko, not from your holdings export, so values can differ slightly from what your tracker shows.
- All calculations are client-side. Verify the numbers before you trade on them.
- Not financial advice.
Privacy
100% client-side. The only network request the page makes is to CoinGecko's public API for market data. Your portfolio size, holdings CSV, and allocations never leave your machine.
Attribution
- Market data from the CoinGecko Public API
- CoinStats export screenshots from the CoinStats Help Center. CoinStats is a trademark of its owner; this project is not affiliated with or endorsed by CoinStats.
License
MIT — free to use, modify, and distribute, including commercially.
Contents
| Size | Path |
|---|---|
| 72 B | .gitignore |
| 1.1 kB | LICENSE |
| 7.2 kB | README.md |
| 51.8 kB | crypto_portfolio_capped_v4.html |
| 572 kB | docs/coinstats-export-mobile.jpg · binary |
| 1.1 MB | docs/coinstats-export-web.png · binary |
| 1 kB | docs/release-v1.0.0.md |
| 1.3 kB | docs/release-v1.0.1.md |
| 339 B | docs/sample-coinstats-balances.csv |
| 847 kB | docs/screenshot.png · binary |
Dependencies
None found in the software bill of materials for this release.
computed 2026-09-16 12:44 UTC · analyzer 0.1.0Releases
| Version | Date | Scan | Changed | Notes |
|---|---|---|---|---|
| v1.0.1 | 2026-09-16 | pass | 9 files, 261 lines | Repositioning and documentation release. No changes to the allocation or rebalancing maths. **Getting started:** download `crypto_portfolio_capped_v4.html` below and open it in any modern browser. - **CoinStats front and centre.** The README and in-app copy now explain that the tool is built for CoinStats users who want to rebalance quickly, while still working for anyone with a Symbol/Amount holdings CSV or no holdings file at all. - **Step-by-step CoinStats export guide** for web and mobile, with screenshots from the CoinStats Help Center, plus a sample Balances CSV (`docs/sample-coinstats-balances.csv`) to try the rebalancing flow without exporting anything. - **New demo screenshot** showing the full flow: target allocation, donut chart and the buy/sell adjustments table. - **Holdings panel renamed** to "Rebalance from CoinStats" with the export path shown inline. - **White-labelling removed.** The branding config object, footer and related docs are gone; the title and version are plain text. - **Third-party branding removed** from the README, HTML and LICENSE. ### Notes Uses CoinGecko's free public API; rate limits are handled with retry/backoff but heavy refreshing will still get throttled. All calculations are client-side. Verify before trading. Not financial advice. |
| v1.0.0 | 2026-09-01 | pass | — | First packaged release of Crypto Portfolio by Market Cap. A single-file, client-side tool that builds a market-cap-weighted crypto portfolio with per-asset caps. Live CoinGecko data, buy/sell rebalancing against your current holdings, CSV/JSON export. No accounts, no servers, no API keys, no build step. **Getting started:** download `crypto_portfolio_capped_v4.html` below and open it in any modern browser. ### What's in this release - **MIT licensed** — free to use, modify and distribute, including commercially. - **White-label ready** — every brand-facing string lives in a single `APP` object at the top of the script block. Change the name, version, brand and footer in one place; set `brandName` to an empty string to hide the footer. Colors are CSS custom properties in `:root`. - **Metadata** — proper page title, meta description, Open Graph tags and an inline SVG favicon, all embedded so the file stays genuinely standalone. - **Rewritten README** with a screenshot of the running app and white-labelling docs. ### Notes Uses CoinGecko's free public API; rate limits are handled with retry/backoff but heavy refreshing will still get throttled. All calculations are client-side — verify before trading. Not financial advice. |
Machine-readable at https://x402git.com/api/v/pcmarts/crypto-balanced-portolio-builder/releases. Entries cannot be deleted by the creator.
Order
GET v1.0.1 · $0.02 · new releases $0.005
The resource endpoint answers 402 with the price and the exact bytes to sign; the same request carrying PAYMENT-SIGNATURE returns a signed download URL. Access is granted only after settlement returns a transaction hash. A person can do the same thing with a browser wallet on the product page.
# the 402, with the price and the exact bytes to sign
curl -si https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder
# what your wallet already owns, and what the next fetch would cost it
curl -s https://x402git.com/api/v/pcmarts/crypto-balanced-portolio-builder \
-H "X-Wallet-Signature: 0xYOURADDRESS.<nonce>.<signature>"The first request answers this — a real quote, made for this page load:
HTTP/1.1 402 Payment Required
Content-Type: application/json
{
"x402Version": 2,
"resource": {
"url": "https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder",
"description": "pcmarts/crypto-balanced-portolio-builder v1.0.1 — release. Balances your crypto portfolio using coinstats export Security scan passed; signed download, 5-minute URL.",
"mimeType": "application/zip",
"serviceName": "crypto-balanced-portolio-builder",
"tags": [
"pack",
"docs",
"assets",
"other",
"html"
]
},
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "20000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xDbd32F7565FFdb901Ea48281777aD03d35bB4b60",
"maxTimeoutSeconds": 300,
"extra": {
"name": "USD Coin",
"version": "2"
},
"maxAmountRequired": "20000",
"resource": "https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder",
"description": "pcmarts/crypto-balanced-portolio-builder v1.0.1 — release. Balances your crypto portfolio using coinstats export Security scan passed; signed download, 5-minute URL.",
"mimeType": "application/zip"
}
],
"extensions": {
"bazaar": {
"info": {
"input": {
"type": "http",
"queryParams": {},
"method": "GET"
},
"output": {
"type": "json",
"example": {
"version": "1.0.1",
"artifact_sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"download_url": "https://storage.example/pcmarts/crypto-balanced-portolio-builder/1.0.1.zip?signed=…",
"expires_at": "2026-09-16T12:05:00.000Z",
"version_endpoint": "https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder/v/1.0.1",
"manifest_url": "https://x402git.com/api/label/pcmarts/crypto-balanced-portolio-builder",
"all_versions": false
}
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "http"
},
"method": {
"type": "string",
"enum": [
"GET"
]
},
"queryParams": {
"type": "object",
"properties": {}
}
},
"required": [
"type",
"method"
],
"additionalProperties": false
},
"output": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"example": {
"type": "object",
"properties": {
"version": {
"type": "string",
"description": "Semantic version of the release served."
},
"artifact_sha256": {
"type": "string",
"description": "sha256 of the zip; verify the download against it."
},
"download_url": {
"type": "string",
"description": "Signed URL over the exact bytes that were scanned. Valid five minutes."
},
"expires_at": {
"type": "string",
"format": "date-time"
},
"version_endpoint": {
"type": "string",
"description": "Re-fetch this exact version later, free, with X-Wallet-Signature."
},
"manifest_url": {
"type": "string",
"description": "The public manifest for this listing."
},
"all_versions": {
"type": "boolean",
"description": "True when the purchase covers every later release too."
}
},
"required": [
"version",
"artifact_sha256",
"download_url",
"expires_at",
"version_endpoint",
"manifest_url",
"all_versions"
],
"additionalProperties": false
}
},
"required": [
"type"
]
}
},
"required": [
"input"
]
}
}
},
"extra": {
"kind": "new",
"version": "1.0.1",
"manifest_url": "https://x402git.com/api/label/pcmarts/crypto-balanced-portolio-builder",
"scan_badge_url": "https://x402git.com/api/label/pcmarts/crypto-balanced-portolio-builder#scan",
"update_price_micro": "5000",
"quote_id": "q_2098c1b03c0415fc4688ef6c47dcccff",
"valid_before": "2026-09-17T03:24:00.129Z",
"instructions": "This is an x402 paywall, not an error. To buy: sign accepts[0] from the 402 as an EIP-3009 USDC authorization on Base with your own wallet, then GET https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder again with the payment in the PAYMENT-SIGNATURE header and extra.quote_id in X-Quote-Id — or, over MCP, call `purchase` again with the same payment as `payment_signature`. The full procedure is at https://x402git.com/.well-known/agent-skills/buy-a-repo/SKILL.md; the same tools are an MCP server at https://x402git.com/api/mcp. No wallet? A person can buy at https://x402git.com/pcmarts/crypto-balanced-portolio-builder, and the free manifest at https://x402git.com/api/label/pcmarts/crypto-balanced-portolio-builder shows what is inside before anyone pays.",
"listing_url": "https://x402git.com/pcmarts/crypto-balanced-portolio-builder",
"skill_url": "https://x402git.com/.well-known/agent-skills/buy-a-repo/SKILL.md",
"mcp_url": "https://x402git.com/api/mcp"
}
}- Resource
- https://x402git.com/api/r/pcmarts/crypto-balanced-portolio-builder
- Manifest
- https://x402git.com/api/label/pcmarts/crypto-balanced-portolio-builder
- Version
- https://x402git.com/api/v/pcmarts/crypto-balanced-portolio-builder
- Artifact sha256
- edddc8869c4f25ff5cf62438d92142513a2f23635421ee23219835e2afb7f04a
Later releases cost $0.005, and never more than the update price in force when you bought. One charge per update, whatever the release cadence.
Sold by pcmarts. Read the terms and the route documentation before you script against this. Base URL https://x402git.com.