{"_id":"@desk-exchange/typescript-sdk","_rev":"4-16e6a93aa1171a61d555fe11480ff644","name":"@desk-exchange/typescript-sdk","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@desk-exchange/typescript-sdk","version":"1.0.0","keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"author":{"name":"DESK"},"license":"MIT","_id":"@desk-exchange/typescript-sdk@1.0.0","maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"dist":{"shasum":"b8cafabf8419a563c1fdfedf2897a9ebcfdba76c","tarball":"https://registry.npmjs.org/@desk-exchange/typescript-sdk/-/typescript-sdk-1.0.0.tgz","fileCount":7,"integrity":"sha512-t8iM/T9gIVb5FvC24/EbRIrDK6CxokIqV30amJTM9poBWJMynt1Z/ATxZyLvZNhCD2y7iMoofS+kg4EZZoSUDA==","signatures":[{"sig":"MEUCIHUFch9vqxuwwwfz76QM72HmKA5qPVk20fX85t8XVL+4AiEAnSJ6cYLv8hqp+4VoQIwl4bVaAKJCTzcyl2OOR24VPWc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72863},"type":"module","_from":"file:desk-exchange-typescript-sdk-1.0.0.tgz","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rimraf dist","build:watch":"tsc --watch"},"_npmUser":{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"},"_resolved":"/private/var/folders/9n/3rqwkhx520d70zgb__qgnsxh0000gn/T/b177808d95f2404bb120dcb71660c4e9/desk-exchange-typescript-sdk-1.0.0.tgz","_integrity":"sha512-t8iM/T9gIVb5FvC24/EbRIrDK6CxokIqV30amJTM9poBWJMynt1Z/ATxZyLvZNhCD2y7iMoofS+kg4EZZoSUDA==","repository":{"url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"Typescript SDK for DESK Exchange API","directories":{"test":"tests"},"_nodeVersion":"18.17.0","dependencies":{"ws":"^8.18.0","axios":"^1.7.2","ethers":"^6.13.2","@types/ws":"^8.5.11","typescript":"^5.7.3","@msgpack/msgpack":"^3.0.0-beta2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.3.5","dotenv":"^16.4.5","rimraf":"^5.0.0","ts-node":"^10.9.2","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/typescript-sdk_1.0.0_1739441913384_0.07627885463786721","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@desk-exchange/typescript-sdk","version":"1.0.1","keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"author":{"name":"DESK"},"license":"MIT","_id":"@desk-exchange/typescript-sdk@1.0.1","maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"dist":{"shasum":"b8b79a406e1e8cff3a472d031d44471105771934","tarball":"https://registry.npmjs.org/@desk-exchange/typescript-sdk/-/typescript-sdk-1.0.1.tgz","fileCount":7,"integrity":"sha512-mHJ5IHCRUOf97+ZyoKx/+uGPtusLvlhl6736JA8PTk1PN+/GQcNXZc08vAHQEuWTFItdQXVeD36rktJw24yYIg==","signatures":[{"sig":"MEUCIQCf1d4b5R+lcigYrkurwTvwW2H/hnBARlX4o9zd01VcigIgH5mkskzzwKkXlxIUgUXhnLmInnb8QrSaFb4R20dnIzw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72890},"type":"module","_from":"file:desk-exchange-typescript-sdk-1.0.1.tgz","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rimraf dist","build:watch":"tsc --watch"},"_npmUser":{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"},"_resolved":"/private/var/folders/9n/3rqwkhx520d70zgb__qgnsxh0000gn/T/2389bd3f1380c0678abe784d6a238053/desk-exchange-typescript-sdk-1.0.1.tgz","_integrity":"sha512-mHJ5IHCRUOf97+ZyoKx/+uGPtusLvlhl6736JA8PTk1PN+/GQcNXZc08vAHQEuWTFItdQXVeD36rktJw24yYIg==","repository":{"url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"Typescript SDK for DESK Exchange API","directories":{"test":"tests"},"_nodeVersion":"18.17.0","dependencies":{"ws":"^8.18.0","axios":"^1.7.2","ethers":"^6.13.2","@types/ws":"^8.5.11","typescript":"^5.7.3","@msgpack/msgpack":"^3.0.0-beta2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.3.5","dotenv":"^16.4.5","rimraf":"^5.0.0","ts-node":"^10.9.2","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/typescript-sdk_1.0.1_1739442120606_0.22217670150764834","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@desk-exchange/typescript-sdk","version":"1.0.2","keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"author":{"name":"DESK"},"license":"MIT","_id":"@desk-exchange/typescript-sdk@1.0.2","maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"dist":{"shasum":"36094c78038be1ffbcd931f1b8610be5f9ea84ea","tarball":"https://registry.npmjs.org/@desk-exchange/typescript-sdk/-/typescript-sdk-1.0.2.tgz","fileCount":7,"integrity":"sha512-y8TubvZaibcSF4Z0krPE9deWREsHyaWNnnqYUeooAscaddSSOwav/EjqyTTe/uGKVpmLoPM0iUDWQ1GJG/Y8ug==","signatures":[{"sig":"MEUCIQCb4akf2avAA7qxp/IRFbXoenDGO7Jl9eBNthjCC1t1TwIgVmFI7n1KhqLCihiU2sFgZ/un6r+Xyecoj/i1HIo0F1k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":72890},"type":"module","_from":"file:desk-exchange-typescript-sdk-1.0.2.tgz","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rimraf dist","build:watch":"tsc --watch"},"_npmUser":{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"},"_resolved":"/private/var/folders/9n/3rqwkhx520d70zgb__qgnsxh0000gn/T/d63475d16cc8745b368f75d9d9569913/desk-exchange-typescript-sdk-1.0.2.tgz","_integrity":"sha512-y8TubvZaibcSF4Z0krPE9deWREsHyaWNnnqYUeooAscaddSSOwav/EjqyTTe/uGKVpmLoPM0iUDWQ1GJG/Y8ug==","repository":{"url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"Typescript SDK for DESK Exchange API","directories":{"test":"tests"},"_nodeVersion":"18.17.0","dependencies":{"ws":"^8.18.0","axios":"^1.7.2","ethers":"^6.13.2","@msgpack/msgpack":"^3.0.0-beta2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.3.5","dotenv":"^16.4.5","rimraf":"^5.0.0","ts-node":"^10.9.2","@types/ws":"^8.5.11","typescript":"^5.7.3","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/typescript-sdk_1.0.2_1739444857932_0.6609781922986302","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@desk-exchange/typescript-sdk","version":"1.0.3","keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"author":{"name":"DESK"},"license":"MIT","_id":"@desk-exchange/typescript-sdk@1.0.3","maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"dist":{"shasum":"4854d93f711c1fa8e3746434b13a0fc39813026f","tarball":"https://registry.npmjs.org/@desk-exchange/typescript-sdk/-/typescript-sdk-1.0.3.tgz","fileCount":7,"integrity":"sha512-jDKqBqenPQed0h5ah5FpRi4uJLpOJw3R/R+RvD4AUryXAU09EcMIeW/K0uy45vsFQOMNV79l/cgg+tZYkfdhHg==","signatures":[{"sig":"MEYCIQC/1LgUpwcr9ppk5WeICSpwCwFgPCKQcCQi0KSsKVs62QIhANXIQ64ToozrWOrfZwPBMhhHOCmtQBGULys0QSBYvAnv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74867},"type":"module","_from":"file:desk-exchange-typescript-sdk-1.0.3.tgz","engines":{"node":">=18.17.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","build":"tsup src/index.ts --format esm,cjs --dts --clean","clean":"rimraf dist","build:watch":"tsc --watch"},"_npmUser":{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"},"_resolved":"/private/var/folders/9n/3rqwkhx520d70zgb__qgnsxh0000gn/T/9c46006e464f46939aec7f7c5ea147d7/desk-exchange-typescript-sdk-1.0.3.tgz","_integrity":"sha512-jDKqBqenPQed0h5ah5FpRi4uJLpOJw3R/R+RvD4AUryXAU09EcMIeW/K0uy45vsFQOMNV79l/cgg+tZYkfdhHg==","repository":{"url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git","type":"git"},"_npmVersion":"9.6.7","description":"Typescript SDK for DESK Exchange API","directories":{"test":"tests"},"_nodeVersion":"18.17.0","dependencies":{"ws":"^8.18.0","axios":"^1.7.2","ethers":"^6.13.2","@msgpack/msgpack":"^3.0.0-beta2"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","tsup":"^8.3.5","dotenv":"^16.4.5","rimraf":"^5.0.0","ts-node":"^10.9.2","@types/ws":"^8.5.11","typescript":"^5.7.3","@types/node":"^20.17.16"},"_npmOperationalInternal":{"tmp":"tmp/typescript-sdk_1.0.3_1740470031208_0.8028737661514496","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@desk-exchange/typescript-sdk","version":"1.0.5","description":"Typescript SDK for DESK Exchange API","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"author":{"name":"DESK"},"license":"MIT","dependencies":{"@msgpack/msgpack":"^3.0.0-beta2","axios":"^1.7.2","ethers":"^6.13.2","ws":"^8.18.0"},"devDependencies":{"@types/node":"^20.17.16","@types/ws":"^8.5.11","dotenv":"^16.4.5","rimraf":"^5.0.0","ts-node":"^10.9.2","typescript":"^5.7.3","tsup":"^8.3.5","tsx":"^4.19.2"},"directories":{"test":"tests"},"repository":{"type":"git","url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git"},"engines":{"node":">=18.17.0"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","build:watch":"tsc --watch","clean":"rimraf dist","test":"echo \"Error: no test specified\" && exit 1"},"bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","_id":"@desk-exchange/typescript-sdk@1.0.5","_integrity":"sha512-/fTLbbMUyerMMN2otN5ZR3KIpfA/8qr9ee7IftWQI+0LUqMacQaEqb6sr9I4/748ExeOR4kvJxWaY1OgqA1vKw==","_resolved":"/private/var/folders/9n/3rqwkhx520d70zgb__qgnsxh0000gn/T/9fb3e90ee5d63aea09b34bae84bf4842/desk-exchange-typescript-sdk-1.0.5.tgz","_from":"file:desk-exchange-typescript-sdk-1.0.5.tgz","_nodeVersion":"18.17.0","_npmVersion":"9.6.7","dist":{"integrity":"sha512-/fTLbbMUyerMMN2otN5ZR3KIpfA/8qr9ee7IftWQI+0LUqMacQaEqb6sr9I4/748ExeOR4kvJxWaY1OgqA1vKw==","shasum":"6886447756b79d9fe7a50bf4c64186a94328d11e","tarball":"https://registry.npmjs.org/@desk-exchange/typescript-sdk/-/typescript-sdk-1.0.5.tgz","fileCount":7,"unpackedSize":88823,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDmtwYqZUh21hGskSdNb/nopBQoGbDvRxQ3L7qTWOnw9AIgA8sV5loLym9Rwj1wzJFmmFkCdY+4id56iQclg4x6ouo="}]},"_npmUser":{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"},"maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/typescript-sdk_1.0.5_1740545088699_0.22083652782287544"},"_hasShrinkwrap":false}},"time":{"created":"2025-02-13T10:18:33.237Z","modified":"2025-02-26T04:44:49.094Z","1.0.0":"2025-02-13T10:18:33.608Z","1.0.1":"2025-02-13T10:22:00.851Z","1.0.2":"2025-02-13T11:07:38.146Z","1.0.3":"2025-02-25T07:53:51.371Z","1.0.5":"2025-02-26T04:44:48.888Z"},"bugs":{"url":"https://github.com/HMXOrg/desk-typescript-sdk/issues"},"author":{"name":"DESK"},"license":"MIT","homepage":"https://github.com/HMXOrg/desk-typescript-sdk#readme","keywords":["desk","desk-exchange","api","sdk","rest","websocket","trading","crypto","blockchain","base","dex","perp","perpetual"],"repository":{"type":"git","url":"git+ssh://git@github.com/HMXOrg/desk-typescript-sdk.git"},"description":"Typescript SDK for DESK Exchange API","maintainers":[{"name":"kim-hera","email":"kim.hera.20.20.20@gmail.com"}],"readme":"# DESK Typescript SDK\n\nA TypeScript client for interacting with DESK Exchange API, featuring JWT authentication and EVM wallet integration.\n\n## Features\n\n- EVM wallet integration\n- JWT-based authentication\n- Subaccount management\n- Type-safe API interactions\n- Real-time WebSocket support\n- Comprehensive error handling\n\n## Installation\n\n```shell\nnpm install @desk-exchange/typescript-sdk\n# or\nyarn add @desk-exchange/typescript-sdk\n```\n\n## Usage\n\n### Initialize the Client\n\n```typescript\nimport { DeskExchange } from \"@desk-exchange/typescript-sdk\";\n\nconst sdk = new DeskExchange({\n  network: \"testnet\",\n  privateKey: process.env.PRIVATE_KEY,\n  subAccountId: 0,\n  enableWs: false, // true if you want to connect to websocket\n});\n```\n\n### Account Management\n\n```typescript\n// Get account information\nconst accountInfo = await sdk.exchange.getSubAccountSummary();\n```\n\n### Trading Operations\n\n```typescript\n// Place a limit order\nconst limitOrder = await sdk.exchange.placeOrder({\n  symbol: \"BTCUSD\",\n  amount: \"0.1\",\n  price: \"99714.4\",\n  side: \"Long\",\n  orderType: \"Limit\",\n  reduceOnly: false,\n  timeInForce: \"GTC\",\n});\n\n// Place a market order\nconst marketOrder = await sdk.exchange.placeOrder({\n  symbol: \"BTCUSD\",\n  amount: \"0.0001\",\n  price: \"0\",\n  side: \"Short\",\n  orderType: \"Market\",\n  reduceOnly: false,\n});\n\n// Cancel an order\nawait sdk.exchange.cancelOrder(orderId);\n```\n\n### WebSocket Streams\n\n```typescript\nawait sdk.subscriptions.subscribeToMarkPrices((data) => {\n  console.log(\"Received mark price data:\", data);\n});\nawait sdk.subscriptions.subscribeToOrderbook(\"BTCUSD\", (data) => {\n  console.log(\"Received BTCUSD orderbook data:\", data);\n});\n```\n\n## Running examples\n\n```shell\npnpm exec tsx examples/***.ts\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n```\nMIT License - see the LICENSE file for details.\n\n```\n","readmeFilename":"README.md"}