{"_id":"@dreygur/td365","_rev":"9-a9dcf5c3d2357ac57ef4b8788c2685d9","name":"@dreygur/td365","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.0":{"name":"@dreygur/td365","version":"1.0.0","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.0","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"e0e372fd5ab1908bd2934470fb9687f11f6c97c8","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.0.tgz","fileCount":18,"integrity":"sha512-sXIXbll9uvXPoPU6DiktnqgHieuwFqNDWZk8MS+ARaE77s2W1XH5xWgLz2lw/sH1qUqwG5ZDdEGcGpbnHeVUfA==","signatures":[{"sig":"MEUCIQCjl6YKiKHDsEumGpFTWV7eJeSfanNM/8YarVSYltAYvQIgOsnfEPEE/pq+LgHUUZ1QRn1lsv3VLtosxQKv8f7ZzQ0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20736},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.0_1692273185306_0.029307602164445834","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@dreygur/td365","version":"1.0.1","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.1","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"724ca1b562a6b7534227ad6348fac5c758a77637","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.1.tgz","fileCount":18,"integrity":"sha512-qdPhY6L54N/o8qtIhaEsI+0kdTB6n0hHlwTBTQJ7zyv+WwCpVYx/j4oEoNJIB1GeE7I8QScVL9qjjuSkMsgBfw==","signatures":[{"sig":"MEUCIQC58sQASImutoHoxT0U0EqIRN5CiDCE6O6gQnoZxRcusQIgHhJLqn4FdFb24h5GrmzVESsLRBi7piE8+BIUcAl3oz0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20736},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.1_1692605861508_0.6744475536240537","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@dreygur/td365","version":"1.0.2","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.2","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"01924aa67f56e7bf5413d51a4d666985f6034e1e","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.2.tgz","fileCount":24,"integrity":"sha512-RHBW23P6ETaPhwYNGObnXE+ReJbxMfosOmbcq0L9Q/WbebdffJMOC4P1fw9xpkOUgKK6ZtoEftwbVqucM+dFag==","signatures":[{"sig":"MEUCIQDGyItCd6uP0gniKpXJNdM2LM824mMnoT0TvzaTuB4OWwIgMkbAzRO2OLiJWuRw6Wd6WX5A52XCIZhwQcURGpnAWwg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29690},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.2_1692606258271_0.6615553243076098","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@dreygur/td365","version":"1.0.3","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.3","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"2229d6833eecf6a05f66020406feca18a13617df","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.3.tgz","fileCount":25,"integrity":"sha512-C7HWdp+QVWzvIMe4vyxwkX7UlaBbi4sleCX9Q6fqtFRiOub1SrciK+eisa054BvWV5CXly+5QGYxPfc3JbiPHg==","signatures":[{"sig":"MEUCIFLOTINstdD/pIDZ8AjyJ/XcmcFBC6Iwke8FrTaPTnK+AiEA38G5fjLyvCB5bhvDcPcYhNk+istsMXZM32XOVlb+Bgg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":34843},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc","prepare":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.3_1692694717466_0.2501644656016906","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@dreygur/td365","version":"1.0.4","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.4","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"d8917a13a4a4f0a6bee1ae6afafc2d664c7e3c14","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.4.tgz","fileCount":25,"integrity":"sha512-bPrPncqz15GqOf+cK8XLwcfjiP6kSBevhfQZK+oHifQw80v2M3+WbApiUhfOykMlh7Ni2EvBWPca0QEWG5/F1Q==","signatures":[{"sig":"MEYCIQCp8/s2kbf+pvev+EYfPFqZQCwzjPd1dNx2IQMGug+kxQIhALwODy//F94MkEjCmmgHehSwQtJgSOhXNg9/e/Vy7aEA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36999},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc","prepare":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.4_1692775924354_0.04717320790683521","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@dreygur/td365","version":"1.0.5","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.5","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"8dc1596668c58d6e595bdc9ed178d8ebc5efbc72","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.5.tgz","fileCount":25,"integrity":"sha512-V21MCK5YImkFQrlnUYWcRtpeALnlR6y7eC6Lgx47RpCQ8KwxGAXY5o7aHbf+zPWLZeQPWUYLaGlOYgoEO0TGIg==","signatures":[{"sig":"MEYCIQDGVFtQAHzpi8VmigAXF1eUDsKSb0gwZ6IlOqXRZ/xuzwIhAOiV7lib0hLaBns+t+bXudIo5WWEnAxVqzwUcIywSP19","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37003},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc","prepare":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.5_1692793521478_0.7987028890283445","host":"s3://npm-registry-packages"}},"1.0.6":{"name":"@dreygur/td365","version":"1.0.6","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.6","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"1bf5be8ed5bf9e12e1da537f56ee998bbee7d915","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.6.tgz","fileCount":25,"integrity":"sha512-Gtaj6CQVLUqPA8J7tT9NFG8Z0ga9Ik81BFG9SkKALz2B5jDa4QkKvwaRjs/+KhZoMoXmMXIBpYrKc7rwOIN+iQ==","signatures":[{"sig":"MEUCIFQzz2Ft/OQiGxdxyugmV0vmlgAWfqMSI7osQMRDqKomAiEA0qevxMwwVsFZjo1oseZJBHJg+RKwbEq2EXrAzQJcuxw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37666},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc","prepare":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2","https-proxy-agent":"^7.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.6_1693507314885_0.7191391112971957","host":"s3://npm-registry-packages"}},"1.0.7":{"name":"@dreygur/td365","version":"1.0.7","author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","_id":"@dreygur/td365@1.0.7","maintainers":[{"name":"dreygur","email":"ryeasin03@gmail.com"}],"dist":{"shasum":"8e65eb5cf994a615d2e383fc237340fb9b78a5b1","tarball":"https://registry.npmjs.org/@dreygur/td365/-/td365-1.0.7.tgz","fileCount":25,"integrity":"sha512-jsOZSCe8I0MIw13hsyiZmbw28gYexTBia5cwygCTEdl2gcwfpj5yjGzy05qyOS1S2ox64143/UN259lfrkVH0Q==","signatures":[{"sig":"MEUCIQDEJSVI2QrajujjUw0rPhA0qzl85wf1V+MjlyTg6VhWEQIgePCnhrF5fcGL/RK8vLvsnnDge5F0V4aHp/Rpypew9Cw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":37969},"main":"lib/index.js","scripts":{"dev":"nodemon src/index.ts","build":"esbuild --bundle src/index.ts --outdir=dist --platform=node --target=es2020","start":"node dist/index.js","compile":"tsc","prepare":"tsc"},"_npmUser":{"name":"dreygur","email":"ryeasin03@gmail.com"},"repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","directories":{},"dependencies":{"ws":"^8.13.0","axios":"^1.4.0","dotenv":"^16.3.1","express":"^4.18.2","node-fetch":"^3.3.2","https-proxy-agent":"^7.0.1"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.1","ts-node":"^10.9.1","@types/ws":"^8.5.5","typescript":"^5.1.6","@types/node":"^20.4.7","@types/express":"^4.17.17"},"_npmOperationalInternal":{"tmp":"tmp/td365_1.0.7_1695053580406_0.6643765978614802","host":"s3://npm-registry-packages"}}},"time":{"created":"2023-08-17T11:53:05.229Z","modified":"2026-07-28T09:32:24.822Z","1.0.0":"2023-08-17T11:53:05.480Z","1.0.1":"2023-08-21T08:17:41.826Z","1.0.2":"2023-08-21T08:24:18.507Z","1.0.3":"2023-08-22T08:58:37.752Z","1.0.4":"2023-08-23T07:32:04.581Z","1.0.5":"2023-08-23T12:25:21.684Z","1.0.6":"2023-08-31T18:41:55.114Z","1.0.7":"2023-09-18T16:13:00.607Z"},"author":{"url":"https://github.com/dreygur","name":"Rakibul Yeasin","email":"ryeasin03@gmail.com"},"license":"MIT","repository":{"url":"https://github.com/dreygur/td365","type":"git"},"description":"A wraper for tradedirect365.com","maintainers":[{"email":"ryeasin03@gmail.com","name":"ryeasin03"}],"readme":"# TD365\n\nRecently, we undertook a project related to trading. The requirements were straightforward: the client wanted a personalized trading terminal containing a limited set of trading items to be traded across multiple accounts. They wished to operate multiple trading accounts from this customized terminal. Additionally, they required the terminal to execute the same trade order simultaneously across all of the trading accounts they had saved.\n\n### Challenges:\nManaging trading accounts can be tricky, especially on platforms where anonymous traders engage in item trading. These platforms are quick to suspend accounts if any form of misuse is detected. Unfortunately, the platform did not provide any APIs for creating a program that interacts with it. Therefore, we had to find a solution on our own.\n\n### First approach:\nOur initial approach was to automate trading using a browser automation tool, aiming to avoid detection. However, this method did not yield satisfactory results. We encountered issues related to trade order placement, particularly due to problems with XPath caused by the platform's anti-bot measures. Even after circumventing these anti-bot measures, we struggled with response times. Placing a single trade order took around 2-3 seconds or even longer, which naturally left the client dissatisfied.\n\nAt this point, we decided to explore more unconventional methods.\n\n### Second approach:\nWe began to closely monitor the network requests made by the platform and identified some REST API endpoints. However, security measures were stringent.\n\nTo place a trade order, specific values were required, but the source of these values remained elusive. Each order necessitated the current price of the item, and while we attempted to use the private API with the visible values from the platform, our efforts were in vain. The platform employed a unique key parameter for all orders, and initially, this parameter's purpose eluded us. Undeterred, we combined the price retrieval mechanism from a WebSocket API we discovered on the platform with the private API to execute orders at the actual price. Unfortunately, this too did not yield success.\n\nAfter another half-hour of searching, we successfully located the elusive key. Astonishingly, it had been right in front of us the entire time!\n\nFinally, we managed to place trade orders within a mere 100 milliseconds!\n\n### Which approach did we ultimately adopt?\nLet's keep that as our little secret.\n\n### What did we learn from this experience?\nWe gleaned invaluable insights, from bypassing new anti-bot strategies to accessing private APIs.\nMost importantly, we thoroughly enjoyed the entire process!\n\n","readmeFilename":"README.md"}