#Neuro Stock Portfolio display

1 messages · Page 1 of 1 (latest)

calm comet
#

I spotted this repo from the VedalAI GitHub organization that seems to be used to display Neuro's stocks data during the subathon. Given that, I made a website (and by I, I mean myself and Copilot) to visually display the data, in preparation for the subathon.

Site: https://neuro-stocks.ktrain5369.dev
Source: https://github.com/KTrain5169/neuro-stock-portfolio

Notes:

  • I will be leaving this site up after subathon ends, but will put it in a read-only state.
  • The site is a bit bland right now because I'm not sure what looks right. If you have any ideas, feel free to contribute.
  • The data from the data repo is test data right now that will be erased, so you're not actually gonna see anything (of value) yet.
  • I made this only in a couple of days so you'll probably see unoptimized code.
  • The favicon is the Vite logo because I'm not good at drawing and I don't want to take Neuro logos to use.
calm comet
#

who's the one person who starred this

naive mica
calm comet
#

it was a joke of how crap of an idea this is compared to something else that I have cooking but ig I'm not good at implying stuff so

naive mica
#

i mean its nice

calm comet
#

wtf are you all doing

night path
#

lmfaooooooooooo

#

das crazy

calm comet
#

if this causes disruptions I'm not letting anyone refresh

night path
#

well I am gonna make my own instance

#

do I need any keys

calm comet
#

I mean I could also just make it always hit github

#

if I don't mind getting rate limited

night path
#

oh

#

ok

next spire
willow topaz
#

how the hell

naive mica
#

We swarmed it

hollow bison
# calm comet wtf are you all doing

try making a cache rule in the cloudflare dashboard to make the worker endpoint eligible for caching? i'm not sure how well (if at all) those work with workers but you can try neuroShrug all i know is that workers aren't eligible by default so just setting a Cache-Control header only would affect the client. something like max-age=60 would limit you to 1440 requests a day max per endpoint

naive mica
#

Noooooo

night path
#

this is why i wanted to make my own instance

#

.,.

night path
naive mica
#

I dont think she can stock yet

night path
#

not yet

next spire
#

uh

hollow bison
#

ICANT gg

next spire
#

rip

naive mica
#

rip

blissful palm
#

Mobile works better than offical

calm comet
naive mica
#

Vedal kinda...

#

Dropped a official version of the site today

calm comet
#

I saw

#

idgaf

naive mica
#

Fair enough

calm comet
#

also apparently mine works better on mobile so I'll take that

#

now I just need to fix some issues

#

and wait until tomorrow because my limits have been reached already

naive mica
#

I feel it's solution of just directly getting the json from GitHub is better then KV

calm comet
naive mica
#

Oh his mobile UI is awful, you can't even see the full graph

calm comet
#

would it be ok if it updates every day instead or should I make it like every 6 hours

blissful palm
calm comet
naive mica
#

Atleast he's using react!

#

Even if it's not reactive

calm comet
#

I was going to criticize him for using react but then I realised I used vue so I can't really say much

#

anyways, should it update every 6 hours?

#

or like

#

what's a reasonable update time

naive mica
#

Could you try to update more frequently but only while the market is open?

calm comet
#

true

#

what time are the markets open usually...

naive mica
#

I have clue

#

Weekdays at some point

calm comet
#

Yeah but I need time bound

#

wait this also means I can add a little banner when stock markets are open

naive mica
#

I'm not even sure what market is being traded on

calm comet
#

Well, with my current logic, I can temporarily make it update every like 3 hours at least, maybe I can decrease it too but I'll leave it at 3 hours now

blissful palm
calm comet
#

so 3pm gmt every day to like uhhh

#

what time did they stop today

naive mica
#

Iirc she might do some solo stuff earlier

#

So vedal gets more sleep

blissful palm
#

2-3 hours for solo neur, 10 hours total stream IIRC

calm comet
#

well it says that neur will wake up at 3pm gmt

calm comet
#

:LULE: rounding error

ashen merlin
#

Individual holdings aren't displaying properly

#

Not sure if this is a mobile problem

calm comet
calm comet
#

uh huh

#

can someone please double check this to make sure it is correct?

#

Pushing above changes rn, lmk if something breaks

#

most of the problems will probably be due to the actual data itself lmao

#

but also I wouldn't be surprised if I didn't put good code there

naive mica
#

Current price is slightly off offical site, but id assume that data is slightly stale

calm comet
#

Data is stale

#

I'll probably switch it to fetch from github directly assuming they don't mind such a thing

naive mica
#

quantity seems correct, so does market value and all that

calm comet
#

actually I should check how the official site does it rn

calm comet
#

yeeah ok thought so

#

what was the official site link again

naive mica
calm comet
#

he's using a build tool

naive mica
#

I mean, its react

calm comet
#

it's react lmao

#

i think I forgot

#

or smth idk

calm comet
#

lmao

#

i think im very stupid today

naive mica
calm comet
#

what is that

naive mica
#

Browser extension that detects the stack of a site

calm comet
#

ah

#

anyways, I think at one point if I think it's worth it I'll set up something that allows my site to live update without needing to refresh

naive mica
calm comet
#

and much as they spammed github it wuld likely be to see if stocks have changed

naive mica
#

I feel you would have to refresh a excessive amount of times, and data is only updated every 15 minutes

calm comet
#

Anyways, how many people actually use this site

naive mica
#

I like the UI more then offical

#

You could save a cache in localstorage to prevent api issues?

calm comet
calm comet
#

new update! you can now toggle dark mode

frigid void
#

Thanks for making this. The official site somehow causes lag, doesn't work most of the time by getting stuck at "Loading" most of the time I try, and I think also slightly wrong portfolio value (can't check rn because it's not loading), so this is the only way to check and keep track neuroHypers

frigid void
#

It loaded this time but it shows 20,202$ at 11am yesterday but yours shows 20,339$ at the same time instead. What's causing the difference?

rigid canopy
#

the investment wasn't exactly 20k but the unofficial doesn't know that (rather, the portfolio used to invest has a stray amount of cash in it past 20k that was never used and skews numbers if you dont account for it)

calm comet
rigid canopy
#

yeah

calm comet
#

great

#

I should probably update the code then

#

actually wait, if it was never used, it would be counted as a bug, right?

#

I'll probably add a note saying there was an extra unintended and unused +$137 at the start

rigid canopy
#

the backend is written with a 20k basis but its not actually a 20k basis, so the data outputted to the gh repo you saw is off slightly which will make visualizations off

calm comet
#

oh so the data itself is off? should probably change the message then?

#

idk, probably should also handle it by adding $137

rigid canopy
#

the backend data hardcodes the $20k but since it's 20137.15 in actuality the data output is that same 137.15 off yeah

calm comet
#

ahhhh

#

right

#

well I don't think it changes much but I'll at some point match it, probably, idk if it's a good idea considering that money is unused

#

oh wait

#

I just realised

rigid canopy
#

you can either make the starting point 20137.15 or subtract it from the datapoints and make the starting point 20k

#

both work fine i think

#

just affects stuff like total net profit sort of visuals

calm comet
#

also why is cash negative on the json?

rigid canopy
#

uh

#

probably the weird margin thing vedal was talking about at the time

#

not sure what implications that actually has but

#

i dont actually know what trading with margins actually means though neurOMEGALUL

calm comet
#

well it makes it seem like neuro is in debt

#

so uh

#

200k subgoal time I guess neurOMEGALUL

fresh quartz
#

can you show graphs of each single stock?

calm comet
fresh quartz
#

it would be cool to see in the same page the graphs of everything that has been bought and sold, even when they aren't in the portfolio

fresh quartz
#

Imagine seeing tesla jumping up lol

hexed tapir
#

Could you make the “open positions” tables sortable by each header?

calm comet
#

vedalOk will implement asap

#

and by that I meant possibly after tmrw

fresh quartz
fresh quartz
#

Would be cool to have a graph with a list of all stocks that have been bought or sold with a checkbox for each that you can toggle to show them on the graph, with also markers on the lines to indicate when the stock was "Bought" and "Sold".

calm comet
#

probably a good idea yeah