{"repo":"huskly/tos-wsjson-client","free":true,"listed":false,"github":"https://github.com/huskly/tos-wsjson-client","clone":"git clone https://github.com/huskly/tos-wsjson-client.git","description":"WebSocket client for the thinkorswim wsjson API","language":"TypeScript","stars":10,"topics":["finance","quantitative-finance","trading"],"license":null,"category":"trading","readme_excerpt":"thinkorswim WsJson API client This is a node and browser API client for the (undocumented) thinkorswim WebSocket API. 🚧 Work in progress 🚧 Prerequisites - Node 18+ Building for Node Running the test app Create a .env file with the following: Running the proxy server Running the proxy client Authentication flow There seems to be currently two ways to authenticate: 1. From scratch with username and password: 1.1 Send a message with the login/schwab service including the authCode obtained from the browser oauth flow at trade.thinkorswim.com ; 1.2 This will return a token and refreshToken which should be saved for future use; 1.3. The authCode is single use and cannot be used again once exchanged for a token. 2. From a previously obtained token 2.1 Send a message with the login service including the token returned from the login/schwab response message (step 1 above) 2.2 This will return the same token , weirdly, and a refreshToken , which should be saved for future use 2.3 The token is valid for 24 hours. Supported APIs - ✅ Authentication via access token - ✅ Quotes - ✅ Price History (chart) - ✅ Account positions - ✅ Place & submit order - ✅ Cancel order - ✅ User properties - ✅ Create alert - ✅ Cancel alert - ✅ Instrument search - ✅ Option chains - ✅ Alert lookup - ✅ Option chain details - ✅ Option chain quotes - ✅ Option quotes - ✅ Order events - ✅ Market depth - ✅ Get watchlist Not yet implemented - ❌ Instrument order events - ❌ Alert subscription - ❌ And many more 😀 Usage ","default_branch":null,"files":null,"tree":[],"storefront":"/r/huskly","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/huskly/tos-wsjson-client/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}