feat(uta): add INDstocks (INDmoney) broker adapter — Indian equities#394
Open
shaktiman808 wants to merge 1 commit into
Open
feat(uta): add INDstocks (INDmoney) broker adapter — Indian equities#394shaktiman808 wants to merge 1 commit into
shaktiman808 wants to merge 1 commit into
Conversation
Adds an IBroker adapter for INDstocks (INDmoney's trading API), wiring NSE/BSE equities (secType STK) into UTA as a first-class broker engine. What landed: - services/uta/.../brokers/indstocks/ — IndstocksBroker (full IBroker surface: lifecycle, contract search, place/modify/cancel/close, account/positions/orders, quotes, historical bars, market clock), REST client, contract mapping, order-update stream, types, spec (22 tests). - BrokerEngine type extended with 'indstocks'; registry + brokers index export wired. - INDSTOCKS_PRESET added to the broker preset catalog (recommended, securities), with credential fields (Client ID + daily Access Token) and hints documenting the SEBI 24h-token reality and DDPI-for-sells. - presets.spec.ts: SAMPLE_CONFIGS fixture for the new preset (the catalog round-trip guard requires one per preset). Scope / known limits (intentional, tracked as in-file TODOs): - Equities only; F&O (FUT/OPT) deferred. - LIVE only — INDstocks exposes no paper/sandbox. Orders are real money. - Daily access token expires every 24h with no refresh; a 403 maps to a permanent AUTH error (disable + surface), never auto-renewed. - Field mappings follow public docs and are not yet verified against live venue responses (STATUS: SCAFFOLD) — not yet run through the UTA live-testing S1–S12 catalog, which can't use a demo account here. Boundary: trading / broker / credentials. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HYGa4ykf6Suq3DZnSxVVKb
|
@shaktiman808 is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
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
Adds an
IBrokeradapter for INDstocks (INDmoney's trading API), wiring NSE/BSE Indian equities into UTA as a first-class broker engine — OpenAlice's first Indian-market broker.services/uta/src/domain/trading/brokers/indstocks/—IndstocksBroker(fullIBrokersurface: lifecycle, contract search, place/modify/cancel/close, account/positions/orders, quotes, historical bars, market clock), hand-rolled REST client, contract/symbol mapping, order-update WebSocket stream, types, and a 22-test spec.BrokerEngineextended with'indstocks';registry.ts+ brokersindex.tswired;presets.tsSerializedBrokerPreset.enginede-duplicated to reuseBrokerEngine.INDSTOCKS_PRESETadded to the broker preset catalog (Recommended / securities) with credential fields (stable Client ID + daily Access Token) and hints documenting the SEBI 24h-token reality and the DDPI-for-sells requirement.userId, never the dailyaccessToken(the token rotates every 24h — fingerprinting it would mint a new UTA id and orphan the commit log on each rotation).Scope & known limits (intentional — tracked as in-file TODOs)
BrokerError('AUTH')→ halt + surface to the user (paste a fresh token). Never auto-renewed.InternalServerExceptionwith no order_id — the adapter maps this to an actionable error hint rather than a mysterious failure.Treat this as a live-only / experimental broker until a full live-venue pass lands.
Test plan
npx tsc --noEmit(Alicesrc/) — cleanpnpm -F @traderalice/uta-protocol typecheck— cleanpnpm test(whole monorepo) — 2053/2053 passing (139 files), incl. the new 22-testIndstocksBroker.spec.tsand thepresets.spec.tscatalog round-trip guardBoundary touch
Trading / broker / credentials. New broker engine + credential preset; touches
services/utabroker registry anduta-protocolpreset catalog. No changes to FX, sealing, snapshots, or guards.🤖 Generated with Claude Code
https://claude.ai/code/session_01HYGa4ykf6Suq3DZnSxVVKb