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
↓ 107 callers
Method
Delete
updates the LastAccessTime of the session
session/session.go:27
↓ 76 callers
Method
Value
()
models/Ask.go:33
↓ 66 callers
Method
Error
()
models/Ask.go:209
↓ 65 callers
Function
getInternalErrorMessage
(err error)
grpcapi/actionservice/DalalActionService.go:20
↓ 58 callers
Function
makeAsk
helper function to return an Ask object
matchingengine/pqueue_test.go:14
↓ 50 callers
Function
makeBid
helper function to return a Bid object
matchingengine/pqueue_test.go:26
↓ 46 callers
Function
getUserId
(ctx context.Context)
grpcapi/actionservice/DalalActionService.go:27
↓ 39 callers
Function
GetCurrentTimeISO8601
()
utils/utils.go:84
↓ 30 callers
Function
GetConfiguration
GetConfiguration returns the configuration loaded from config.json
utils/config.go:195
↓ 30 callers
Method
Scan
(value interface{})
models/Ask.go:17
↓ 29 callers
Function
Init
Init intializes the utils package. The config is accepted as a parameter for helping with testing.
utils/config.go:200
↓ 29 callers
Method
ToProto
()
models/Bid.go:32
↓ 26 callers
Function
isMarket
* * Helper function to check if it's a Market order */
matchingengine/helpers.go:11
↓ 25 callers
Function
GetTransactionRef
GetTransactionRef creates and returns a reference of a Transaction
models/Transaction.go:193
↓ 25 callers
Method
Push
(*models.Bid)
matchingengine/pqueue.go:15
↓ 25 callers
Function
getUserExclusively
Methods getUserExclusively() gets a user by his id. u method returns a channel and a pointer to the user object. The callee is guaranteed to get exc
models/User.go:679
↓ 22 callers
Function
CreateIpoBid
(UserId uint32, IpoStockId uint32, SlotQuantity uint32)
models/IpoBid.go:51
↓ 20 callers
Method
Head
()
matchingengine/pqueue.go:17
↓ 20 callers
Function
NewBidPQueue
NewBidPQueue creates a new priority queue with the ordering type specified by PQType and comprises of Bid items
matchingengine/pqueue.go:94
↓ 20 callers
Method
SendTransaction
(t *models_pb.Transaction)
datastreams/Transactions.go:13
↓ 19 callers
Method
Error
()
models/Ipo.go:47
↓ 19 callers
Function
LoadStocks
()
models/Stock.go:219
↓ 19 callers
Function
NewAskPQueue
NewAskPQueue creates a new priority queue with the ordering type specified by PQType and comprises of Ask items
matchingengine/pqueue.go:115
↓ 17 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
mocks/mock_Stream.go:32
↓ 16 callers
Function
GetManager
GetManager returns a singleton instance of Manager
datastreams/Stream.go:72
↓ 16 callers
Method
ToProto
()
models/User.go:78
↓ 15 callers
Method
Close
(tx *gorm.DB)
models/Bid.go:151
↓ 14 callers
Method
GetTransactionsStream
()
datastreams/Stream.go:35
↓ 13 callers
Function
GetDB
GetDB returns a database connection object by opening one based on the configuration
utils/Db.go:15
↓ 13 callers
Method
Pop
()
matchingengine/pqueue.go:16
↓ 13 callers
Function
getMockObjects
(t *testing.T)
matchingengine/OrderBook_test.go:16
↓ 12 callers
Method
GetGameStateStream
()
datastreams/Stream.go:37
↓ 12 callers
Function
UpdateStockPrice
(stockId uint32, price uint64, quantity uint64)
models/Stock.go:130
↓ 11 callers
Method
SendGameStateUpdate
(gs *models_pb.GameState)
datastreams/GameStateStream.go:15
↓ 11 callers
Function
getTaxPercent
Helper function to determine what percentage the user should be taxed
models/User.go:1506
↓ 10 callers
Method
AddListener
(done <-chan struct{}, update chan interface{}, userId uint32, sessionId string)
datastreams/MyOrders.go:13
↓ 10 callers
Method
AddOrder
(isMarket bool, isAsk bool, price uint64, stockQuantity uint64)
datastreams/MarketDepth.go:21
↓ 10 callers
Method
ToProto
()
models/GameState.go:87
↓ 10 callers
Method
removeSubscriptionFromMap
will be called whenever Unsubscribe is called, or when doneChan gets closed due to network error or something returns a subscription. It'll be nil in
grpcapi/streamservice/DalalStreamService.go:81
↓ 9 callers
Method
GetMarketDepthStream
(stockId uint32)
datastreams/Stream.go:29
↓ 9 callers
Function
Init
Init configures the models package
models/Db.go:19
↓ 9 callers
Method
Set
(string, string)
session/session.go:25
↓ 9 callers
Method
getSubscription
(req *datastreams_pb.SubscriptionId, dsType datastreams_pb.DataStreamType)
grpcapi/streamservice/DalalStreamService.go:149
↓ 9 callers
Method
size
()
matchingengine/pqueue.go:254
↓ 9 callers
Method
size
()
matchingengine/pqueue.go:258
↓ 8 callers
Method
CloseOrder
(isMarket bool, isAsk bool, price uint64, stockQuantity uint64)
datastreams/MarketDepth.go:23
↓ 8 callers
Function
PlaceAskOrder
PlaceAskOrder places an Ask order for the user. The method is thread-safe like other exported methods of this package. Possible outcomes: 1. Ask ge
models/User.go:896
↓ 8 callers
Function
SendPushNotification
SendPushNotification sends notification to the user
models/PushNotification.go:101
↓ 8 callers
Method
String
()
models/Ask.go:49
↓ 7 callers
Method
BroadcastUpdate
(update interface{})
datastreams/BroadcastStream.go:15
↓ 7 callers
Method
Error
()
models/User.go:624
↓ 7 callers
Method
Get
(string)
session/session.go:24
↓ 7 callers
Function
MinInt32
(a, b uint32)
utils/utils.go:43
↓ 6 callers
Method
AddAskOrder
(*models.Ask)
matchingengine/OrderBook.go:25
↓ 6 callers
Method
AddBidOrder
(*models.Bid)
matchingengine/OrderBook.go:26
↓ 6 callers
Method
GetListenersCount
()
datastreams/BroadcastStream.go:16
↓ 6 callers
Function
IsMarketOpen
()
models/MarketClose.go:68
↓ 6 callers
Function
IsUserBlocked
(userId uint32)
models/User.go:2448
↓ 6 callers
Function
IsUserPhoneVerified
(userId uint32)
models/User.go:2424
↓ 6 callers
Function
NewBroadcastStream
NewBroadcastStream creates a BroadcastStream
datastreams/BroadcastStream.go:32
↓ 6 callers
Function
PlaceBidOrder
PlaceBidOrder places a Bid order for the user. The method is thread-safe like other exported methods of this package. Possible outcomes: 1. Bid gets
models/User.go:1134
↓ 6 callers
Method
Size
()
matchingengine/pqueue.go:18
↓ 6 callers
Function
UpdateStockVolume
(stockId uint32, volume uint64)
models/Stock.go:213
↓ 5 callers
Method
CancelAskOrder
(*models.Ask)
matchingengine/OrderBook.go:27
↓ 5 callers
Method
CancelBidOrder
(*models.Bid)
matchingengine/OrderBook.go:28
↓ 5 callers
Function
Fake
()
session/fakeSession.go:15
↓ 5 callers
Function
GetMarketDay
GetMarketDay returns current marketday
models/Config.go:104
↓ 5 callers
Function
GetUserCopy
GetUserCopy gets a copy of user by his id. The method returns a channel and a copy of the user object. The callee is guaranteed to get read access to
models/User.go:798
↓ 5 callers
Method
LoadOldAsk
LoadOldAsk loads an old ask into the order book NOTE: 1. If it's a stoploss order it adds to the stoploss queue 2. Otherwise it adds it to the regu
matchingengine/OrderBook.go:92
↓ 5 callers
Method
LoadOldBid
LoadOldBid loads an old bid into the order book NOTE: 1. If it's a stoploss order it adds to the stoploss queue 2. Otherwise it adds it to the regu
matchingengine/OrderBook.go:112
↓ 5 callers
Function
getAvailableLendStocks
returns available stocks to lend for a stock
models/ShortSell.go:34
↓ 5 callers
Method
getTopMatchingAsk
getTopMatchingAsk returns a matching ask from the orderbook for an incoming bid NOTE: 1. It does NOT remove the ask from the queue 2. It does NOT upda
matchingengine/OrderBook.go:272
↓ 5 callers
Function
recordNMinuteOHLC
(db *gorm.DB, stockId uint32, retrievedHistories []StockHistory, N Resolution, recordingTime time.Time)
models/StockHistory.go:155
↓ 5 callers
Function
recordOneMinuteOHLC
recordOneMinuteOHLC records one minute ohlc for each stock
models/StockHistory.go:102
↓ 4 callers
Method
BroadcastUpdateToGroup
(groupId uint32, update interface{})
datastreams/MulticastStream.go:15
↓ 4 callers
Method
GetMyOrdersStream
()
datastreams/Stream.go:31
↓ 4 callers
Method
GetStockExchangeStream
()
datastreams/Stream.go:33
↓ 4 callers
Method
GetStockPricesStream
()
datastreams/Stream.go:34
↓ 4 callers
Function
IsStockBankrupt
(stockId uint32)
models/Stock.go:496
↓ 4 callers
Function
Login
Login() is used to login an existing user or register a new user Registration happens provided Pragyan API verifies the credentials and the user doesn
models/User.go:112
↓ 4 callers
Function
NewMulticastStream
NewMulticastStream creates a MulticastStream
datastreams/MulticastStream.go:32
↓ 4 callers
Method
Push
(v int32)
models/InspectComponents.go:22
↓ 4 callers
Function
RevertToOldState
RevertToOldState restores oldCash for all benefittingUsers in User Map
models/Dividends.go:133
↓ 4 callers
Method
SendOrder
(userId uint32, ou *datastreams_pb.MyOrderUpdate)
datastreams/MyOrders.go:12
↓ 4 callers
Method
ToProto
()
models/Transaction.go:95
↓ 4 callers
Method
TriggerStoploss
TriggerStoploss will set OrderType to StopLossActive if the ordertype is StopLoss Error is returned if that wasn't done successfully.
models/Bid.go:56
↓ 4 callers
Function
getMockMatchingEngine
(t *testing.T)
matchingengine/MatchingEngine_test.go:15
↓ 4 callers
Function
getUserId
(ctx context.Context)
grpcapi/streamservice/DalalStreamService.go:24
↓ 4 callers
Method
makeTrade
makeTrade performs a trade between two orders NOTE: 0. incoming-ness is only used to decide whether to update depth. Non-incomers update depth. 1.
matchingengine/OrderBook.go:455
↓ 4 callers
Function
newAskPQueueImpl
newAskPQueueImpl returns instances of askPQueue meant for testing purposes
matchingengine/pqueue_test.go:45
↓ 3 callers
Method
AddTrade
(price uint64, qty uint64, createdAt string)
datastreams/MarketDepth.go:22
↓ 3 callers
Function
CancelIpoBid
(IpoBidId uint32)
models/IpoBid.go:125
↓ 3 callers
Method
Error
()
models/IpoBid.go:47
↓ 3 callers
Function
GetDailyChallenges
GetDailyChallenges returns challenges as array for a given market day
models/DailyChallenge.go:108
↓ 3 callers
Method
GetID
()
session/session.go:23
↓ 3 callers
Function
GetImageBasename
(imageURL string)
utils/utils.go:158
↓ 3 callers
Function
GetMarketEvents
(lastId, count, stockId uint32)
models/MarketEvent.go:41
↓ 3 callers
Method
GetMarketEventsStream
()
datastreams/Stream.go:30
↓ 3 callers
Function
GetMyClosedAsks
(userId, lastId, count uint32)
models/Ask.go:294
↓ 3 callers
Function
GetMyClosedBids
(userId, lastId, count uint32)
models/Bid.go:230
next →
1–100 of 739, ranked by callers