Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/alpacahq/alpaca-trade-api-go
/ functions
Functions
1,367 in github.com/alpacahq/alpaca-trade-api-go
⨍
Functions
1,367
◇
Types & classes
263
↓ 633 callers
Method
String
()
marketdata/entities.go:124
↓ 142 callers
Method
Error
()
marketdata/stream/entities.go:222
↓ 102 callers
Method
MarshalJSON
MarshalJSON supports json.Marshaler interface
alpaca/entities_easyjson.go:3496
↓ 102 callers
Method
UnmarshalJSON
UnmarshalJSON supports json.Unmarshaler interface
alpaca/entities_easyjson.go:3508
↓ 73 callers
Function
serializeToMsgpack
(t *testing.T, v interface{})
marketdata/stream/flow_test.go:781
↓ 60 callers
Method
Error
()
alpaca/entities.go:379
↓ 56 callers
Method
MarshalEasyJSON
MarshalEasyJSON supports easyjson.Marshaler interface
marketdata/entities_easyjson.go:8054
↓ 56 callers
Method
UnmarshalEasyJSON
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
marketdata/entities_easyjson.go:8066
↓ 53 callers
Method
Errorf
(format string, v ...interface{})
marketdata/stream/log.go:11
↓ 44 callers
Method
close
close closes the websocket connection
marketdata/stream/conn.go:11
↓ 40 callers
Function
newMockConn
()
marketdata/stream/conn_test.go:25
↓ 36 callers
Method
handleSubChange
(subscribe bool, changes subscriptions)
marketdata/stream/subscription.go:260
↓ 33 callers
Function
withConnCreator
(connCreator func(ctx context.Context, u url.URL) (conn, error))
marketdata/stream/options.go:165
↓ 32 callers
Function
discardMapContents
(d *msgpack.Decoder, n int)
marketdata/stream/message.go:985
↓ 32 callers
Function
genBody
(data interface{})
alpaca/rest_test.go:1634
↓ 32 callers
Function
mockResp
(resp string)
marketdata/rest_test.go:107
↓ 31 callers
Function
closeResp
(resp *http.Response)
alpaca/rest.go:1438
↓ 29 callers
Function
unmarshal
(resp *http.Response, v easyjson.Unmarshaler)
alpaca/rest.go:1434
↓ 26 callers
Function
NewCryptoClient
NewCryptoClient returns a new CryptoClient that will connect to the crypto feed and whose default configurations are modified by opts.
marketdata/stream/client.go:179
↓ 25 callers
Method
get
(u *url.URL)
marketdata/rest.go:1828
↓ 25 callers
Function
unmarshal
(resp *http.Response, v easyjson.Unmarshaler)
marketdata/rest.go:1837
↓ 23 callers
Function
expectWrite
(t *testing.T, mockConn *mockConn)
marketdata/stream/flow_test.go:773
↓ 22 callers
Function
writeInitialFlowMessagesToConn
( t *testing.T, conn *mockConn, sub subscriptions, )
marketdata/stream/client_test.go:1535
↓ 21 callers
Method
get
(u *url.URL)
alpaca/rest.go:1366
↓ 20 callers
Method
MarshalJSON
MarshalJSON supports json.Marshaler interface
marketdata/stream/entities_easyjson.go:2352
↓ 20 callers
Function
NewStocksClient
NewStocksClient returns a new StocksClient that will connect to feed data feed and whose default configurations are modified by opts.
marketdata/stream/client.go:97
↓ 20 callers
Method
UnmarshalJSON
UnmarshalJSON supports json.Unmarshaler interface
marketdata/stream/entities_easyjson.go:2364
↓ 19 callers
Function
assertDecimalPtr
(t *testing.T, expected string, actual *decimal.Decimal)
alpaca/rest_test.go:1348
↓ 17 callers
Function
decodeStringSlice
(d *msgpack.Decoder)
marketdata/stream/message.go:1119
↓ 16 callers
Function
must
(err error)
examples/marketdata/marketdata.go:274
↓ 15 callers
Method
MarshalEasyJSON
MarshalEasyJSON supports easyjson.Marshaler interface
alpaca/entities_easyjson.go:3503
↓ 15 callers
Method
MarshalJSON
MarshalJSON supports json.Marshaler interface
marketdata/entities_easyjson.go:8047
↓ 15 callers
Function
NewClient
NewClient creates a new marketdata client using the given opts.
marketdata/rest.go:56
↓ 15 callers
Method
UnmarshalEasyJSON
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
alpaca/entities_easyjson.go:3515
↓ 15 callers
Method
UnmarshalJSON
UnmarshalJSON supports json.Unmarshaler interface
marketdata/entities_easyjson.go:8059
↓ 14 callers
Function
WithBaseURL
WithBaseURL configures the base URL
marketdata/stream/options.go:88
↓ 14 callers
Function
assertDatePtr
(t *testing.T, expected civil.Date, actual *civil.Date)
alpaca/rest_test.go:1341
↓ 13 callers
Function
mockErrResp
()
marketdata/rest_test.go:115
↓ 13 callers
Function
setQueryLimit
(q url.Values, totalLimit, pageLimit, received, maxLimit int)
marketdata/rest.go:184
↓ 12 callers
Method
Close
()
alpaca/rest_test.go:1632
↓ 12 callers
Method
GetLatestBar
GetLatestBar returns the latest minute bar for a given symbol
marketdata/rest.go:559
↓ 12 callers
Function
WithReconnectSettings
WithReconnectSettings configures how many consecutive connection errors should be accepted and the delay (that is multiplied by the number of consecut
marketdata/stream/options.go:110
↓ 12 callers
Function
checkInitialMessagesSentByClient
( t *testing.T, m *mockConn, key, secret string, sub subscriptions, )
marketdata/stream/client_test.go:1577
↓ 12 callers
Function
closeResp
(resp *http.Response)
marketdata/rest.go:1855
↓ 11 callers
Method
PlaceOrder
PlaceOrder submits an order request to buy or sell an asset.
alpaca/rest.go:575
↓ 11 callers
Method
Warnf
(format string, v ...interface{})
marketdata/stream/log.go:10
↓ 11 callers
Function
WithCredentials
WithCredentials configures the key and secret to use
marketdata/stream/options.go:95
↓ 10 callers
Function
NewClient
NewClient creates a new Alpaca trading client using the given opts.
alpaca/rest.go:44
↓ 10 callers
Function
newFuncOption
(f func(*options))
marketdata/stream/options.go:74
↓ 10 callers
Function
newFuncStockOption
(f func(*stockOptions))
marketdata/stream/options.go:244
↓ 9 callers
Method
CancelOrder
CancelOrder submits a request to cancel an open order.
alpaca/rest.go:668
↓ 9 callers
Method
Connect
(ctx context.Context)
marketdata/stream/client_test.go:33
↓ 9 callers
Method
Connect
Connect establishes a connection and **reestablishes it when errors occur** as long as the configured number of retries has not been exceeded. It blo
marketdata/stream/client.go:130
↓ 9 callers
Method
GetTrades
GetTrades returns the trades for the given symbol.
marketdata/rest.go:226
↓ 9 callers
Method
SubscribeToTrades
(handler func(Trade), symbols ...string)
marketdata/stream/subscription.go:14
↓ 9 callers
Method
submitOrder
Submit an order if quantity is above 0.
examples/long-short/long-short.go:412
↓ 8 callers
Method
Connect
Connect establishes a connection and **reestablishes it when errors occur** as long as the configured number of retries has not been exceeded. It blo
marketdata/stream/client.go:214
↓ 8 callers
Function
DefaultLogger
DefaultLogger returns a Logger that uses the standard go log package to print leveled logs to the standard error.
marketdata/stream/log.go:30
↓ 8 callers
Method
GetAccount
GetAccount returns the user's account information.
alpaca/rest.go:125
↓ 8 callers
Method
GetOrders
GetOrders returns the list of orders for an account.
alpaca/rest.go:492
↓ 8 callers
Method
setBaseQuery
(q url.Values, req baseRequest)
marketdata/rest.go:150
↓ 7 callers
Method
GetClock
GetClock returns the current market clock.
alpaca/rest.go:426
↓ 7 callers
Method
GetPositions
GetPositions returns the account's open positions.
alpaca/rest.go:291
↓ 7 callers
Function
NewTimeFrame
(n int, unit TimeFrameUnit)
marketdata/entities.go:117
↓ 7 callers
Method
Terminated
()
marketdata/stream/client_test.go:34
↓ 7 callers
Method
cryptoURL
(fromReq cryptoRequest)
marketdata/rest.go:1014
↓ 7 callers
Function
newFuncCryptoOption
(f func(*cryptoOptions))
marketdata/stream/options.go:396
↓ 6 callers
Method
GetOptionContracts
GetOptionContracts returns the list of Option Contracts.
alpaca/rest.go:796
↓ 6 callers
Method
Infof
(format string, v ...interface{})
marketdata/stream/log.go:9
↓ 6 callers
Method
SubscribeToTrades
(handler func(CryptoTrade), symbols ...string)
marketdata/stream/subscription.go:126
↓ 6 callers
Method
delete
(u *url.URL)
alpaca/rest.go:1417
↓ 6 callers
Method
initialize
initialize performs the initial flow: 1. wait to be welcomed 2. authenticates (and waits for the response) 3. subscribes (and waits for the response)
marketdata/stream/flow.go:24
↓ 6 callers
Method
setLatestQueryRequest
(u *url.URL, req baseLatestRequest)
marketdata/rest.go:534
↓ 5 callers
Method
GetAsset
GetAsset returns an asset for the given symbol.
alpaca/rest.go:735
↓ 5 callers
Method
GetBars
GetBars returns a slice of bars for the given symbol.
marketdata/rest.go:405
↓ 5 callers
Method
GetLatestCryptoBars
GetLatestCryptoBars returns the latest bars for the given crypto symbols
marketdata/rest.go:1078
↓ 5 callers
Method
GetSnapshots
GetSnapshots returns the snapshots for multiple symbol
marketdata/rest.go:697
↓ 5 callers
Function
WithTrades
WithTrades configures initial trade symbols to subscribe to and the handler
marketdata/stream/options.go:251
↓ 5 callers
Function
defaultDo
(c *Client, req *http.Request)
alpaca/rest.go:88
↓ 5 callers
Method
noSubscribeCallNecessary
()
marketdata/stream/subscription.go:252
↓ 5 callers
Method
setLatestCryptoQueryRequest
(u *url.URL, req cryptoBaseLatestRequest)
marketdata/rest.go:984
↓ 5 callers
Function
verify
(resp *http.Response)
alpaca/rest.go:1426
↓ 4 callers
Method
GetAccountActivities
GetAccountActivities returns the account activities.
alpaca/rest.go:204
↓ 4 callers
Method
GetFixedIncomeLatestPrice
GetFixedIncomeLatestPrice returns the latest price for a given fixed income security identified by ISIN
marketdata/rest.go:1586
↓ 4 callers
Method
GetFixedIncomeLatestPrices
GetFixedIncomeLatestPrices returns the latest prices for the given fixed income securities identified by ISINs
marketdata/rest.go:1599
↓ 4 callers
Method
GetLatestBars
GetLatestBars returns the latest minute bars for the given symbols
marketdata/rest.go:572
↓ 4 callers
Method
GetLatestCryptoQuotes
GetLatestCryptoQuotes returns the latest quotes for the given crypto symbols
marketdata/rest.go:1234
↓ 4 callers
Method
GetLatestCryptoTrades
GetLatestCryptoTrades returns the latest trades for the given crypto symbols
marketdata/rest.go:1155
↓ 4 callers
Method
GetLatestQuotes
GetLatestQuotes returns the latest quotes for the given symbols
marketdata/rest.go:658
↓ 4 callers
Method
GetLatestTrade
GetLatestTrade returns the latest trade for a given symbol
marketdata/rest.go:602
↓ 4 callers
Method
GetLatestTrades
GetLatestTrades returns the latest trades for the given symbols
marketdata/rest.go:615
↓ 4 callers
Method
GetMultiBars
GetMultiBars returns bars for the given symbols.
marketdata/rest.go:414
↓ 4 callers
Method
GetMultiQuotes
GetMultiQuotes returns quotes for the given symbols.
marketdata/rest.go:311
↓ 4 callers
Method
GetPosition
GetPosition returns the account's position for the provided symbol.
alpaca/rest.go:311
↓ 4 callers
Method
GetUSCorporates
GetUSCorporates returns the available US Corporate bonds.
alpaca/rest.go:1332
↓ 4 callers
Method
GetUSTreasuries
GetUSTreasuries returns the available US Treasury securities.
alpaca/rest.go:1290
↓ 4 callers
Method
SubscribeToQuotes
(handler func(CryptoQuote), symbols ...string)
marketdata/stream/subscription.go:133
↓ 4 callers
Function
WithBars
WithBars configures initial bar symbols to subscribe to and the handler
marketdata/stream/options.go:267
↓ 4 callers
Function
WithConnectCallback
WithConnectCallback runs the callback function after the streaming connection is setup. If the stream terminates and can't reconnect, the connect call
marketdata/stream/options.go:121
↓ 4 callers
Function
WithCryptoOrderbooks
WithCryptoOrderbooks configures initial orderbook symbols to subscribe to and the handler
marketdata/stream/options.go:451
next →
1–100 of 1,367, ranked by callers