Skip to content

PipSync Playground

Browser-only tools for building and checking PipSync-shaped paper integrations.

Run the playground locally · Inspect the public schema · Inspect the browser QA route

Important

The playground is paper-only developer tooling. It does not connect to a broker, accept production credentials, place orders, recommend trades, or guarantee execution or returns. Trading involves risk.

What you can do

  • build an editable TradingView paper payload in under a minute
  • validate JSON against a pinned public pipsync.signal.v1 schema snapshot
  • calculate a transparent position size from explicit units and a loss budget
  • generate a synthetic HMAC-SHA-256 example with a fixed public demo key
  • inspect every calculation and validation rule without an account

The tools issue no network requests. There is no analytics code, remote font, runtime dependency, service worker, credential input, live mode, or order path. A restrictive Content Security Policy blocks runtime connections as an extra control. External links navigate only when a user selects them.

Start locally

Requirements: Node.js 20 or newer. No package installation is required.

npm test
npm run serve

Then open http://127.0.0.1:4173. The local server binds only to loopback.

npm test runs the Node built-in unit tests, repository QA checks, and a clean static build. qa/ provides the same core conformance checks as a readable browser route.

Safety boundary

The playground confirms The playground does not confirm
Local JSON syntax and signal shape A live ingestion endpoint
Rules in the pinned public schema snapshot Authentication or authorization
Transparent arithmetic with caller-supplied units Broker metadata, limits, fees, or slippage
A synthetic HMAC construction A production signing contract
Browser-local behavior Order acceptance, execution, or trading outcomes

Never paste API keys, webhook secrets, account identifiers, customer payloads, private URLs, or live broker data into examples. The HMAC demo deliberately uses the fixed, non-secret key pipsync-synthetic-demo-key-v1 and offers no secret input.

Contract snapshot

The vendored schema is an unmodified copy from pipsync-spec@v1.0.0. Its provenance and SHA-256 digest are recorded in vendor/README.md. The browser never loads a schema from main or another network location.

The standalone signal schema is a community interchange format for fixtures, SDKs, mocks, and connector conformance. Its presence does not imply a live PipSync write endpoint. The published REST contract remains the source of truth for documented live API paths.

Position-size method

The calculator uses:

loss budget = equity × risk percent ÷ 100
loss per size unit = |entry - stop| × contract multiplier × conversion rate
raw size = loss budget ÷ loss per size unit

The displayed size rounds down to the caller-provided size step and is checked again so its estimated loss does not exceed the calculated budget. The browser cannot infer contract multiplier, quote-to-account conversion, size step, broker limits, fees, or slippage. Confirm those values independently. For the reusable audited arithmetic package, see pipsync-risk-math.

Repository layout

index.html                 Accessible single-page workbench
styles.css                 Responsive OKLCH design tokens and components
src/core.js                Pure validation, calculation, and HMAC logic
src/app.js                 Browser interaction and state rendering
vendor/                    Pinned public signal schema snapshot
qa/                        Dependency-free in-browser conformance route
tests/                     Node built-in unit tests
scripts/                   Static build, QA, and loopback server
.github/workflows/         CI and GitHub Pages deployment

Releases and compatibility

The app version is recorded in package.json, version.json, the interface, and CHANGELOG.md. Schema compatibility is pinned separately in version.json. A playground release may update UI behavior without changing the vendored signal schema version.

Contributing and security

Read CONTRIBUTING.md before opening a change. Report vulnerabilities privately according to SECURITY.md. Do not place secrets or real trading data in an issue, pull request, fixture, screenshot, or security report.

License

Apache-2.0. See LICENSE and NOTICE.

About

Browser-only signal validator, TradingView paper-alert builder, position sizing, and HMAC demo.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages