docs: rewrite JavaScript SDK first-use guide#9
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR rewrites the public-facing JavaScript SDK README to lead with a first successful request workflow (install → fetch Apple’s latest 10‑K → inspect a source-linked compact response), and updates npm package metadata to better reflect supported runtimes and support links.
Changes:
- Restructures
README.mdaround a “first request” path, then organizes common usage topics (pagination, errors, auth, retries, streams, contributing). - Updates
package.jsonpackage description, adds a Node.js engines constraint (18+), and replaces the bugs/support URL with GitHub Issues.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| README.md | Rewritten first-use guide and reorganized operational docs (auth, retries, streams, etc.). |
| package.json | Updates npm metadata (description, Node engines, bugs URL) to match the public SDK positioning. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ``` | ||
|
|
||
| ### Ownership and Institutional Holdings | ||
| The SDK also recognizes these environment variables: |
Comment on lines
+160
to
+162
| The SDK retries transient failures for safe HTTP methods with exponential backoff and jitter. By default it retries network errors and HTTP `408`, `429`, `502`, `503`, and `504` responses, up to three retries within a 30-second budget. It honors `Retry-After` on rate limits and opens a circuit breaker after five consecutive retryable failures. | ||
|
|
||
| ```ts | ||
| // Market calendar | ||
| const calendar = await client.marketCalendar({ market: "XNYS", duration: 3 }) | ||
| Mutating requests and MCP tool calls use `POST` and are not retried automatically. Opt in only when the operation is safe to repeat: |
|
|
||
| // Insider trades | ||
| const insiders = await client.insiders({ ticker: "AAPL", limit: 10 }) | ||
| For normal data requests, use an API key. Dashboard and account-management methods require a WorkOS bearer token. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites the public JavaScript SDK README around one useful first success: install the package, retrieve Apple's latest 10-K, inspect the source-linked response, and understand what to do next. It also corrects standalone repository commands and package discovery metadata.
Linear: OMNI-5200
Scope
src/— SDK source (client, types, resources)test/— Test suiteexamples/— Example programspackage.json/ dependenciestsconfig.json/tsconfig.build.json— TS configREADME.md/ docs.github/— CI/CD workflowsChanges
agentLatestFilingrequest, and a production-verified compact response with SEC accession and source URL.Verification
Additional verification
Three GPT-5.5 High adversarial reviewers covered factual accuracy, editorial quality, and developer experience. Round one findings were addressed; round two passed at 93/100 editorial quality with no blocking findings.
Deployment Impact
package.jsonGitHub will show the README after merge. The npm package page will show the new README and metadata with the next package publish.
Completion Attestation
Demo
The checked-in live example returned Apple Inc. (
AAPL, CIK0000320193), accession0000320193-25-000079, filing date2025-10-31, and a compact Item 1A result with non-empty content.Agent Context
Key files to read first:
README.mdpackage.jsonsrc/index.tsexamples/agent_workflow.tsDecisions made:
agentLatestFilingbecause it yields the smallest source-linked result a new user can verify.Relevant docs:
README.mdConventions applied: