-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Roadmap to production-ready mega-thread #1
Comments
By the way, if you have beta, let me try i'll test it and send you a report asap. And may be fix in MR |
Hey, thanks for the kind words! The library will be published this week with full coverage of the trading and market data APIs, including crypto. Just need to clean up the types and set up the build process. The core logic is all done. Will tag you first thing 😉 when its out. |
Ok, I have a deployment action setup, it is now being published to NPM. I have tested a good amount of the trading API endpoints, market data next. Types are a bit brutal to cleanup but i'm getting there. Feel free to install and test at will while I develop further. |
Also the WebSocket is functional but the types are .. in progress to say the least. |
Good news, i'll start with btc now, because stocks are out of market time. I Will send to this thread everything what i can find. Also after migration (from master chief's library) i can make a PR |
Doc:
Real one: Expected:
|
After the first look at the client i guess i need two different clients with same credentials: One for the market access and another for the data stream, is that right?
|
I need an example with this call: const res = await this.api.v2.assets.get({ symbol_or_asset_id: ticker }); // looks wrong
const res = await this.api.v2.assets[':symbol_or_asset_id'].get({ symbol_or_asset_id: ticker }); // looks right but not clear |
Is that right? May be typescript-sdk/src/api/trade.ts Line 850 in ca5ab8f
|
A default I'll add source, good catch. WebSocket is very unfinished right now, I will do that tomorrow before I cleanup/add the types for the market data endpoints. Now as far as the below is concerned.. const res = await this.api.v2.assets.get({ symbol_or_asset_id: ticker }); // looks wrong
const res = await this.api.v2.assets[':symbol_or_asset_id'].get({ symbol_or_asset_id: ticker }); // looks right but not clear The idea here was to mimic the path of the endpoint. I don't know what to do about those types of endpoints.. if I break convention with something like a I could also just say screw it and go back to |
Honestly, going back to the camel case getters would make my life a lot easier as far as the types are concerned. Compiling a list of all this, keep it coming 😄. |
I like an idea to use |
I wont do :) I want to have a stable access to market and data, and that is everything what i really need :) |
will update this all tomorrow 👍, late here at the moment. an unstable websocket is very annoying ill make sure it stays connected within the client |
Ok just powered through refactoring all of the trading api methods https://github.com/alpacahq/typescript-sdk/tree/main?tab=readme-ov-file#methods. How do we feel about that? I like it, maybe all of the crypto ones need "crypto" in the method names though. Build will be failing, I have to refactor the You can see the re-written code here. |
Taking a break today, will get the build working and trading api methods consumable so you can test it a bit later. |
Trading API
Market Data API
Working on websocket now. |
Can you create a beta release? I will try to use Use the npm publish --tag beta |
Check latest, added method examples to README too. https://github.com/alpacahq/typescript-sdk?tab=readme-ov-file#methods |
Doing WebSocket now. |
So far https://github.com/alpacahq/typescript-sdk/blob/main/factory/createStream.ts, types and auxiliary functions next. |
...
protected api: Client;
...
this.api = createClient({ key, secret }); Hacky way working now: ...
protected api: ReturnType<typeof createClient>;
... |
Typings wrong in Not same with described here |
Hi! I see that the project is almost ready. Let me express my gratitude for your contribution to the algo trading community. I'm really looking forward, like many others, to the latest version of the typescript API for alpaca. Thank you for creating this project.
I would like to know if there will be crypto support out of the box in the first release? This is very important because it is difficult to test real positions because we immediately run into daily trading limits, and there are no such limits on crypto assets. I'm really looking forward to the appearance of crypto assets in the API so that I can work and study the behavior of transactions in the real market.
The text was updated successfully, but these errors were encountered: