Skip to content

Commit

Permalink
assorted fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecsl committed Feb 20, 2025
1 parent 954b050 commit 3d8146f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# TD Ameritrade WsJson API client
# thinkorswim WsJson API client

This is a node and browser API client for the (undocumented) Schwab WebSocket API.
This is a node and browser API client for the (undocumented) thinkorswim WebSocket API.

🚧 Work in progress 🚧

# Prerequisites

- Node 16+
- Node 18+

# Building for Node

Expand Down Expand Up @@ -68,8 +68,7 @@ for await (const event of client.chart(chartRequest)) {
}
```

For more sample usage check out https://github.com/huskly/tda-wsjson-client/blob/master/src/testApp.ts and
https://github.com/huskly/tda-wsjson-client/blob/master/example/src/App.tsx
For more sample usage check out https://github.com/huskly/tos-wsjson-client/blob/master/src/example/testApp.ts

# Running tests

Expand Down
10 changes: 4 additions & 6 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
],
};
export const presets = [
["@babel/preset-env", { targets: { node: "current" } }],
"@babel/preset-typescript",
];
4 changes: 2 additions & 2 deletions src/client/realWsJsonClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ export default class RealWsJsonClient implements WsJsonClient {
private iterator = new MulticastIterator(this.buffer);
private state = ChannelState.DISCONNECTED;
private authCode?: string;
// @ts-ignore
// @ts-expect-error

Check failure on line 134 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (23.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 134 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 134 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 134 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
private accessToken?: string;
// @ts-ignore
// @ts-expect-error

Check failure on line 136 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (23.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 136 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 136 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 136 in src/client/realWsJsonClient.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
private refreshToken?: string;

constructor(
Expand Down
2 changes: 1 addition & 1 deletion src/client/wsJsonClientAuth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import debug from "debug";
import { WsJsonClient } from "./wsJsonClient.js";

// @ts-ignore
// @ts-expect-error

Check failure on line 4 in src/client/wsJsonClientAuth.ts

View workflow job for this annotation

GitHub Actions / build (23.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 4 in src/client/wsJsonClientAuth.ts

View workflow job for this annotation

GitHub Actions / build (19.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 4 in src/client/wsJsonClientAuth.ts

View workflow job for this annotation

GitHub Actions / build (20.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer

Check failure on line 4 in src/client/wsJsonClientAuth.ts

View workflow job for this annotation

GitHub Actions / build (18.x)

Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer
const logger = debug("wsJsonClientAuth");

export default class WsJsonClientAuth {
Expand Down

0 comments on commit 3d8146f

Please sign in to comment.