Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/delta/dalal-street-server
/ functions
Functions
739 in github.com/delta/dalal-street-server
⨍
Functions
739
◇
Types & classes
147
↓ 1 callers
Function
AddStocksToExchange
(stockId uint32, count uint64)
models/Stock.go:272
↓ 1 callers
Function
AddUserReservedCash
AddUserReservedCash adds reservedCash to the users account This function should be called ONLY AFTER lock is obtained on user
models/User.go:869
↓ 1 callers
Function
AddUserSubscription
AddUserSubscription Adds the subscription keys for sending push notifications
models/PushNotification.go:57
↓ 1 callers
Method
BuyStocksFromExchange
(ctx context.Context, req *actions_pb.BuyStocksFromExchangeRequest)
grpcapi/actionservice/StockActionService.go:13
↓ 1 callers
Method
CancelAskOrder
(*models.Ask)
matchingengine/MatchingEngine.go:21
↓ 1 callers
Method
CancelBidOrder
(*models.Bid)
matchingengine/MatchingEngine.go:22
↓ 1 callers
Function
ChangePassword
(tempPass, newPass, confirmPass string)
models/PasswordReset.go:83
↓ 1 callers
Function
CloseDB
()
utils/Db.go:19
↓ 1 callers
Function
ConfigDataInit
ConfigDataInit init initial values for Config table
models/Config.go:18
↓ 1 callers
Function
CreateBot
CreateBot creates a bot from the botName
models/User.go:386
↓ 1 callers
Method
Destroy
()
session/session.go:28
↓ 1 callers
Function
GetAllIpoStocks
()
models/Ipo.go:57
↓ 1 callers
Function
GetAllOpenAsks
GetAllOpenAsks returns all open asks. This will be called by MatchingEngine while initializing.
models/Ask.go:246
↓ 1 callers
Function
GetAllOpenBids
GetAllOpenBids returns all open bids. This will be called by MatchingEngine while initializing.
models/Bid.go:182
↓ 1 callers
Function
GetAskTransactionsForStock
(stockID, count uint32)
models/Transaction.go:170
↓ 1 callers
Function
GetDailyChallengeConfig
GetDailyChallengeConfig returns DailyChallengeConfig
models/Config.go:146
↓ 1 callers
Function
GetDailyLeaderboard
(userId, startingId, count uint32)
models/DailyLeaderboard.go:40
↓ 1 callers
Function
GetEntireLeaderboard
Returns the Entire Leaderboard
models/LeaderboardRow.go:43
↓ 1 callers
Function
GetLeaderboard
(userId, startingId, count uint32)
models/LeaderboardRow.go:64
↓ 1 callers
Method
GetMarketDepthUpdates
(req *datastreams_pb.SubscriptionId, stream pb.DalalStreamService_GetMarketDepthUpdatesServer)
grpcapi/streamservice/MarketStreamService.go:12
↓ 1 callers
Function
GetMyIpoBids
(userId uint32)
models/IpoBid.go:169
↓ 1 callers
Function
GetMyReward
GetMyReward add reward to user as cash
models/DailyChallenge.go:646
↓ 1 callers
Function
GetNewFileLogger
GetNewFileLogger returns a logger that writes to a file of the given name
utils/log.go:56
↓ 1 callers
Function
GetNotifications
(userId, lastId, count uint32)
models/Notification.go:31
↓ 1 callers
Function
GetReferralCode
GetReferralCode fetches a user's referral code if its exists, Else will generate one and sends it to the user
models/ReferralCode.go:25
↓ 1 callers
Method
GetReferralCode
(ctx context.Context, req *actions_pb.GetReferralCodeRequest)
grpcapi/actionservice/UserActionService.go:308
↓ 1 callers
Function
GetReservedStocksOwned
(userId uint32)
models/User.go:2322
↓ 1 callers
Function
GetStockHistory
(stockId uint32, interval Resolution)
models/StockHistory.go:275
↓ 1 callers
Function
GetTransactions
(userId, lastId, count uint32)
models/Transaction.go:136
↓ 1 callers
Function
GetUserState
GetUserState returns userState
models/DailyChallenge.go:621
↓ 1 callers
Function
GetUserStockWorth
GetUserStockWorth returns total stockworth of a user including reserved StockWorth
models/User.go:2581
↓ 1 callers
Function
GetmaxStockID
GetmaxStockID returns the maximum StockID from the stocks.
models/Dividends.go:187
↓ 1 callers
Function
GrpcHandlerFunc
Handler func to handle incoming grpc requests
grpcapi/grpcapi.go:229
↓ 1 callers
Method
Head
()
matchingengine/pqueue.go:27
↓ 1 callers
Function
Init
Init configures the matching engine
matchingengine/MatchingEngine.go:38
↓ 1 callers
Function
Init
()
httpapi/mux.go:9
↓ 1 callers
Function
IsDockerEnv
()
utils/utils.go:96
↓ 1 callers
Function
IsGrpcRequest
(req *http.Request)
utils/utils.go:80
↓ 1 callers
Method
Login
(ctx context.Context, req *actions_pb.LoginRequest)
grpcapi/actionservice/AuthActionService.go:79
↓ 1 callers
Function
MinInt64
(a, b uint64)
utils/utils.go:50
↓ 1 callers
Function
New
New returns a new session
session/session.go:92
↓ 1 callers
Function
NewDalalActionService
NewDalalActionService returns instance of DalalActionServiceServer
grpcapi/actionservice/DalalActionService.go:39
↓ 1 callers
Function
NewDalalStreamService
NewDalalStreamService creates a new DalalStreamServer instnance
grpcapi/streamservice/DalalStreamService.go:45
↓ 1 callers
Function
NewMatchingEngine
NewMatchingEngine returns an instance of MatchingEngine It calls StartStockmatching for all the stocks in concurrent goroutines. WARNING: Do NOT call
matchingengine/MatchingEngine.go:45
↓ 1 callers
Function
NewMockManager
NewMockManager creates a new mock instance
mocks/mock_Stream.go:25
↓ 1 callers
Function
NewMockOrderBook
NewMockOrderBook creates a new mock instance
mocks/mock_OrderBook.go:25
↓ 1 callers
Function
NewOrderBook
NewOrderBook returns a new OrderBook instance for a given stockId.
matchingengine/OrderBook.go:46
↓ 1 callers
Function
OpenMarket
(updateDayHighAndLow bool)
models/MarketClose.go:10
↓ 1 callers
Function
PasswordReset
PasswordReset -> Takes in email of user ,validates it and sends password change email to user
models/PasswordReset.go:20
↓ 1 callers
Function
PerformBuyFromExchangeTransaction
(userId uint32, stockId uint32, stockQuantity uint64)
models/User.go:1682
↓ 1 callers
Function
PerformOrderFillTransaction
(ask *Ask, bid *Bid, stockTradePrice uint64, stockTradeQty uint64)
models/User.go:1863
↓ 1 callers
Function
RefundIpoSlotToUser
(ipoBid *IpoBid, newStockId, SlotQuantity, StocksPerSlot uint32, cost int64)
models/Ipo.go:354
↓ 1 callers
Method
RemoveListener
(sessionId string)
datastreams/MarketDepth.go:19
↓ 1 callers
Method
RemoveListener
(sessionId string)
datastreams/MarketEvents.go:15
↓ 1 callers
Method
RemoveListener
(userId uint32, sessionId string)
datastreams/GameStateStream.go:17
↓ 1 callers
Method
RemoveListener
(userId uint32, sessionId string)
datastreams/Notifications.go:17
↓ 1 callers
Method
RemoveListener
(sessionId string)
datastreams/StockExchange.go:19
↓ 1 callers
Method
RemoveListener
(groupId uint32, sessionId string)
datastreams/MulticastStream.go:14
↓ 1 callers
Method
RemoveListener
(userId uint32, sessionId string)
datastreams/Transactions.go:15
↓ 1 callers
Method
RemoveListener
(userId uint32, sessionId string)
datastreams/MyOrders.go:14
↓ 1 callers
Function
SaveCancelledIpoBidTransaction
(IpoBidToCancel *IpoBid, price uint64)
models/IpoBid.go:268
↓ 1 callers
Function
SaveNewIpoBidTransaction
(NewIpoBid *IpoBid, UserId uint32, price uint64)
models/IpoBid.go:190
↓ 1 callers
Function
SendDividendsTransactionsAndNotifications
SendDividendsTransactionsAndNotifications sends Transactions through Transactions stream and a Notification about Dividends to all users.
models/Dividends.go:156
↓ 1 callers
Function
SendSMS
(toPhoneNumber, content string)
utils/utils.go:114
↓ 1 callers
Method
SendStockHistoryUpdate
(stockId uint32, history *models_pb.StockHistory)
datastreams/StockHistory.go:12
↓ 1 callers
Method
Set
Set sets a key value pair in the map
session/session.go:129
↓ 1 callers
Function
SetDayHighAndLow
SetDayHighAndLow will be called when market is opening for the day
models/Stock.go:356
↓ 1 callers
Function
SetPreviousDayClose
SetPreviousDayClose will be called when market is closing for the day to update the day closing
models/Stock.go:316
↓ 1 callers
Function
SquareOffLends
* squareOffLends square off the active intra day lends - takes back the stocks given to the user(from stocks they owns) on that day - the difference i
models/ShortSell.go:128
↓ 1 callers
Method
String
()
models/Transaction.go:74
↓ 1 callers
Method
ToProto
()
models/LeaderboardRow.go:28
↓ 1 callers
Method
ToProto
()
models/OrderFill.go:17
↓ 1 callers
Method
ToProto
()
models/Stock.go:53
↓ 1 callers
Method
ToProto
()
models/IpoBid.go:28
↓ 1 callers
Method
ToProto
()
models/Ask.go:83
↓ 1 callers
Function
UpdateDailyLeaderboard
function to update DailyLeaderboard. Must be called periodically
models/DailyLeaderboard.go:91
↓ 1 callers
Function
UpdateLeaderboard
function to update leaderboard. Must be called periodically
models/LeaderboardRow.go:115
↓ 1 callers
Function
UpdateLeaderboardTicker
helper function to update leaderboard every thirty seconds
models/LeaderboardRow.go:202
↓ 1 callers
Function
UpdateMarketEvent
(stockId, oldNewsId uint32, headline, text string, isGlobal bool, imageURL string)
models/MarketEvent.go:134
↓ 1 callers
Function
VerifyAccount
VerifyAccount is used to handle logic after clicking the email verification link sent after registration
models/Registration.go:41
↓ 1 callers
Function
VerifyReferralCode
VerifyReferralCode checks if the user has entered a valid referral code
models/ReferralCode.go:81
↓ 1 callers
Function
buildGraph
Funcion to build graph and volume of transaction of each user with nodes of degree 1
models/InspectUserDegree.go:67
↓ 1 callers
Method
clearExistingOrders
* * Method to clear the existing orders for a particular stock */
matchingengine/OrderBook.go:559
↓ 1 callers
Function
createAsk
createAsk adds the ask to the database, fills the Id field of the ask and adds it to the asksMap
models/Ask.go:180
↓ 1 callers
Function
createBid
(bid *Bid, tx *gorm.DB)
models/Bid.go:127
↓ 1 callers
Function
createShortSellLend
creates a short sell lend for short selling order
models/ShortSell.go:98
↓ 1 callers
Function
generateVAPIDHeaderKeys
Generates the ECDSA public and private keys for the JWT encryption
models/PushNotification.go:365
↓ 1 callers
Function
getAsk
(id uint32)
models/Ask.go:141
↓ 1 callers
Function
getBid
(id uint32)
models/Bid.go:90
↓ 1 callers
Function
getComponents
Funcion to build graph and get components
models/InspectComponents.go:47
↓ 1 callers
Function
getConnection
(t *testing.T)
grpcapi/grpcapi_test.go:47
↓ 1 callers
Function
getSpecificStocksEntry
getSpecificStocksEntry returns rows of userid and stockQuantity for an stockId
models/DailyChallenge.go:595
↓ 1 callers
Function
getTaxForAskingUser
Helper to calculate tax for asking user It is assumed that an Exclusive Read and Write lock is already obtained for the user. DO NOT call this functio
models/User.go:1605
↓ 1 callers
Function
getTotalSingleStockCount
getTotalSingleStockCount returns total stocks a user owns including reserved stocks
models/User.go:531
↓ 1 callers
Function
getTradePriceAndQty
* * getTradePriceAndQty returns the trade price and quantity for a particular match of orders */
matchingengine/helpers.go:28
↓ 1 callers
Function
getVAPIDAuthorizationHeader
getVAPIDAuthorizationHeader
models/PushNotification.go:391
↓ 1 callers
Function
initDbHelper
(config *Config)
utils/Db.go:23
↓ 1 callers
Function
initLogger
initLogger initializes the logger with appropriate configuration options
utils/log.go:15
↓ 1 callers
Method
loadOldOrders
loadOldOrders() loads old unfulfilled orders from database
matchingengine/MatchingEngine.go:92
↓ 1 callers
Function
makeOrderDepositTransactionRef
makeOrderDepositTransactionRef returns a reference of OrderDepositTransaction
models/OrderDepositTransaction.go:20
← previous
next →
201–300 of 739, ranked by callers