MCPcopy Create free account

hub / github.com/delta/dalal-street-server / functions

Functions739 in github.com/delta/dalal-street-server

↓ 3 callersMethodGetNotificationsStream
()
datastreams/Stream.go:32
↓ 3 callersFunctionGetStockCopy
(stockId uint32)
models/Stock.go:98
↓ 3 callersFunctionGetStocksOwned
(userId uint32)
models/User.go:2279
↓ 3 callersFunctionIsDailyChallengeOpen
IsDailyChallengeOpen returns dailychallenge status
models/Config.go:62
↓ 3 callersMethodLoadOldAsk
(*models.Ask)
matchingengine/OrderBook.go:23
↓ 3 callersMethodLoadOldBid
(*models.Bid)
matchingengine/OrderBook.go:24
↓ 3 callersFunctionPerformMortgageTransaction
PerformMortgageTransaction returns mortgage transaction and/or error
models/User.go:2184
↓ 3 callersFunctionRandString
RandString generates a random string which is n characters long
utils/utils.go:25
↓ 3 callersFunctionRegisterUser
RegisterUser is called when a user tries to sign up in our site
models/User.go:217
↓ 3 callersMethodRun
()
datastreams/StockPrices.go:15
↓ 3 callersFunctionSendEmail
(fromAddr, subject, toAddr, plainTextContent, htmlContent string)
utils/utils.go:100
↓ 3 callersMethodSendNotification
(n *models_pb.Notification)
datastreams/Notifications.go:15
↓ 3 callersMethodStartStockMatching
()
matchingengine/OrderBook.go:29
↓ 3 callersFunctionSubtractUserCash
SubtractUserCash subtracts cash for users account This function should be called ONLY AFTER lock is obtained on user
models/User.go:849
↓ 3 callersMethodToProto
()
models/Notification.go:21
↓ 3 callersMethodToProto
()
models/MarketEvent.go:27
↓ 3 callersMethodToProto
()
models/Ipo.go:29
↓ 3 callersMethodaddAskToDepth
addAskToDepth adds an ask to the depth NOTE: 1. Only adds unfulfilled qty 2. It uses ask.StockQuantityFulfilled which gets written to by fillOrderF
matchingengine/OrderBook.go:67
↓ 3 callersMethodaddBidToDepth
addBidToDepth adds a bid to the depth. NOTE: 1. Only adds unfulfilled qty 2. It uses bid.StockQuantityFulfilled which gets written to by fillOrderF
matchingengine/OrderBook.go:77
↓ 3 callersMethodexch
(i, j int)
matchingengine/pqueue.go:343
↓ 3 callersMethodexch
(i, j int)
matchingengine/pqueue.go:350
↓ 3 callersFunctiongetHKDFKey
Returns a key of length "length" given an hkdf function
models/PushNotification.go:340
↓ 3 callersFunctiongetSingleStockCount
getSingleStockCount() returns the stocks a user owns for a given stockId This method is *not* thread-safe. The caller is responsible for thread-safety
models/User.go:507
↓ 3 callersMethodgetTopMatchingBid
getTopMatchingBid checks for a matching bid from the orderbook for an incoming ask NOTE: 1. It does NOT remove the bid from the queue. 2. It does NOT
matchingengine/OrderBook.go:241
↓ 3 callersFunctiongetUserShortSellStocks
(stockId, userId uint32)
models/ShortSell.go:193
↓ 3 callersMethodless
(i, j int)
matchingengine/pqueue.go:310
↓ 3 callersMethodless
(i, j int)
matchingengine/pqueue.go:326
↓ 3 callersFunctionnewBidPQueueImpl
newBidPQueueImpl returns instances of bidPQueue meant for testing purposes
matchingengine/pqueue_test.go:38
↓ 3 callersFunctionpostLoginToPragyan
postLoginToPragyan() is used to make a post request to pragyan and return a pragyanUser struct.
models/User.go:420
↓ 2 callersFunctionAddMarketEvent
(stockId uint32, headline, text string, isGlobal bool, imageURL string)
models/MarketEvent.go:84
↓ 2 callersFunctionAllotSlots
(IpoStockId uint32)
models/Ipo.go:127
↓ 2 callersFunctionAllowIpoBidding
(IpoStockId uint32)
models/Ipo.go:80
↓ 2 callersFunctionCancelOrder
CancelOrder cancels a user's order. It'll check if the user was the one who placed it. It returns the pointer to Ask/Bid (whichever it was - the other
models/User.go:1395
↓ 2 callersFunctionDownloadImage
(imageURL string)
utils/utils.go:127
↓ 2 callersFunctionGetCashSpent
(userId uint32)
models/User.go:2365
↓ 2 callersFunctionGetCompanyDetails
(stockId uint32)
models/Stock.go:255
↓ 2 callersFunctionGetImageBasePath
()
utils/utils.go:88
↓ 2 callersFunctionGetMortgageDetails
GetMortgageDetails returns mortgage data about a user
models/MortgageDetail.go:17
↓ 2 callersFunctionGetMyOpenAsks
(userId uint32)
models/Ask.go:274
↓ 2 callersFunctionGetMyOpenBids
(userId uint32)
models/Bid.go:210
↓ 2 callersMethodGetStockHistoryStream
(stockId uint32)
datastreams/Stream.go:36
↓ 2 callersFunctionInit
Init configures and initializes the grpcapi package
grpcapi/grpcapi.go:195
↓ 2 callersFunctionInit
Init initializes and configures the datastreams module
datastreams/Stream.go:21
↓ 2 callersFunctionInit
Init initializes the session package
session/session.go:217
↓ 2 callersFunctionIsProdEnv
()
utils/utils.go:92
↓ 2 callersFunctionLoad
Load returns a session from database given the session id
session/session.go:42
↓ 2 callersMethodLoadOldTransactions
(txs []*models.Transaction)
matchingengine/OrderBook.go:22
↓ 2 callersMethodMakeGlobalBroadcast
(update interface{})
datastreams/MulticastStream.go:16
↓ 2 callersFunctionNewMockAskPQueue
NewMockAskPQueue creates a new mock instance
mocks/mock_pqueue.go:106
↓ 2 callersFunctionNewMockBidPQueue
NewMockBidPQueue creates a new mock instance
mocks/mock_pqueue.go:25
↓ 2 callersFunctionNewMockMarketDepthStream
NewMockMarketDepthStream creates a new mock instance
mocks/mock_MarketDepth.go:24
↓ 2 callersFunctionOrderTypeFromProto
(pOt models_pb.OrderType)
models/Ask.go:53
↓ 2 callersMethodPop
()
models/InspectComponents.go:26
↓ 2 callersMethodSendMarketEvent
(me *models_pb.MarketEvent)
datastreams/MarketEvents.go:13
↓ 2 callersFunctionSendNotification
(userId uint32, text string, isBroadcast bool)
models/Notification.go:65
↓ 2 callersMethodSendStockExchangeUpdate
(stockId uint32, dp *datastreams_pb.StockExchangeDataPoint)
datastreams/StockExchange.go:17
↓ 2 callersMethodSendStockPriceUpdate
(stockId uint32, price uint64)
datastreams/StockPrices.go:16
↓ 2 callersFunctionSetIsDailyChallengeOpen
SetIsDailyChallengeOpen update IsDailyChallengeOpen in db
models/Config.go:84
↓ 2 callersMethodStartStockMatching
** * StartStockMatching listens for incoming orders for a particular stock and process them. * NOTE: It will spawn a new go routine. It needn't be
matchingengine/OrderBook.go:220
↓ 2 callersMethodToProto
ToProto converts trade to its proto representation
datastreams/MarketDepth.go:34
↓ 2 callersMethodToProto
()
models/StockHistory.go:28
↓ 2 callersMethodTouch
()
session/session.go:26
↓ 2 callersFunctionallotIpoSlotToUser
(ipoBid *IpoBid, newStockId, SlotQuantity, StocksPerSlot uint32, cost int64, stockPrice uint64)
models/Ipo.go:285
↓ 2 callersFunctionauthFunc
(ctx context.Context)
grpcapi/grpcapi.go:38
↓ 2 callersFunctioncheckPasswordHash
(password, hash string)
models/User.go:319
↓ 2 callersFunctioncreateUser
createUser() creates a user given his email and name.
models/User.go:346
↓ 2 callersFunctiondecodeSubscriptionKey
decodeSubscriptionKey decodes a base64 subscription key. if necessary, add "=" padding to the key for URL decode
models/PushNotification.go:324
↓ 2 callersFunctiondecodeVapidKey
(key string)
models/PushNotification.go:436
↓ 2 callersFunctiongetMockAndTestObjects
(t *testing.T)
matchingengine/OrderBook_test.go:58
↓ 2 callersFunctiongetNumberOfUsers
Function to get number of users from db
models/InspectUserDegree.go:43
↓ 2 callersFunctiongetOrderFee
(quantity, price uint64)
models/User.go:341
↓ 2 callersFunctiongetOrderFeePrice
(price uint64, stockId uint32, o OrderType)
models/User.go:326
↓ 2 callersFunctiongetPlaceOrderTransactionDetails
getPlaceOrderTransactionDetails returns price and quantity at which PlaceOrderTransaction was created
models/OrderDepositTransaction.go:30
↓ 2 callersFunctiongetStocksInBank
(userID, stockID uint32, retrievePrice uint64, tx *gorm.DB)
models/MortgageDetail.go:130
↓ 2 callersFunctiongetTaxForBiddingUser
Helper to calculate tax for bidding user. It is assumed that an Exclusive Read and Write lock is already obtained for the user. DO NOT call this funct
models/User.go:1525
↓ 2 callersFunctiongetUserPairExclusive
(id1, id2 uint32)
models/User.go:743
↓ 2 callersFunctiongetVerificationKey
(email string)
models/User.go:311
↓ 2 callersFunctionhashPassword
(password string)
models/User.go:304
↓ 2 callersFunctionisOrderMatching
* * Helper function to check if a transaction is possible */
matchingengine/helpers.go:18
↓ 2 callersMethodprocessAsk
processAsk tries to match an incoming ask with existing bids and carry out a trade if possible. NOTE: 0. The ask shouldn't be a stoploss. It's either
matchingengine/OrderBook.go:310
↓ 2 callersMethodprocessBid
processBid tries to match an incoming bid with existing asks and carry out a trade if possible. NOTE: 0. The bid shouldn't be a stoploss. It's either
matchingengine/OrderBook.go:369
↓ 2 callersFunctionsaveBidCancelOrderTransaction
saveBidCancelOrderTransaction creates a CancelOrderTransaction for Ask orders and pushses to stream
models/User.go:1342
↓ 2 callersFunctionsavePlaceOrderTransaction
savePlaceOrderTransaction saves PlaceOrderTransaction and creates a mapping between orderId and
models/User.go:2399
↓ 2 callersFunctionsaveShortSellLendTransaction
updates available stocks for lend, saves shortsell transaction and creates shortsell lend later squareOff utility func, called inside placeAskOrder fu
models/ShortSell.go:56
↓ 2 callersFunctionstockHistoryStreamUpdate
(stockId uint32, stockHistory *StockHistory)
models/StockHistory.go:95
↓ 2 callersMethodtriggerStopLosses
* * Method to check and trigger(if possible) StopLoss orders whenever a transaction occurs */
matchingengine/OrderBook.go:516
↓ 2 callersFunctionupdateShortSellBank
update available stocks for shorting for a stock
models/ShortSell.go:76
↓ 1 callersMethodAddAskOrder
AddAskOrder adds a NEW ask order to the book. It will take care of adding stopLoss. It should NOT be passed partially filled orders
matchingengine/OrderBook.go:131
↓ 1 callersMethodAddAskOrder
(*models.Ask)
matchingengine/MatchingEngine.go:19
↓ 1 callersMethodAddBidOrder
AddBidOrder adds a NEW bid order to the book. It will take care of adding stopLoss. It should NOT be passed partially fulfilled orders
matchingengine/OrderBook.go:157
↓ 1 callersMethodAddBidOrder
(*models.Bid)
matchingengine/MatchingEngine.go:20
↓ 1 callersMethodAddListener
(done <-chan struct{}, updates chan interface{}, sessionId string)
datastreams/MarketDepth.go:18
↓ 1 callersMethodAddListener
(done <-chan struct{}, updates chan interface{}, sessionId string)
datastreams/StockHistory.go:13
↓ 1 callersMethodAddListener
(done <-chan struct{}, update chan interface{}, sessionId string)
datastreams/MarketEvents.go:14
↓ 1 callersMethodAddListener
(done <-chan struct{}, update chan interface{}, userId uint32, sessionId string)
datastreams/GameStateStream.go:16
↓ 1 callersMethodAddListener
(done <-chan struct{}, update chan interface{}, userId uint32, sessionId string)
datastreams/Notifications.go:16
↓ 1 callersMethodAddListener
(done <-chan struct{}, updates chan interface{}, sessionId string)
datastreams/StockExchange.go:18
↓ 1 callersMethodAddListener
(groupId uint32, sessionId string, lis *listener)
datastreams/MulticastStream.go:13
↓ 1 callersMethodAddListener
(done <-chan struct{}, updates chan interface{}, sessionId string)
datastreams/StockPrices.go:17
↓ 1 callersMethodAddListener
(done <-chan struct{}, updates chan interface{}, userId uint32, sessionId string)
datastreams/Transactions.go:14
← previousnext →101–200 of 739, ranked by callers