{"_id":"@nemesis-oss/binance-sdk","_rev":"12-1c72242fb57bf475e27e16abf6672792","name":"@nemesis-oss/binance-sdk","dist-tags":{"latest":"3.6.0"},"versions":{"1.0.0":{"name":"@nemesis-oss/binance-sdk","version":"1.0.0","keywords":["binance","futures","usdm","spot","api","client","crypto","trading","websocket","typescript"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@1.0.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"30a18afe9c12b8e755a6b9b0c6763e85dc1934b6","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-1.0.0.tgz","fileCount":22,"integrity":"sha512-IXDYuZPWCiyeaZh3Sqvc1kwfcPyHP8lSh5CYUOdWxkC8gPhOKcUtfnOE0RyXLjq2blCX8xhhnrgN7cqlk26Aew==","signatures":[{"sig":"MEUCIQCTHoNp5S+s0fp5qb93wIhSbOwjn/055VYqYkoQaHpXgwIgQM/WIIP/dewUZ5vapVPmo2n9DLfIazS7Kn70nLWIGOc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":2794896},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./package.json":"./package.json"},"gitHead":"cb5fc6d0d344bcc398544b7e034327c7155a235b","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","example:paper":"tsx examples/paper-trading.ts","example:quickstart":"tsx examples/quickstart.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"TypeScript SDK for Binance APIs (Spot + USD-M Futures) — market data, account, trading, algo orders, user data streams, signed WS API, LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","tsx":"^4.23.12","tsup":"^8.3.5","vitest":"^4.1.10","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_1.0.0_1787171716511_0.13412698787420774","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@nemesis-oss/binance-sdk","version":"2.0.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@2.0.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"892ed4c9a8e53a8a73cef832ad4c0ce48dbe7995","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-2.0.0.tgz","fileCount":22,"integrity":"sha512-O7NTDy3EkKGR4zMZU08MAcczCzXfVNoHG/rBi1xVujd0g/urTCYYChp0wo3BtZSyzESuO4hQtUUGp7CGZUjh1A==","signatures":[{"sig":"MEYCIQC9sBJWl6iugSwcnq7d0bFyx93O2hVyOlMuL/aY7nvZJAIhAPMEXEkjQ3i41NALfmzXMyWpyo9Q/UCk0Pu/p73id1Oq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3867608},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./package.json":"./package.json"},"gitHead":"a269ff81d581c070f327e02ec8a1becdf8dff868","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","example:paper":"tsx examples/paper-trading.ts","smoke:testnet":"tsx scripts/testnet-smoke.ts","example:quickstart":"tsx examples/quickstart.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.17.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.19.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","tsx":"^4.23.12","tsup":"^8.3.5","vitest":"^4.1.10","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_2.0.0_1787543819348_0.9361528106858605","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@nemesis-oss/binance-sdk","version":"3.0.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.0.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"41892d262f6a9a4499e414b2d6a12f2610524ed5","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.0.0.tgz","fileCount":23,"integrity":"sha512-h505NEPA491Y3q8MyTHh1Gd5ua19UVsC1Yn2fzDG6Usg7ARFgCQoVGfZT2Z13BPDNOzxAgjrFpxenKGpyFEI9g==","signatures":[{"sig":"MEYCIQDV/lgzlToddXX+ukI3f9SFdgo0KETEZgrfQ1VIxFyGHQIhAKDQ3Vc9F5dpi5BVtwEAf40UhMyveMpitsWPNItKsoT2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCwC51P9Dvwl7ZqYnfGv3KS6z9yj22rYciuDnVdYwtYfQIgZKkQ01RmldczmNtoHe+BCUUm+ff/8xSHj2Ax4mf1AcQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7183947},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./package.json":"./package.json"},"gitHead":"aeed430e8b857cda7ea156304c8c0704fcb272fc","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:paper":"tsx examples/paper-trading.ts","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^2.7.0","tsx":"^4.23.12","tsup":"^8.3.5","vitest":"^5.0.0","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.0.0_1789620850936_0.9909721442709511","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@nemesis-oss/binance-sdk","version":"3.1.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.1.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"546c8606082c2e289fb4b0ec2a7d90c9844ff302","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.1.0.tgz","fileCount":23,"integrity":"sha512-Dir/gV7s8xAzALR+6RoUhwaxzpn8lDKgQEmcHSNTZICc3kiMGWY+8EAHT6CnRQplCPGkUyJtTSIUiEPZ7gGQXQ==","signatures":[{"sig":"MEQCIAE4eXQy3gybNckKIYOitgipedQMcLeRjPh5QosrWbPGAiBBxSY4WAl+4PITNoMnqNDc1tfII1jiz2tewv+C9kfdlA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHrZ6vLqNGyaK+wXVWwEn8tGIDq2mOgXaQQhyKcND4gEAiEAw3DtCD4vg4TgHfEd6pi0DM2CfWscZFolJYg/QNwWPOo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46602367},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"9d2c1bc00004920def6c0d7c757c6b12a5209c36","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:paper":"tsx examples/paper-trading.ts","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","vitest":"^5.0.0","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.1.0_1792834152969_0.05721381090849498","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"name":"@nemesis-oss/binance-sdk","version":"3.1.1","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.1.1","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"90a6ed8639ef375fbecd688378426912418d59b3","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.1.1.tgz","fileCount":23,"integrity":"sha512-+8wlC97ILcrcT07BYRVTYck6Hko6jDU8PtL1SaC7OmRcrTSzY5vE/61UGQ35BjQMK3W3Catr0Jx+U560PoGsIg==","signatures":[{"sig":"MEUCIAsAEk37YMz3EruDHB3tIFngoASKw/CAxAh9q4M4s324AiEAr+KWpi8P8mrI2WWij2GXE6rhjPPnVM6h/oP2ar9gsls=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBh2F+eiV34c3OlzekzS6BvIm5bUcArrhOePrClSUsKnAiBYupwXQXYdJ037qGXAVwfyHN9DFNNPbWd6pqSH0JYoNw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46627809},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"3c9f192d51e6ca0f2a896501d0a688174800f7c8","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","vitest":"^5.0.0","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.1.1_1792847439828_0.737008329774955","host":"s3://npm-registry-packages-npm-production"}},"3.2.0":{"name":"@nemesis-oss/binance-sdk","version":"3.2.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.2.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"7f61731df7e75f9891ec82380956ecc7d4ce6b4f","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.2.0.tgz","fileCount":23,"integrity":"sha512-ZU3pHvvpOzbh4ctXomJaBoG87anlHEKvbi+PWIV1qyieMtlTQ4mHPxmJOZotu0l4B+h4Ki9Ry4wELPegp9e/yw==","signatures":[{"sig":"MEQCIEsrQVrQWuhVM+1sc3qanLhFa74hFOJCq4dfS/cvhmHIAiAPJ8kqi69B+MVzetVRms4CS4qdfTByDqylPD78N8gsqA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIGntrReeC0kn8VeBhYqQ3tyXhoXgcRZtC7jPz+n/aXvcAiBpk2e0Q4822aT2DOn/boN8MSfXco5AnYqnXPXCCNNbZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":46832425},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"91a379e3562677e1b2130c5fe5a0f176a456ee6a","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.21.0","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","vitest":"^5.0.0","@types/ws":"^8.5.13","typescript":"^5.9.3","@types/node":"^26.2.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.2.0_1792848009691_0.9813974019965166","host":"s3://npm-registry-packages-npm-production"}},"3.3.0":{"name":"@nemesis-oss/binance-sdk","version":"3.3.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.3.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"f1cea3d9eae886d6c070a44aba46f19dbc769cb6","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.3.0.tgz","fileCount":23,"integrity":"sha512-XIi/cpfeLv9B7GQMhbDWtcsGeb/vqcPzlbUy5b5ZWaoW/Tj/kWZF790b6L/+kGxONZFdYukxOMCPfFaeeLqYeQ==","signatures":[{"sig":"MEUCIAg+Z9y/+qe+m2xBVUYdk9Guoy3LmudrrGxpJVkzW11fAiEA55ulKgmE2pA6P5dTPtCa9ZiVSUDG1kMjALpEIhv3TBA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIBMQj6TUltiHtFkj8JWwV8pEx4qn/Ox5fNh75V/6MbeEAiEAznQKa5PK3iRxU/t+NnMyyvDizAubStWTkwWyRUsBYmk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47052920},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"a70c16e847a4778f7d6ee2b9be1cae7c2f880f3b","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.22.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^9.39.5","vitest":"^5.0.0","globals":"^16.5.0","@types/ws":"^8.5.13","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.3.0_1793220422810_0.8556314721693572","host":"s3://npm-registry-packages-npm-production"}},"3.4.0":{"name":"@nemesis-oss/binance-sdk","version":"3.4.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.4.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"2ef8372be6bbd74a402918074f2bacb015b6a1ce","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.4.0.tgz","fileCount":23,"integrity":"sha512-OB4D5dCgzS0RT2dU3tdlOK2vfo/YDJsevv0YoivGIWY0Tg7V1o01FJ8AqVP3cMzt3k5GDlVrwm1Q5vFqa3vYKw==","signatures":[{"sig":"MEQCIE+gNK8ziAKh2IEAgsFMJTdXdT2av5PdCA2QIb2WPdvPAiAHCI/NSS5vId3ifjYxng9k5oXkxxmtekis3KLZaSx5CA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCIBAG3XcQlYOmlL0ta3m0OzCIebcRbkfAOt0v3+WQ1cwIgUTpT0s2+TwqAppJBnH89DgZ6jZS6cHem68Uols/6JSs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47121585},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.js"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"bf9faf613736bf10e4cdb0c1d6e785641c007d96","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:wave8-strict-schemas":"tsx scripts/wave8-strict-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.22.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^9.39.5","vitest":"^5.0.0","globals":"^16.5.0","@types/ws":"^8.5.13","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.4.0_1793250340797_0.8834992898055495","host":"s3://npm-registry-packages-npm-production"}},"3.4.1":{"name":"@nemesis-oss/binance-sdk","version":"3.4.1","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.4.1","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"eb544d211629e80aa9f833ff287cf33f970ee779","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.4.1.tgz","fileCount":31,"integrity":"sha512-uUJPb5yFOPDkyk497ggoZcJL87DnN+FQJIDlVnZ8qkDxDzDgHlyhIJtIIGJvXrzTAjLXTaHnc5DkY6xerccSvw==","signatures":[{"sig":"MEYCIQCVrJXe1uaazVoSSjDkyeKpMXHs6yVqcv50zHfcaHLrWgIhAJXLDE4GVtECp+lZ6HFFpHKar5zdzvY2I4XnMJobQ3vc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIFOwyQdgyKQZ6SCZM0HbafbIbGUC/9+Vbxk2UXwed3j1AiEA5dqaaB3zhA+4alcPbrPGfkYtRhzwfVRT6OchHxR2XlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66932216},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/api.d.ts","import":"./dist/mcp/api.js","require":"./dist/mcp/api.cjs"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"b212550e74225de92f56df9b774c5348de1ac4c3","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:wave8-strict-schemas":"tsx scripts/wave8-strict-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.22.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^9.39.5","vitest":"^5.0.0","globals":"^16.5.0","@types/ws":"^8.5.13","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.4.1_1793253325248_0.26942055234093254","host":"s3://npm-registry-packages-npm-production"}},"3.5.0":{"name":"@nemesis-oss/binance-sdk","version":"3.5.0","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.5.0","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"dfe28bf64fa212b57680e2b8e49cd73cf05e1cc5","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.5.0.tgz","fileCount":23,"integrity":"sha512-JH+hSS0V0jHoJzYhDdTwb18JCiVnwp8NGHarus6uRmclZAYJfyh6LLOnlMHWa6/Um3ToA2TzRB+6u//akv9lcw==","signatures":[{"sig":"MEYCIQCcsBv67SbSyRHnopypxt3hkZFIu6+8sqmez91GCHWXDwIhAPTcdAmkJFI2PuBXfs6AFYEnVSHiFydjMglfD66cQdk/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIDD6OMOeMORu3OjkqQvLSgLkLiCE0w8vCHdq9td3yjGPAiEAwjSZw2xfOCBGL1LX+kFJvpzWxGjSMAspylhxQWOUrUI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28697979},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/api.d.ts","import":"./dist/mcp/api.js","require":"./dist/mcp/api.cjs"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"01fefa3d610fc97cec0a3be66ec253c5d078b851","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","package:check-footprint":"tsx scripts/check-package-footprint.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:wave8-vendor-oracle":"tsx scripts/wave8-vendor-oracle.ts","contracts:wave8-strict-schemas":"tsx scripts/wave8-strict-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts","contracts:generate-request-tests":"tsx scripts/generate-request-contract-tests.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.22.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^9.39.5","vitest":"^5.0.0","globals":"^16.5.0","@types/ws":"^8.5.13","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.5.0_1793291403818_0.551169404843728","host":"s3://npm-registry-packages-npm-production"}},"3.5.1":{"name":"@nemesis-oss/binance-sdk","version":"3.5.1","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"author":{"name":"Shubham Taywade"},"license":"MIT","_id":"@nemesis-oss/binance-sdk@3.5.1","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"dist":{"shasum":"262af886f70d140135c07e215cab6d329fb201d8","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.5.1.tgz","fileCount":23,"integrity":"sha512-9VCM3VynzBsdS8fpjQpQ55kQPvNkMp22h2B74Yo7nZqmbMXQXaieXmS+4gjbK9PrOpHCIF7L4yfQJ0llfUb1jw==","signatures":[{"sig":"MEQCIDzFkkUhEbCKkHLCKRtjQr2tD51JjQCnkZnl16W2yVs3AiBSX1Qgpf2/MleGJKDEwWlYM4PIyvYXToTYWeDS1fbE7g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCPzRgXXC/ROvoKupszVrbzs6vh4kHBZSuyGzgwXC+E2wIhAJc7qh+l4GdjB4Qeyvw/hnuZ/n+p6JUpz8Vx6qVpSrEV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28843467},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/api.d.ts","import":"./dist/mcp/api.js","require":"./dist/mcp/api.cjs"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"cccf84a0bc150704b6365a81e1a067d23e1d37fa","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","package:check-footprint":"tsx scripts/check-package-footprint.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:wave8-vendor-oracle":"tsx scripts/wave8-vendor-oracle.ts","contracts:wave8-strict-schemas":"tsx scripts/wave8-strict-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts","contracts:generate-request-tests":"tsx scripts/generate-request-contract-tests.ts"},"_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.19.1","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"sideEffects":false,"_nodeVersion":"24.22.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^9.39.5","vitest":"^5.0.0","globals":"^16.5.0","@types/ws":"^8.5.13","@eslint/js":"^9.39.5","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"tmp":"tmp/binance-sdk_3.5.1_1793374458595_0.20538121542895393","host":"s3://npm-registry-packages-npm-production"}},"3.6.0":{"_id":"@nemesis-oss/binance-sdk@3.6.0","bin":{"binance-sdk-mcp":"dist/mcp/index.js"},"bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"dist":{"shasum":"67e3d91f5a6ebad484222f59c1da61b2e9b7e9a9","tarball":"https://registry.npmjs.org/@nemesis-oss/binance-sdk/-/binance-sdk-3.6.0.tgz","fileCount":31,"integrity":"sha512-dAvMpAPBSrQbkqwYeW2xhHvfVr84PsVDd8gn6k2j4+LPzZsO5ixWEGIO09e6pZBgCYwel5/St7tH3BpEz2SaZw==","signatures":[{"sig":"MEYCIQCPlNoRkQRoV6jfMwv9dA5U1Zpvc3oDYgl6k/rwevAidQIhAJNCcK8RYpRUn43a10dxUf2WpsXJK9IQUG+K1l3XY4go","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCeIx4zYtzaFU5Sl9TpKOh+VygVG0O3jXn5c0Jsfk+1EAIgBJxQFw43le4IQGg5cIW8Ipsn2+N21jcMERYBMGODVcM="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@nemesis-oss%2fbinance-sdk@3.6.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29438174},"main":"./dist/index.cjs","name":"@nemesis-oss/binance-sdk","type":"module","types":"./dist/index.d.ts","author":{"name":"Shubham Taywade"},"module":"./dist/index.js","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./mcp":{"types":"./dist/mcp/api.d.ts","import":"./dist/mcp/api.js","require":"./dist/mcp/api.cjs"},"./spot":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tools":{"types":"./dist/tools/index.d.ts","import":"./dist/tools/index.js","require":"./dist/tools/index.cjs"},"./errors":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./ws-api":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./futures":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./tracker":{"types":"./dist/tracker/index.d.ts","import":"./dist/tracker/index.js","require":"./dist/tracker/index.cjs"},"./orderbook":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"gitHead":"8e767213bb9d6e7d2d49799dfe2946a8bcefa7ac","license":"MIT","scripts":{"dev":"tsup --watch","mcp":"tsx src/mcp/index.ts","lint":"eslint . --max-warnings 0","test":"vitest run","build":"tsup","smoke":"tsx scripts/smoke-test.ts","prepare":"npm run hooks:install","mcp:http":"tsx src/mcp/index.ts --http","typecheck":"tsc --noEmit","example:ws":"tsx examples/ws-streams.ts","test:watch":"vitest","docs:generate":"tsx scripts/generate-endpoint-map.ts","example:agent":"tsx examples/agentic-futures.ts","example:paper":"tsx examples/paper-trading.ts","hooks:install":"git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath .githooks || true","smoke:testnet":"tsx scripts/testnet-smoke.ts","contracts:check":"tsx scripts/check-contracts-drift.ts","contracts:generate":"tsx scripts/generate-contract-catalog.ts","example:quickstart":"tsx examples/quickstart.ts","example:new-products":"tsx examples/new-products.ts","package:check-footprint":"tsx scripts/check-package-footprint.ts","contracts:import-postman":"tsx scripts/import-postman-collections.ts","contracts:upstream-drift":"tsx scripts/upstream-drift.ts","contracts:wave6-close-gaps":"tsx scripts/wave6-close-gaps.ts","contracts:wave7-add-schemas":"tsx scripts/wave7-add-schemas.ts","contracts:wave8-vendor-oracle":"tsx scripts/wave8-vendor-oracle.ts","contracts:wave8-strict-schemas":"tsx scripts/wave8-strict-schemas.ts","contracts:generate-from-postman":"tsx scripts/generate-sdk-from-postman.ts","contracts:generate-request-tests":"tsx scripts/generate-request-contract-tests.ts"},"version":"3.6.0","_npmUser":{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"},"homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"_npmVersion":"11.20.0","description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","directories":{},"maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.13.1","dependencies":{"ws":"^8.21.3","zod":"^4.3.6","axios":"^1.19.0","bottleneck":"^2.19.5","@modelcontextprotocol/sdk":"^1.30.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"msw":"^3.0.1","tsx":"^4.23.12","tsup":"^9.0.0","eslint":"^10.14.0","vitest":"^5.0.0","globals":"^17.14.0","@types/ws":"^8.5.13","@eslint/js":"^10.0.1","typescript":"^5.9.3","@types/node":"^26.2.0","typescript-eslint":"^8.72.0","@vitest/coverage-v8":"^5.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/binance-sdk_3.6.0_1794648072695_0.5003357750914486"}}},"time":{"created":"2026-08-19T20:35:16.312Z","modified":"2026-11-14T09:21:13.302Z","1.0.0":"2026-08-19T20:35:16.707Z","2.0.0":"2026-08-24T03:56:59.563Z","3.0.0":"2026-09-17T04:54:11.064Z","3.1.0":"2026-10-24T09:29:13.135Z","3.1.1":"2026-10-24T13:10:39.997Z","3.2.0":"2026-10-24T13:20:09.961Z","3.3.0":"2026-10-28T20:47:03.035Z","3.4.0":"2026-10-29T05:05:41.010Z","3.4.1":"2026-10-29T05:55:25.452Z","3.5.0":"2026-10-29T16:30:03.993Z","3.5.1":"2026-10-30T15:34:18.730Z","3.6.0":"2026-11-14T09:21:12.900Z"},"bugs":{"url":"https://github.com/shubhamtaywade82/binance-sdk/issues"},"author":{"name":"Shubham Taywade"},"license":"MIT","homepage":"https://github.com/shubhamtaywade82/binance-sdk#readme","keywords":["binance","futures","usdm","coinm","margin","spot","api","client","crypto","trading","websocket","typescript","mcp","llm"],"repository":{"url":"git+https://github.com/shubhamtaywade82/binance-sdk.git","type":"git"},"description":"TypeScript SDK for Binance APIs (Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, Sub-account) — market data, account, trading, algo orders, user data streams, signed REST + WS APIs (HMAC/Ed25519/RSA), LLM tool layer + MCP server","maintainers":[{"name":"nemesis-llm","email":"shubhamtaywade82@gmail.com"}],"readme":"# binance-sdk\n\nTypeScript SDK for Binance — **Spot, USD-M Futures, COIN-M Futures, Margin, Wallet, and\nSub-account**, REST + WebSocket, public market data and authenticated trading.\n\nFull REST + WebSocket endpoint coverage against the official Postman contract\ncatalog (710/710 endpoints, CI-gated), with a tiered typing model: the core\nproducts validate requests **and** responses with field-strict zod schemas at\nruntime; generated long-tail products carry permissive `.loose()` response\nschemas (runtime-checked, but not field-strict contracts) or `unknown`\nresponses until their schemas land. The schema debt is tracked and ratcheted\nin CI — it only shrinks. On top of that: production infrastructure\n(header-based rate-limit tracking, server time sync, HMAC/Ed25519/RSA\nsigning), idempotent reconciling execution, an in-process paper simulator,\nand client-side safety guardrails for autonomous/LLM-driven callers.\n\n## Typing coverage, precisely\n\nWhen the docs below say an endpoint is *covered*, the guarantee is tiered —\ncheck the tier before you rely on a response shape:\n\n| Tier | Meaning | Where |\n|------|---------|-------|\n| **Strict-validated** | Method implemented; request params schema-checked; response parsed and validated by a field-strict zod schema at runtime | Core products (spot, usdm, coinm, margin, wallet, subaccount, options, portfolio margin, portfolio margin pro) + strictness-migrated long-tail (convert) |\n| **Permissively-validated** | Method implemented; response parsed against a generated `.loose()` zod schema — runtime-validated but fields are optional (the schema guesses common fields; it is not a field-strict contract) | Most generated long-tail products (Wave 7 schemas) |\n| **Typed-request** | Method implemented and registered; request params schema-checked; response typed as `unknown` until a schema lands | The remaining contract-first surfaces (see the comments in `BinanceClient.ts`) |\n\nThe Postman coverage gate enforces *endpoint presence* (no endpoint in the\nofficial collection is missing from the SDK) — it cannot by itself establish\nthat every request/response contract is typed; the schema ratchet in CI\n(`contracts:check`) tracks that side and only moves in one direction.\n\n## Install\n\n```bash\nnpm install @nemesis-oss/binance-sdk\n```\n\n## Usage\n\n```typescript\nimport { BinanceClient } from '@nemesis-oss/binance-sdk';\n\nconst client = new BinanceClient({\n  apiKey: 'YOUR_API_KEY',      // only needed for authenticated endpoints\n  apiSecret: 'YOUR_API_SECRET',\n  testnet: true,               // or demo: true; defaults to live\n});\n\n// v3: lazy product namespaces over one shared CoreContext — nothing is built\n// until first access, and `client.core` exposes the shared runtime.\nclient.core.credentials.canSign;   // true\nclient.core.http('fapi');          // cached per-host transport\n\n// Public market data (no keys needed)\nconst klines = await client.spot.market.klines('SOLUSDT', '15m', { limit: 500 });\nconst funding = await client.futures.data.fundingRateHistory('ETHUSDT', { limit: 100 });\nconst oi = await client.futures.data.openInterest('XRPUSDT');\n\n// Authenticated account\nconst balance = await client.futures.account.balance();\nconst positions = await client.futures.account.positionRisk();\n\n// Composite ops — sizing/rounding handled for you\nconst sizing = await client.futures.ops.sizePosition({\n  symbol: 'BTCUSDT',\n  side: 'BUY',\n  stopPrice: 59000,\n  riskAmount: 100,   // or riskPct: 1\n  leverage: 10,\n});\nif (sizing.ok) {\n  await client.futures.ops.placeBracketOrder({\n    symbol: 'BTCUSDT',\n    side: 'BUY',\n    quantity: sizing.quantityStr,\n    stopLossPrice: 59000,\n    takeProfitPrice: 63000,\n  });\n}\nawait client.futures.ops.closePosition({ symbol: 'BTCUSDT' });\n\n// Trading\nconst order = await client.futures.trading.createOrder({\n  symbol: 'BTCUSDT',\n  side: 'BUY',\n  type: 'LIMIT',\n  quantity: 0.01,\n  price: 60000,\n  timeInForce: 'GTC',\n});\nawait client.futures.trading.cancelOrder('BTCUSDT', { orderId: order.orderId });\n\n// Spot account + trading\nconst spotAccount = await client.spot.account.account();\nconst spotOrder = await client.spot.trading.createOrder({\n  symbol: 'BTCUSDT',\n  side: 'BUY',\n  type: 'LIMIT',\n  quantity: '0.001',\n  price: '60000',\n  timeInForce: 'GTC',\n});\nawait client.spot.trading.cancelOrder('BTCUSDT', { orderId: spotOrder.orderId });\n\n// Market WebSocket (combined stream, auto-reconnect)\nclient.futures.ws.subscribe([\n  client.futures.ws.kline('SOLUSDT', '15m'),\n  client.futures.ws.markPrice('ETHUSDT', '1s'),\n]);\nclient.futures.ws.on('message', (stream, payload) => console.log(stream, payload));\n\n// User data stream (listenKey lifecycle managed automatically)\nconst listenKey = await client.startUserStream();\nclient.futures.wsUser.on('ORDER_TRADE_UPDATE', (event) => console.log(event.o));\nclient.futures.wsUser.on('ACCOUNT_UPDATE', (event) => console.log(event.a));\nclient.closeUserStream();\n\n// Spot user data stream\nawait client.startSpotUserStream();\nclient.spot.wsUser.on('executionReport', (event) => console.log(event.s));\nclient.closeSpotUserStream();\n\n// COIN-M Futures (inverse contracts, margined in the base asset)\nconst coinmBalance = await client.coinm.account.balance();\nawait client.coinm.trading.createOrder({\n  symbol: 'BTCUSD_PERP',\n  side: 'BUY',\n  type: 'LIMIT',\n  price: 60000,\n  quantity: 1,          // contracts, not base-asset quantity\n  timeInForce: 'GTC',\n});\nclient.coinm.ws.subscribe([client.coinm.ws.kline('BTCUSD_PERP', '1m')]);\nawait client.startCoinMUserStream();\n\n// Margin (cross + isolated)\nconst marginAccount = await client.margin.account.crossAccount();\nawait client.margin.account.borrow('USDT', 100);\nawait client.margin.trading.createOrder({ symbol: 'BTCUSDT', side: 'BUY', type: 'LIMIT', price: 60000, quantity: 0.001 });\n\n// Wallet\nawait client.wallet.universalTransfer({ type: 'MAIN_UMFUTURE', asset: 'USDT', amount: 500 });\nconst deposits = await client.wallet.depositHistory({ coin: 'USDT' });\n\n// Sub-accounts (master account only)\nconst subAccounts = await client.subaccount.list();\n\n// Server time sync — mitigates -1021 (timestamp outside recvWindow) from local clock drift\nawait client.syncTime();\n```\n\n## API Surface\n\n### Spot (`client.spot`)\n\n- `market` — public REST (klines + uiKlines, tickers incl. rolling-window & trading-day, depth,\n  trades, aggTrades, exchangeInfo, avgPrice)\n- `account` — authenticated account (account info, myTrades, myPreventedMatches, commission, rate limits)\n- `trading` — order lifecycle (create/test/get/cancel, open/all orders, cancelReplace, OCO order lists)\n- `userStream` — listenKey lifecycle (create / keep-alive / close)\n- `ws` — market WebSocket streams (kline, trade, aggTrade, depth incl. diff-depth, ticker incl.\n  rolling-window, bookTicker, miniTicker, avgPrice + all-market/arr variants)\n- `wsUser` — spot user data stream (executionReport, outboundAccountPosition, balanceUpdate, listStatus)\n- `wsApi` — Spot WebSocket API (`wss://ws-api.binance.com/ws-api/v3`): signed trading\n  (`order.place/test/cancel/cancelReplace/status`, `openOrders.status/cancelAll`,\n  `orderList.place/cancel/status`, `openOrderLists.status`), account (`account.status/commission`,\n  `allOrders`, `allOrderLists`, `myTrades`), `userDataStream.start/ping/stop`, and public market\n  data (`ping`, `time`, `exchangeInfo`, `depth`, `trades.recent/historical/aggregate`, `klines`,\n  `uiKlines`, `avgPrice`, `ticker.24hr/tradingDay/price/book`) — its own method names, distinct\n  from the futures WS API below.\n\n### COIN-M Futures (`client.coinm`)\n\nInverse contracts (e.g. `BTCUSD_PERP`) margined in the base asset rather than USDT — same shape\nas `client.futures`, against `dapi.binance.com`.\n\n- `market` — klines (incl. continuous/index/mark-price variants), funding-rate history, open\n  interest + history, premium index, plus the standard public REST inherited from spot/futures\n- `account` — balance, account info, position risk, income history, user trades, leverage\n  brackets, commission rate, position mode\n- `trading` — order lifecycle (create/test/get/cancel/cancelAll/all), leverage/margin-type\n  changes, position margin\n- `userStream` — listenKey lifecycle (create / keep-alive / close)\n- `ws` — market WebSocket streams, same naming scheme as `client.futures.ws`\n- `wsUser` — user data stream (ACCOUNT_UPDATE, ORDER_TRADE_UPDATE, MARGIN_CALL)\n- `wsApi` — WebSocket API on `ws-dapi.binance.com`: order.place/cancel/modify/status,\n  account.status/balance/position, userDataStream.start/ping/stop\n\n### Margin (`client.margin`)\n\nCross and isolated margin trading.\n\n- `account` — cross/isolated account info, max borrowable/transferable, `borrow`/`repay` (via\n  the unified `borrow-repay` endpoint), cross/isolated transfers, interest history,\n  force-liquidation history, price index\n- `trading` — order lifecycle (create/get/cancel/cancelAll/all), myTrades\n\n### Wallet (`client.wallet`)\n\n- Universal transfer (+ history) between Spot/Margin/USD-M/COIN-M/Funding\n- Deposit history, deposit address, withdraw history, withdraw submission\n- Funding wallet / user asset queries, account snapshot, API key permissions, asset detail\n- Dust log + dust-to-BNB conversion, trade fees\n\n### Sub-account (`client.subaccount`, master account only)\n\nList/status, spot/futures/margin summaries, universal transfer (+ history), virtual sub-account\ncreation, futures/margin enablement, deposit address/history.\n\n### Futures (`client.futures`)\n\n- `market` — public REST market data (klines incl. continuous/index/mark/premium-index variants,\n  tickers, depth incl. RPI depth, trades, aggTrades, exchangeInfo)\n- `data` — futures analytics (funding rate, premium index, open interest, long/short ratios, basis,\n  delivery price, insurance fund balance, ADL risk, force orders, index constituents, delist schedule)\n- `account` — authenticated account endpoints (balance v2/v3, account v2/v3, positionRisk v2/v3,\n  account config, income, userTrades, commission, leverage brackets, position mode, multi-assets\n  margin, fee burn, API trading status, portfolio margin account info, position margin history,\n  rate limit orders, order/trade/income data downloads)\n- `trading` — order lifecycle (create/test/get/cancel/modify, open/all orders, batch orders,\n  algo orders, order-modify history, leverage/margin/countdown-cancel config, Convert\n  quote/accept/status)\n- `ops` — composite operations layered over the above: `symbolRules` (typed tick/step/notional\n  filters), `quantize`, `sizePosition` (risk-based sizing), `closePosition`, `marketSnapshot`,\n  `accountOverview`, `placeBracketOrder`\n- `userStream` — listenKey lifecycle (create / keep-alive / close)\n- `ws` — market WebSocket streams (kline, continuous/index/mark klines, aggTrade, trade, depth\n  incl. full order-book diff-depth, ticker, rolling-window ticker + all-market variant, mark price,\n  book ticker, mini ticker, liquidations, composite index, asset index + all-market/arr variants)\n- `wsUser` — user data stream (ACCOUNT_UPDATE, ORDER_TRADE_UPDATE, MARGIN_CALL; auto-reconnect)\n- `wsApi` — WebSocket API: signed trading (order.place/cancel/modify/status, algoOrder.place/cancel,\n  account.status/balance/position and their v2 variants, userDataStream.start/ping/stop) and public\n  market data (depth, ticker.price, ticker.book)\n\n### Client options\n\n`apiKey`, `apiSecret`, `privateKey` + `signatureAlgorithm` (Ed25519/RSA, instead of HMAC),\n`testnet`, `demo`, `recvWindow`, `apiBase`, `wsBase`, `wsUserBase`, `wsApiBase`, `dapiBase`,\n`wsSpotApiBase`, `wsDapiBase`, `timeoutMs`, `maxRetries`, `retryBaseDelayMs`, `retryMaxDelayMs`,\n`retryPolicy` (`strict` default / `legacy`), `idempotentPaths`, `rateLimitWeightPerMinute`,\n`rateLimitSafetyMargin`, `httpsAgent`, `proxy`, `events` (observability bus),\n`safety` (see [Agent safety](#agent-safety)).\n\nProduct aliases: `client.futures.usdm` and `client.futures.coinm` point at the USDⓈ-M and\nCOIN-M surfaces; `client.products` gives the product-oriented view\n(`spot` / `usdm` / `coinm` / `margin` / `wallet` / `subaccount`).\n\n### Reliability\n\n- **Rate-limit tracking**: `RateLimitTracker` parses `X-MBX-USED-WEIGHT-*` /\n  `X-MBX-ORDER-COUNT-*` response headers and delays queued requests once usage crosses a\n  configurable safety margin (`rateLimitWeightPerMinute` / `rateLimitSafetyMargin`), to preempt\n  `-1003` IP bans rather than react to them. Inspect the live per-host snapshot via\n  `client.getRateLimitUsage()`.\n- **Server time sync**: `client.syncTime()` fetches each REST host's server time and applies the\n  offset to every signed request's `timestamp`, mitigating `-1021` errors from local clock drift.\n- **Endpoint-aware retries (strict by default)**: exponential backoff with jitter on `429`/`418`\n  (rejected before processing — safe for any method) and `5xx`/network errors on idempotent\n  methods (GET/DELETE, whitelisted paths such as `order/test`). A `POST` order placement that\n  times out is **not** blindly retried — the request may already be live on the exchange.\n  Retried signed requests are re-signed with a fresh timestamp. Set `retryPolicy: 'legacy'` to\n  restore retry-everything behavior.\n- **WebSocket lifecycle**: every WS client is an explicit state machine\n  (`IDLE → CONNECTING → OPEN → RECONNECTING → CLOSING → CLOSED`, via `ws.getState()` and\n  `ws.state` events) with race-free reconnection (a retired socket can never trigger a duplicate\n  connection) and **proactive 24-hour rotation**: Binance kills stream connections at 24h, so the\n  SDK opens a replacement at T-23h and swaps traffic with no data gap.\n- **Subscription acknowledgement**: `await ws.subscribe([...])` resolves only after the server\n  confirms the subscription, and every (re)connect verifies the live subscription set with\n  `LIST_SUBSCRIPTIONS` and repairs drift automatically.\n- **Exact numbers**: all WS frames are parsed with large-integer preservation (identifiers above\n  2^53 surface as decimal strings instead of silently-corrupted floats — also available as\n  `parseJsonLossless` for your own payloads), and money math in the execution/risk/state layers\n  runs on a BigInt-backed `Decimal` (`0.1 + 0.2 === 0.3`, exactly).\n\n### Execution (idempotent placement + reconciliation)\n\n`client.futures.execution` and `client.spot.execution` are the safe way to place orders — one\nexecution semantics across USDⓈ-M, spot and the paper simulator (see\n[Multi-backend execution](#multi-backend-execution-live--paper) below):\n\n```typescript\nconst execution = await client.futures.execution.placeOrder({\n  symbol: 'BTCUSDT',\n  side: 'BUY',\n  type: 'MARKET',\n  quantity: 0.001,\n  intentId: 'my-strategy-signal-42', // idempotency key: replays return the original execution\n});\n// {\n//   intentId, clientOrderId, exchangeOrderId, status, executedQuantity: '0.001',\n//   averagePrice: '…', fills: [...], reconciliationState: 'acked' | 'reconciled' | …\n// }\n```\n\n- Every order carries a deterministic `newClientOrderId` derived from the intent — the exchange\n  itself becomes the idempotency guard; duplicate intents return the recorded execution.\n- On a transport failure the outcome is **reconciled** by polling\n  `GET /fapi/v1/order?origClientOrderId=…`: found → the execution is recovered and returned;\n  `-2013` (order does not exist) → one safe resubmission with the same clientOrderId; still\n  ambiguous → `ExecutionUnknownError` carrying the intent for manual follow-up — never a guess.\n- With a user-data stream attached (`execution.setUserStream(wsUser)`), execution reports\n  (`ORDER_TRADE_UPDATE` on futures, `executionReport` on spot) stream live fills into the ledger.\n- `cancelOrder` reconciles the same way, and `execution.reconcile(intentId)` forces a refresh.\n\n### Multi-backend execution (live + paper)\n\nProduct specifics live behind `ExecutionAdapter` implementations\n(`FuturesExecutionAdapter`, `SpotExecutionAdapter`, `PaperExecutionAdapter`), so paper trading\nis a first-class execution backend — the same envelope, idempotency and reconciliation\nsemantics, zero exchange traffic:\n\n```typescript\n// Paper manager: identical API to client.futures.execution\nconst paper = client.createPaperExecutionManager({ initialBalance: 50_000 });\nconst fill = await paper.placeOrder({\n  symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: 0.01, intentId: 'strategy-1',\n});\n// fill.status === 'FILLED', fill.fills[0].price — exact decimal strings\n\n// Gateway: route live/paper through one interface, independent ledgers\nconst gateway = client.createExecutionGateway({ defaultBackend: 'paper' });\nawait gateway.placeOrder({ ... });                        // paper (default)\nawait gateway.placeOrder({ ...order }, { backend: 'live' }); // one live order\ngateway.paperEngine.getAccountInfo();                    // simulation state\n```\n\nStandalone single-product clients for focused integrations. v2 factories\nstill ship for back-compat; the v3 first-class `ProductClient` classes\n(`SpotClient`, `USDMClient`, `CoinMClient`) own their own `CoreContext`,\nthe v3 execution platform (Spot / USDⓈ-M) and the v3 state engine\n(Spot / USDⓈ-M):\n\n```typescript\nimport { createSpotClient, createUSDMClient } from '@nemesis-oss/binance-sdk';\nconst spot = createSpotClient({ apiKey, apiSecret }); // v2 factory\nawait spot.syncTime();\nawait spot.market.depth('BTCUSDT', 20);\nspot.close();\n\n// v3 first-class product client — owns CoreContext, owns the platform\nimport { CoreContext, SpotClient, USDMClient, CoinMClient } from '@nemesis-oss/binance-sdk';\nconst core = new CoreContext({ apiKey, apiSecret });\nconst usdm = new USDMClient(core);\nawait usdm.executionPlatform.startUserSession(); // managed listen-key + 30-min keep-alive\nconst book = await usdm.books.watch('BTCUSDT');    // local L2 book, synced\nusdm.close();\n```\n\n### Local order books\n\n```typescript\nconst books = client.createFuturesOrderBookEngine();\nconst btc = await books.subscribe('BTCUSDT');\nbtc.metrics(); // bestBid / bestAsk / midPrice / spread / spreadBps / microprice /\n               // imbalance / bidDepth / askDepth / lastUpdateId / synced\nbtc.vwap('bids', 5); // size-weighted VWAP of the top 5 levels (exact decimal string)\n```\n\nThe engine seeds each book from a REST snapshot, applies `@depth@100ms` diffs in sequence,\ndetects gaps (`pu` / sequence discontinuity) and self-heals with a fresh snapshot.\n\n### Agent safety\n\n`BinanceClientOptions.safety` configures a `RiskGateway` (a superset of the v2.0\n`TradingPolicy`), evaluated on every mutating request before it leaves the process — for\nautonomous/LLM-driven callers where a misread prompt shouldn't be able to spend the account.\nShared across every product namespace, and fed live state by `client.futures.execution`.\n\n```typescript\nconst client = new BinanceClient({\n  apiKey, apiSecret,\n  safety: {\n    dryRun: true,                          // throws DryRunError instead of sending the request\n    allowedSymbols: ['BTCUSDT', 'ETHUSDT'],\n    maxNotionalPerOrder: 100,              // an order whose notional can't be verified is refused\n    maxLeverage: 20,                       // leverage changes above this are refused\n    maxOpenNotional: 5_000,                // aggregate tracked open-order notional budget\n    maxDailyLoss: 1_000,                   // realized-loss kill switch (UTC day window)\n    maxConsecutiveFailures: 5,             // exchange-rejection streak circuit breaker\n    allowWithdrawals: false,               // default once `safety` is set at all\n  },\n});\nclient.getRiskStatus(); // { circuitBreaker, openNotional: '500', dailyPnl: '-12.5', ... }\n```\n\n- `dryRun` — intercepts `POST`/`PUT`/`DELETE` and throws `DryRunError` (carrying the request that\n  would have been sent, via `.describe()`) instead of sending it. It never returns a synthetic\n  success payload — a fabricated `orderId` would lead a caller to believe an order exists.\n- `readOnly` — refuses mutating requests outright.\n- `allowedSymbols` — rejects orders naming a symbol outside the list.\n- `maxNotionalPerOrder` — caps a single order's notional (from `price*quantity` or\n  `quoteOrderQty`); an order whose notional can't be determined (e.g. a MARKET order with no\n  price) is refused rather than waved through.\n- `maxLeverage` / `maxOpenNotional` / `maxDailyLoss` / `maxConsecutiveFailures` — layered\n  account-state limits. The circuit breaker trips on the daily loss limit or a rejection streak,\n  refuses every mutating request while tripped, and rolls over at the UTC day boundary (or via\n  `resetBreaker()` after human review).\n- `allowWithdrawals` / `allowTransfers` / `blockedPaths` — withdrawals are denied by default the\n  moment any `safety` config is set; transfers and arbitrary endpoints can be pinned off too.\n\nOmitting `safety` entirely leaves behavior exactly as without a policy.\n\n### Errors\n\n`BinanceError` base, `BinanceAuthError`, `BinanceApiError` (`code`, `status`, `endpoint`,\n`method`, response `headers`, plus `isRateLimitError()`/`isTimestampError()`/\n`isInsufficientBalance()`), `RateLimitError` (`retryAfterMs`), `NetworkError`,\n`PolicyViolationError` (a `TradingPolicy` rule blocked the request), `DryRunError` (dry-run\nsuppressed the request).\n\n### Paper trading\n\nSimulates fills against live public prices — nothing is sent to the exchange. Margin is locked\nat the requested leverage and released pro-rata as a position is reduced.\n\n```typescript\nimport { PaperTradingEngine, SlippageModel, BinanceUsdmFeeModel } from '@nemesis-oss/binance-sdk';\n\n// Legacy behaviour (instant fills, zero fees) is the default:\nconst engine = new PaperTradingEngine({ initialBalance: 10_000 });\nawait engine.placeOrder({ symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: 0.05, leverage: 5 });\nawait engine.updatePositions();               // re-mark against live prices\nconst close = await engine.placeOrder({ symbol: 'BTCUSDT', side: 'SELL', type: 'MARKET', quantity: 0.05 });\nconsole.log(close.realizedPnl, engine.getAccountInfo().balance);\n\n// Or approximate reality in layers:\nconst realistic = new PaperTradingEngine({\n  initialBalance: 10_000,\n  executionModel: new SlippageModel(10),      // 10 bps market impact\n  feeModel: new BinanceUsdmFeeModel(),        // 5 bps taker / 2 bps maker\n});\n```\n\nExecution models compose: `SlippageModel`, `PartialFillModel`, `OrderBookModel` (VWAP walks\nagainst a real/injected book), `LatencyModel`, `CompositeModel`. Fee models implement\n`FeeModel` (`TakerMakerFeeModel` / `BinanceUsdmFeeModel`).\n\n### Observability\n\n`client.events` is a structured, JSON-serializable event bus wired through every subsystem:\n\n```typescript\nclient.events.on('execution.', (event) => console.log(event.scope, event.name, event.payload));\nclient.events.on('risk.denied', (event) => audit(event.payload));\nclient.events.on('ws.', (event) => console.log(event.name, event.payload));\n// http.request.start / http.request.end / http.request.retry / http.request.error\n//   — each carrying contract metadata: product, operation, security, declaredWeight\n// ws.connecting / ws.open / ws.state / ws.reconnecting / ws.rotated / ws.resynced / ws.stale\n// execution.submitted / execution.acked / execution.reconciled / execution.retry / risk.*\n// orderBook.synced / orderBook.desync\n```\n\nEvents carry `ts`/`seq`/`scope`/`name`/`payload`; subscribe with exact names, trailing-dot\nprefixes (`'ws.'`) or `'*'`. Pass your own bus via `new BinanceClient({ events })`, or forward\neverything to a logger with `forwardEventsToLogger(bus, logger)`.\n\n### Endpoint maps & agent-native docs\n\n- `llms.txt` / `llms-full.txt` — machine-oriented SDK index and flattened endpoint list\n  (Binance Agent-Native convention).\n- `docs/endpoint-map/*.md` — per-product tables of every implemented endpoint\n  (operation → method → path → auth → SDK surface).\n- **`contracts/` (v3)** — machine-readable inventory of the SDK surface:\n  `endpoint-catalog.json` (every REST operation: product, method, path, security, weight,\n  implementer), `security-catalog.json` (auth matrix per product),\n  `websocket-catalog.json` (WS families, stream ceilings, renewal/liveness policy),\n  `catalog.json` (index).\n  Generated with `npm run contracts:generate` and CI-validated against the registry —\n  the input layer for generated bindings, tool metadata and coverage accounting.\n- `ENDPOINT_REGISTRY` / `listEndpoints({ product, method, authentication })` in code.\n- **Contract layer**: `getContract(product, operation)` / `findContract(path, method)` /\n  `contractFor(baseURL, method, path)` — registry entries with normalized security schemes\n  (`none`/`apiKey`/`signature`) and declared request weights; `describeContract()` renders a\n  one-line description for logs and agents.\n- Regenerate everything from the registry with `npm run docs:generate` (the generator\n  cross-checks the registry against the actual `http.<verb>()` calls in `src/resources`)\n  and `npm run contracts:generate`.\n- `docs/architecture/v3-foundation.md` — the v3 platform architecture and migration plan.\n- `docs/architecture/v3-websocket.md` — the v3 WebSocket platform design (milestone 2).\n- `docs/architecture/v3-execution.md` — the v3 execution platform design (milestone 3).\n- `docs/architecture/v3-state.md` — the v3 state engine + paper backend design (milestone 4).\n\n## v3 Platform (stable since 3.0.0)\n\n`3.0.0` ships the platform rewrite: the foundation (see\n`docs/architecture/v3-foundation.md`), the WebSocket platform (see\n`docs/architecture/v3-websocket.md`), the execution platform (see\n`docs/architecture/v3-execution.md`), the state engine + paper execution\nbackend (see `docs/architecture/v3-state.md`), the first-class\nSpot / USDⓈ-M / COIN-M product clients, and the execution audit sink;\nevery v2.x surface keeps\nworking unchanged.\n\n```typescript\nimport { BinanceClient, CoreContext, USDMClient, Credentials } from '@nemesis-oss/binance-sdk';\n\n// Standalone product client over a caller-owned shared runtime\nconst core = new CoreContext({ apiKey, apiSecret });\nconst usdm = new USDMClient(core);\nawait core.syncTime();                     // one clock sync, every host\nconst fill = await usdm.execution.placeOrder({\n  symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: '0.01',\n});\nusdm.close();                              // product-scoped cleanup\n\n// Two products, one runtime: shared transports, shared event bus\nconst other = new USDMClient(core);        // same weight budget, same events\n\n// The multi-product facade is lazy now — namespaces build on first access\n// (stable identity) and share client.core:\nconst client = new BinanceClient({ apiKey, apiSecret });\nclient.core.credentials.describe();        // 'hmac key ****xxxx'\nclient.futures.execution === client.futures.execution;  // true — cached\n\n// --- WebSocket platform (milestone 2): client.ws ---\nconst sub = await client.ws.usdm.subscribe('btcusdt@aggTrade');\nsub.on('message', (tick) => console.log(tick.p));   // parsed payload\nawait sub.waitForReady();\nclient.ws.stats();                          // pools, renewal deadlines, WS API state\nawait client.ws.api.usdm.accountStatus();  // persistent multiplexed WS API\nsub.close();                               // refcounted UNSUBSCRIBE\n\n// --- Execution platform (milestone 3): usdm.executionPlatform ---\nconst session = await usdm.executionPlatform.startUserSession();\n// listen key created + WS connected + 30-min keep-alive + auto key rotation;\n// the product's execution manager now tracks live fills from the stream:\n\nconst execution = await usdm.execution.placeOrder({\n  symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: '0.001',\n});\nconst record = usdm.executionPlatform.orders.get(execution.clientOrderId);\n// → live OrderRecord: status, exact decimal quantities, per-trade fills\nawait usdm.executionPlatform.orders.waitForTerminal(execution.clientOrderId);\nusdm.executionPlatform.positions.get('BTCUSDT');   // from ACCOUNT_UPDATE\nusdm.executionPlatform.classify(err).safety;\n// → 'safe' | 'idempotent' | 'reconciliation-required' | 'never-retry'\n\n// --- State engine + paper backend (milestone 4) ---\nconst book = await usdm.books.watch('BTCUSDT');  // local L2 book, synced\nbook.bestBid;                                    // exact decimal strings\nbook.metrics();                                  // spread, microprice, imbalance\nawait usdm.executionPlatform.reconcile();        // REST fold: startup gap-fill\n\nimport { createPaperExecutionPlatform } from '@nemesis-oss/binance-sdk';\nconst paper = createPaperExecutionPlatform(client.core, { initialBalance: 25_000 });\nawait paper.platform.startUserSession();          // local session, zero network\nconst fill = await paper.execution.placeOrder({\n  symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: '0.01',\n});\npaper.platform.orders.get(fill.clientOrderId);   // same OrderRecord as live\npaper.platform.positions.get('BTCUSDT');         // same PositionRecord as live\n```\n\n## LLM Tools & MCP\n\nThe SDK ships a framework-agnostic tool layer plus an MCP server, so any function-calling agent\n(OpenAI, Anthropic/Claude, MCP hosts) can drive the client.\n\n```ts\nimport { BinanceClient, createFuturesToolkit, toolkitToFormats } from '@nemesis-oss/binance-sdk';\nconst tk = createFuturesToolkit(new BinanceClient({ apiKey, apiSecret, testnet }));\nconst { openai, anthropic, mcp } = toolkitToFormats(tk); // tool schemas per format\n```\n\n- **Tool groups**: `market`, `account`, `trading` (USD-M futures), `spot` (Spot), `ws`\n  (streams + WS API), `derived` (composites like size/close/bracket), `paper`, and\n  `execution` (v2.3).\n- **Execution tools (v2.3)** — order tools routed through the `ExecutionGateway`, so agents\n  get idempotency, reconciliation and backend routing for free:\n\n```ts\n// Run the whole toolkit against the simulator — no API-key trading risk\nconst tk = createFuturesToolkit(client, { executionBackend: 'paper', paper: { initialBalance: 50_000 } });\n\n// Same schema, one extra param per call: backend: 'live' | 'paper' (optional)\nconst fill = await call('execution_place_order', {\n  symbol: 'BTCUSDT', side: 'BUY', type: 'MARKET', quantity: 0.01,\n  intentId: 'strategy-1',            // idempotency: retries return the original execution\n});\n// execution_get_order finds intents across both ledgers; execution_status returns\n// default backend + risk-gateway state + paper account; execution_cancel_order\n// resolves already-gone orders to a terminal CANCELED execution (never a thrown -2011).\n```\n\n- **MCP server**: `npx binance-sdk-mcp` (stdio) auto-registers every tool plus reference\n  resources (`binance://futures/symbols`, `binance://futures/premium-index`, `binance://spot/symbols`).\n  For local development against source instead of the published package, point your MCP host at\n  `mcp-config/local-dev.json` (runs `npx tsx src/mcp/index.ts` directly).\n  `createBinanceMcpServer(client, { executionBackend: 'paper' })` builds a paper-mode server —\n  every order tool routes through the simulator, safe to expose to untrusted hosts.\n- **Agent skills**: Markdown skills under `skills/` — futures trading / market-data / algo /\n  portfolio-margin, plus spot trading / market-data — for Skills-Hub-style agents.\n\n## Agentic Futures Layer\n\n`src/agent/` is a complete decision stack for autonomous USD-M futures trading on top of the\nSDK's data, risk and execution layers — the pieces an LLM agent should *not* improvise:\n\n- **`WatchlistScanner`** — one `!ticker@arr` WS subscription ranks every perpetual by 24h quote\n  volume; REST gates (PERPETUAL + TRADING, spread <= 5 bps, 24h volume floor, open-interest\n  floor) admit the top-50. `ingestTickers()` is a public seam for tests and offline feeds.\n- **`classifyRegime`** — deterministic five-state classifier (`TREND_UP / TREND_DOWN / RANGE /\n  SQUEEZE / CHAOS`) from EMA structure, the ATR distribution, funding z-score and the OI slope.\n  Conflicting inputs are CHAOS — the classifier refuses to guess.\n- **`scoreSymbol`** — a confluence scorer (0-95): EMA structure, session VWAP side, book\n  imbalance, taker flow, OI shift, funding posture, crowd skew. Book imbalance against the\n  trade is a **hard veto**; stops wider than 1.2 ATR refuse the signal.\n- **`executeEntry`** — risk-based sizing through `ops.sizePosition`, then the full protective\n  package placed through the idempotent `ExecutionGateway`: hard stop (`STOP_MARKET`,\n  `closePosition`, mark price), 40% at +1R and 30% at +2R reduce-only limits, and a\n  trailing-stop runner armed at +2.5R. Fails closed — if the hard stop is rejected, the fresh\n  position is flattened immediately.\n- **Session helpers** — `refreshDeadman` (5-minute countdown-cancel-all heartbeat),\n  `emergencyFlatten`, `currentEquity`, and `safetyOptions()` which derives the RiskGateway\n  fence (allowlist = watchlist, notional caps, 10% daily-loss breaker, withdrawals denied)\n  from the profile.\n\n```ts\nimport {\n  BinanceClient, WatchlistScanner, classifyRegime, scoreSymbol,\n  createAgentGateway, SymbolRulesCache, executeEntry, currentEquity,\n  DEFAULT_PROFILE, safetyOptions,\n} from '@nemesis-oss/binance-sdk';\n\n// Stage 1 of the promotion ladder: paper backend, identical code path.\nconst client = new BinanceClient({ testnet: true });\nconst gateway = createAgentGateway(client, { paper: true, paperBalance: 10_000 });\n\nconst scanner = new WatchlistScanner(client);\nawait scanner.start();                       // !ticker@arr ranking\nfor (const cand of await scanner.eligibleWatchlist()) {\n  const regime = await classifyRegime(client, cand.symbol);\n  if (regime === 'CHAOS' || regime === 'SQUEEZE') continue;\n  const sig = await scoreSymbol(client, cand.symbol, regime, utcDayStart());\n  if (!sig || sig.score < DEFAULT_PROFILE.confluenceEntry) continue;\n  await executeEntry(client, gateway, new SymbolRulesCache(client),\n    cand.symbol, sig, await currentEquity(client, gateway));\n}\n```\n\nPaper parity: entries fill at the live mark through the simulator; the paper engine rests\nMARKET/LIMIT only, so protective legs report `PAPER_UNSIMULATED` and the session loop drives\nthose exits from the returned levels (see `examples/agentic-futures.ts` for the full session\nloop with caps, deadman, breaker halt and paper exit ledger).\n\nAlso in this layer: aggregate all-market ticker array streams (`!ticker@arr`,\n`!miniTicker@arr`, `!ticker_{window}@arr`) now parse to typed arrays instead of throwing —\nthe same treatment `!markPrice@arr` already had.\n\n## Examples\n\n```bash\nnpx tsx examples/quickstart.ts      # market data, symbol rules, risk-based sizing\nnpx tsx examples/ws-streams.ts      # live kline / trade / mark-price / book streams\nnpx tsx examples/paper-trading.ts   # simulated position lifecycle\nnpx tsx examples/agentic-futures.ts # full agent session loop (AGENT_PAPER=1 to simulate)\n```\n\n## Development\n\n```bash\nnpm install\nnpm test        # vitest, HTTP/WS mocked\nnpm run typecheck\nnpm run build   # tsup -> dist/ (ESM + CJS + .d.ts)\nnpm run smoke   # hits live public Binance endpoints, no keys needed\nnpm run smoke:testnet  # exercises COIN-M/Margin/Wallet/Sub-account/Spot-WS-API against\n                        # Binance testnet (see script header for the required env vars);\n                        # unauthenticated sections still run without keys\n```\n\nCI runs typecheck, build and tests on Node LTS and latest. Publishing to npm happens by\ncutting a GitHub Release (`.github/workflows/release.yml` runs on `release: published`), a\nseparate, deliberate step — not on every push or tag.\n","readmeFilename":"README.md"}