Repository navigation
daytrader-go: market - #5
Open
devin-ai-integration[bot] wants to merge 2 commits into
Open
devin-ai-integration[bot] wants to merge 2 commits into
devin-ai-integration[bot] wants to merge 2 commits into
Conversation
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ports the market area of DayTrader to Go: the home page, the quotes page and the market summary. Only
daytrader-go/internal/features/market/anddaytrader-go/templates/market_*.htmlare touched.What was ported
action=home(TradeServletAction.doHome,tradehome.jsp): account and holdings for the logged-in user, the account summary totals, and the market summary. The status line is read fromweb.Attr(r, "results"), default"Ready to Trade". Liketradehome.jsp, the page does not print it.action=quotes(doQuotes,quote.jsp,displayQuote.jsp):symbolssplit on commas and spaces, one row per quote, each with the buy form (action=buy, hiddensymbol,quantitydefault 100).GetQuotekeeps the legacy "invalid symbol" placeholder for empty or over-long symbols.TradeSLSBBean.getMarketSummary,MarketSummaryDataBean,marketSummary.jsp): the 100s:1__quotes ordered by change, first five as gainers, last five reversed as losers, TSIA / open TSIA as averages rounded HALF_UP to 2 places, total volume, gain percent.Parity (as printed by
make parity)go-auth+go-account+go-infra(the siblings on origin at the time):01-login,02-home,03-quotes,08-account-update,09-invalid-login,10-logoutPASS. Target scenarios02-homeand03-quotesboth PASS.04-register,05-buy,13-rest-entryDIFF;06-sell,07-portfolio,11-rest-list,12-rest-searchERROR. I did not investigate these;go-trading,go-restandgo-testswere not on origin yet.gofmt -l .,go vet ./...,go test ./...are clean on this branch.Deliberate differences from legacy
symbolas a tie-break:ORDER BY change1 DESC, symbol. Legacy orders bychange1only, so ties are in database order.market_quotesEnd) instead of the sharedpageEnd.quote.jspkeeps "for a quote or to trade." on one line, and the shared block (taken fromtradehome.jsp) splits it, which showed up as a diff in03-quotes.Scaffold requests
templates/layout.htmlpageEnd: allow the one-line footer note variant used byquote.jsp, so the quotes page can drop its copy of the footer.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/f643c40cb1c34516aed26f03b9a47be3
Open in Devin Desktop: https://partner-workshops.devinenterprise.com/desktop/session/f643c40cb1c34516aed26f03b9a47be3?variant=devin
Requested by: @sumitshatwara