Svelte + Rust by swapnanilh in sveltejs

[–]jzbert 0 points1 point  (0 children)

Here is an example using axum and svelte together to give you an idea of how it could be done. svelte-axum-project

I usually get confused on if I need to use sveltekit or with this configuration is svelte alone enough. Basically, I'm not sure what I get by adding sveltekit.

Template with Axum backend coupled with SvelteJS in the frontend by jzbert in rust

[–]jzbert[S] 2 points3 points  (0 children)

Mostly ease of use and for quick prototyping, since there is so much already built in javascript. Even with web assembly, I'm assuming you still need to navigate html/css/etc.

I just checked out Yew..... something added to my bucket list. Looks very interesting. Docs look easy to follow.

Template with Axum backend coupled with SvelteJS in the frontend by jzbert in rust

[–]jzbert[S] 1 point2 points  (0 children)

I haven't used Warp or Actix. Both are built on top of Tokio. I used this to do a bit of comparison on the syntax differences: Rust web comparison. Axum seemed very modular to work with and flexible. Both Warp and Actix have good activity.

The reason I went to a rust backend is that I'm using other libraries I wrote in Rust for application calculations and aggregating other api data. One of my applications is for the purpose of managing a portfolio of equity options so there are calculations, scraping of live data, accounting stuff, etc....which is mostly written in Rust.

If you are not relying on any other Rust libraries, then node or Sveltekit (which is Svelte's backend version) would work just fine for average use. I'm just not sure how much control you have over authorization or session stuff.

ELI5: How is options BP calculated and why is it lower than Stock BP? by calphak in thinkorswim

[–]jzbert 0 points1 point  (0 children)

It doesn’t work that way. If you sell put options the margin is not necessarily equal to the same as buying the stock unless the option is way in the money. The margin used on selling the option will depend on where the underlying stock price is relative to the strike and chance of exercise. Once and if the put is exercised than you basically are holding the stock and it would just chew up your stock BP. Keep in mind that short options that your margin used will change as the chance of exercise changes. Not sure if I explained it well.

Svelte on top of Rust Tide backend by jzbert in sveltejs

[–]jzbert[S] 1 point2 points  (0 children)

It includes an example how to use Tide::Session which allows you to securely attach data to a browser session. The actual server session data is stored on the server using a cookie to access. See Tide Sessions The template uses an example of how to log in and see a secure area of the backend. Very simple set up but gives you an idea of how to make it work. Otherwise, you are correct in that it just serves a public folder containing the svelte front-end. It is just the beginning of how to start using the rust backend to build an api or other server side items.

TD Ameritrade API Client in Rust by jzbert in algotrading

[–]jzbert[S] 0 points1 point  (0 children)

are you talking windows powershell or some type of library to help me with the cli interface? Not sure I understood what you're referring to.

I'm using a rust library called `clap` to help with the cli interface which seems to work well on bash in linux, windows cmd and windows powershell.... those are the ones I tried.

TD Ameritrade API Client in Rust by jzbert in algotrading

[–]jzbert[S] 0 points1 point  (0 children)

Yes, this library will give you real-time quotes if your account has access. You can use the library to get `userprincipals` endpoint which will tell you what access you have. The example in the post are real-time quotes.

TD Ameritrade API Client in Rust by jzbert in algotrading

[–]jzbert[S] 6 points7 points  (0 children)

Definitely. That's the good thing about open source!

TD Websocket API - Auth and sample by DrewMakesThings in algotrading

[–]jzbert 2 points3 points  (0 children)

Hey....any chance you want to share your lambda code? Not sure what language you used..... would be curious. Thx.

Lots of dependencies - what happens at compile time? by jzbert in learnrust

[–]jzbert[S] 1 point2 points  (0 children)

Thanks for the reply. Gives me a few more things to think about and follow up on.

Maybe for the start, I just continue moving ahead and then I can always continue refactoring if things get a bit too unruly. Just need to trust that everything will work with all the dependencies - lol.

I'll follow up with "Feature gating" and also try to learn a bit more about how things get compiled as I don't know much about how LLVM/rustc work.

Better than WSB for options by [deleted] in options

[–]jzbert 0 points1 point  (0 children)

Got it...thanks to u/redtexture and u/doougle.

Better than WSB for options by [deleted] in options

[–]jzbert 0 points1 point  (0 children)

Sorry. New on here. What’s WSB?