Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvApiKeyID = "APCA_API_KEY_ID" EnvApiSecretKey = "APCA_API_SECRET_KEY" EnvApiOAuth = "APCA_API_OAUTH" EnvPolygonKeyID = "POLY_API_KEY_ID" )
Variables ¶
View Source
var ( // DefaultClient is the default Alpaca client using the // environment variable set credentials DefaultClient = NewClient(Credentials()) )
Functions ¶
func SetBaseUrl ¶
func SetBaseUrl(baseUrl string)
Types ¶
type APIError ¶
APIError wraps the detailed code and message supplied by Alpaca's API for debugging purposes
type APIKey ¶
func Credentials ¶
func Credentials() *APIKey
Credentials returns the user's Alpaca API key ID and secret for use through the SDK.
type Bar ¶
type Bar struct { Open float64 `json:"o"` High float64 `json:"h"` Low float64 `json:"l"` Close float64 `json:"c"` Volume uint64 `json:"v"` Timestamp time.Time `json:"t"` }
Bar is an aggregate of trades
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an Alpaca REST API client
func (*Client) GetSnapshots ¶
GetSnapshots returns the snapshots for multiple symbol
func (*Client) ListAssets ¶
ListAssets returns the list of assets, filtered by the input parameters.
type Quote ¶
type Quote struct { BidExchange string `json:"bx"` BidPrice float64 `json:"bp"` BidSize uint32 `json:"bs"` AskExchange string `json:"ax"` AskPrice float64 `json:"ap"` AskSize uint32 `json:"as"` Timestamp time.Time `json:"t"` Conditions []string `json:"c"` Tape string `json:"z"` }
Quote is a stock quote from the market
Click to show internal directories.
Click to hide internal directories.