Documentation
¶
Index ¶
- Variables
- type Account
- type AccountConfigurations
- type AccountStatus
- type ActivityType
- type AddAssetToWatchlistByNameRequest
- type AddAssetToWatchlistRequest
- type AdvancedInstructions
- type AssetClass
- type Assets
- type BondStatus
- type Calendar
- type CalendarDay
- type CallType
- type CanceledOrderResponse
- type CashDividend
- type CashMerger
- type Clock
- type ClockResp
- type ClockV3
- type CorporateActions
- type CorporateActionsResp
- type CouponFrequency
- type CouponType
- type CreateCryptoTransferRequest
- type CreateWhitelistedAddressRequest
- type CreateWhitelistedPerpAddressRequest
- type CryptoBar
- type CryptoBarsResp
- type CryptoHistoricalLoc
- type CryptoLatestBarsResp
- type CryptoLatestLoc
- type CryptoLatestOrderbooksResp
- type CryptoLatestQuotesResp
- type CryptoLatestTradesResp
- type CryptoOrderbook
- type CryptoOrderbookEntry
- type CryptoPerpFuturesPricing
- type CryptoPerpLatestFuturesPricingResp
- type CryptoPerpLoc
- type CryptoQuote
- type CryptoQuotesResp
- type CryptoSnapshot
- type CryptoSnapshotsResp
- type CryptoTrade
- type CryptoTradesResp
- type CryptoTransfer
- type CryptoTransferStatus
- type CryptoWallet
- type DayCount
- type Error
- type Exchange
- type ExchangeForPosition
- type FixedIncomeLatestPricesResp
- type FixedIncomePrice
- type FlagDef
- type ForexLatestRatesResp
- type ForexRate
- type ForexRatesResp
- type ForwardSplit
- type LegacyCalendarDay
- type LegacyClock
- type MLegOrderLeg
- type Market
- type MarketDataClient
- func (c *MarketDataClient) CorporateActions(params url.Values) (*CorporateActionsResp, error)
- func (c *MarketDataClient) CryptoBars(Loc string, params url.Values) (*CryptoBarsResp, error)
- func (c *MarketDataClient) CryptoLatestBars(Loc string, params url.Values) (*CryptoLatestBarsResp, error)
- func (c *MarketDataClient) CryptoLatestOrderbooks(Loc string, params url.Values) (*CryptoLatestOrderbooksResp, error)
- func (c *MarketDataClient) CryptoLatestQuotes(Loc string, params url.Values) (*CryptoLatestQuotesResp, error)
- func (c *MarketDataClient) CryptoLatestTrades(Loc string, params url.Values) (*CryptoLatestTradesResp, error)
- func (c *MarketDataClient) CryptoPerpLatestBars(Loc string, params url.Values) (*CryptoLatestBarsResp, error)
- func (c *MarketDataClient) CryptoPerpLatestFuturesPricing(Loc string, params url.Values) (*CryptoPerpLatestFuturesPricingResp, error)
- func (c *MarketDataClient) CryptoPerpLatestOrderbooks(Loc string, params url.Values) (*CryptoLatestOrderbooksResp, error)
- func (c *MarketDataClient) CryptoPerpLatestQuotes(Loc string, params url.Values) (*CryptoLatestQuotesResp, error)
- func (c *MarketDataClient) CryptoPerpLatestTrades(Loc string, params url.Values) (*CryptoLatestTradesResp, error)
- func (c *MarketDataClient) CryptoQuotes(Loc string, params url.Values) (*CryptoQuotesResp, error)
- func (c *MarketDataClient) CryptoSnapshots(Loc string, params url.Values) (*CryptoSnapshotsResp, error)
- func (c *MarketDataClient) CryptoTrades(Loc string, params url.Values) (*CryptoTradesResp, error)
- func (c *MarketDataClient) FixedIncomeLatestPrices(params url.Values) (*FixedIncomeLatestPricesResp, error)
- func (c *MarketDataClient) LatestRates(params url.Values) (*ForexLatestRatesResp, error)
- func (c *MarketDataClient) Logos(Symbol string, params url.Values) (json.RawMessage, error)
- func (c *MarketDataClient) MostActives(params url.Values) (*MostActivesResp, error)
- func (c *MarketDataClient) Movers(MarketType string, params url.Values) (*MoversResp, error)
- func (c *MarketDataClient) News(params url.Values) (*NewsResp, error)
- func (c *MarketDataClient) OptionBars(params url.Values) (*OptionBarsResp, error)
- func (c *MarketDataClient) OptionChain(UnderlyingSymbol string, params url.Values) (*OptionSnapshotsResp, error)
- func (c *MarketDataClient) OptionLatestQuotes(params url.Values) (*OptionLatestQuotesResp, error)
- func (c *MarketDataClient) OptionLatestTrades(params url.Values) (*OptionLatestTradesResp, error)
- func (c *MarketDataClient) OptionMetaConditions(Ticktype string) (json.RawMessage, error)
- func (c *MarketDataClient) OptionMetaExchanges() (json.RawMessage, error)
- func (c *MarketDataClient) OptionSnapshots(params url.Values) (*OptionSnapshotsResp, error)
- func (c *MarketDataClient) OptionTrades(params url.Values) (*OptionTradesResp, error)
- func (c *MarketDataClient) Rates(params url.Values) (*ForexRatesResp, error)
- func (c *MarketDataClient) StockAuctionSingle(Symbol string, params url.Values) (*StockAuctionsRespSingle, error)
- func (c *MarketDataClient) StockAuctions(params url.Values) (*StockAuctionsResp, error)
- func (c *MarketDataClient) StockBarSingle(Symbol string, params url.Values) (*StockBarsRespSingle, error)
- func (c *MarketDataClient) StockBars(params url.Values) (*StockBarsResp, error)
- func (c *MarketDataClient) StockLatestBarSingle(Symbol string, params url.Values) (*StockLatestBarsRespSingle, error)
- func (c *MarketDataClient) StockLatestBars(params url.Values) (*StockLatestBarsResp, error)
- func (c *MarketDataClient) StockLatestQuoteSingle(Symbol string, params url.Values) (*StockLatestQuotesRespSingle, error)
- func (c *MarketDataClient) StockLatestQuotes(params url.Values) (*StockLatestQuotesResp, error)
- func (c *MarketDataClient) StockLatestTradeSingle(Symbol string, params url.Values) (*StockLatestTradesRespSingle, error)
- func (c *MarketDataClient) StockLatestTrades(params url.Values) (*StockLatestTradesResp, error)
- func (c *MarketDataClient) StockMetaConditions(Ticktype string, params url.Values) (json.RawMessage, error)
- func (c *MarketDataClient) StockMetaExchanges() (json.RawMessage, error)
- func (c *MarketDataClient) StockQuoteSingle(Symbol string, params url.Values) (*StockQuotesRespSingle, error)
- func (c *MarketDataClient) StockQuotes(params url.Values) (*StockQuotesResp, error)
- func (c *MarketDataClient) StockSnapshotSingle(Symbol string, params url.Values) (json.RawMessage, error)
- func (c *MarketDataClient) StockSnapshots(params url.Values) (json.RawMessage, error)
- func (c *MarketDataClient) StockTradeSingle(Symbol string, params url.Values) (*StockTradesRespSingle, error)
- func (c *MarketDataClient) StockTrades(params url.Values) (*StockTradesResp, error)
- type MarketType
- type MostActive
- type MostActivesResp
- type Mover
- type MoversResp
- type NameChange
- type News
- type NewsImage
- type NewsResp
- type NonTradeActivities
- type Op
- type OptionBar
- type OptionBarsResp
- type OptionContract
- type OptionDeliverable
- type OptionFeed
- type OptionGreeks
- type OptionLatestQuotesResp
- type OptionLatestTradesResp
- type OptionQuote
- type OptionSnapshot
- type OptionSnapshotsResp
- type OptionTrade
- type OptionTradesResp
- type Order
- type OrderClass
- type OrderLeg
- type OrderSide
- type OrderStatus
- type OrderType
- type PatchOrderRequest
- type Phase
- type PortfolioHistory
- type Position
- type PositionClosedReponse
- type PositionIntent
- type PostOrderRequest
- type PublicCalendarResp
- type PublicMarket
- type Redemption
- type ResponseField
- type ReverseSplit
- type RightsDistribution
- type Sort
- type SpOutlook
- type SpinOff
- type StockAndCashMerger
- type StockAuction
- type StockAuctionsResp
- type StockAuctionsRespSingle
- type StockBar
- type StockBarsResp
- type StockBarsRespSingle
- type StockDailyAuctions
- type StockDividend
- type StockHistoricalFeed
- type StockLatestBarsResp
- type StockLatestBarsRespSingle
- type StockLatestFeed
- type StockLatestQuotesResp
- type StockLatestQuotesRespSingle
- type StockLatestTradesResp
- type StockLatestTradesRespSingle
- type StockMerger
- type StockQuote
- type StockQuotesResp
- type StockQuotesRespSingle
- type StockSnapshot
- type StockTape
- type StockTrade
- type StockTradesResp
- type StockTradesRespSingle
- type TimeInForce
- type TradingActivities
- type TradingClient
- func (c *TradingClient) AddAssetToWatchlist(WatchlistID string, body *AddAssetToWatchlistRequest) (*Watchlist, error)
- func (c *TradingClient) AddAssetToWatchlistByName(params url.Values, body *AddAssetToWatchlistByNameRequest) (*Watchlist, error)
- func (c *TradingClient) Calendar(Market string, params url.Values) (*PublicCalendarResp, error)
- func (c *TradingClient) Clock(params url.Values) (*ClockResp, error)
- func (c *TradingClient) CreateCryptoPerpTransferForAccount(body *CreateCryptoTransferRequest) (*CryptoTransfer, error)
- func (c *TradingClient) CreateCryptoTransferForAccount(body *CreateCryptoTransferRequest) (*CryptoTransfer, error)
- func (c *TradingClient) CreateWhitelistedAddress(body *CreateWhitelistedAddressRequest) (*WhitelistedAddress, error)
- func (c *TradingClient) CreateWhitelistedPerpAddress(body *CreateWhitelistedPerpAddressRequest) (*WhitelistedAddress, error)
- func (c *TradingClient) DeleteAllOpenPositions(params url.Values) ([]PositionClosedReponse, error)
- func (c *TradingClient) DeleteAllOrders() ([]CanceledOrderResponse, error)
- func (c *TradingClient) DeleteOpenPosition(SymbolOrAssetID string, params url.Values) (*Order, error)
- func (c *TradingClient) DeleteOrderByOrderID(OrderID string) (json.RawMessage, error)
- func (c *TradingClient) DeleteWatchlistByID(WatchlistID string) (json.RawMessage, error)
- func (c *TradingClient) DeleteWatchlistByName(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) DeleteWhitelistedAddress(WhitelistedAddressID string) (json.RawMessage, error)
- func (c *TradingClient) DeleteWhitelistedPerpAddress(WhitelistedAddressID string) (json.RawMessage, error)
- func (c *TradingClient) GetAccount() (*Account, error)
- func (c *TradingClient) GetAccountActivities(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetAccountActivitiesByActivityType(ActivityType string, params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetAccountConfig() (*AccountConfigurations, error)
- func (c *TradingClient) GetAccountPortfolioHistory(params url.Values) (*PortfolioHistory, error)
- func (c *TradingClient) GetAllOpenPositions() ([]Position, error)
- func (c *TradingClient) GetAllOrders(params url.Values) ([]Order, error)
- func (c *TradingClient) GetCryptoFundingTransfer(TransferID string) (*CryptoTransfer, error)
- func (c *TradingClient) GetCryptoPerpAccountLeverage(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetCryptoPerpAccountVitals() (json.RawMessage, error)
- func (c *TradingClient) GetCryptoPerpFundingTransfer(TransferID string) (*CryptoTransfer, error)
- func (c *TradingClient) GetCryptoPerpTransferEstimate(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetCryptoTransferEstimate(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetOpenPosition(SymbolOrAssetID string) (*Position, error)
- func (c *TradingClient) GetOptionContractSymbolOrID(SymbolOrID string) (*OptionContract, error)
- func (c *TradingClient) GetOptionsContracts(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetOrderByClientOrderID(params url.Values) (*Order, error)
- func (c *TradingClient) GetOrderByOrderID(OrderID string, params url.Values) (*Order, error)
- func (c *TradingClient) GetV2Assets(params url.Values) ([]Assets, error)
- func (c *TradingClient) GetV2AssetsSymbolOrAssetID(SymbolOrAssetID string) (*Assets, error)
- func (c *TradingClient) GetV2CorporateActionsAnnouncements(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) GetV2CorporateActionsAnnouncementsID(ID string) (json.RawMessage, error)
- func (c *TradingClient) GetWatchlistByID(WatchlistID string) (*Watchlist, error)
- func (c *TradingClient) GetWatchlistByName(params url.Values) (*Watchlist, error)
- func (c *TradingClient) GetWatchlists() ([]WatchlistWithoutAsset, error)
- func (c *TradingClient) LegacyCalendar(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) LegacyClock() (*LegacyClock, error)
- func (c *TradingClient) ListCryptoFundingTransfers() (*CryptoTransfer, error)
- func (c *TradingClient) ListCryptoFundingWallets(params url.Values) (*CryptoWallet, error)
- func (c *TradingClient) ListCryptoPerpFundingTransfers() (*CryptoTransfer, error)
- func (c *TradingClient) ListCryptoPerpFundingWallets(params url.Values) (*CryptoWallet, error)
- func (c *TradingClient) ListWhitelistedAddress() (*WhitelistedAddress, error)
- func (c *TradingClient) ListWhitelistedPerpAddress() (*WhitelistedAddress, error)
- func (c *TradingClient) OptionDoNotExercise(SymbolOrContractID string) (json.RawMessage, error)
- func (c *TradingClient) OptionExercise(SymbolOrContractID string) (json.RawMessage, error)
- func (c *TradingClient) PatchAccountConfig(body *AccountConfigurations) (*AccountConfigurations, error)
- func (c *TradingClient) PatchOrderByOrderID(OrderID string, body *PatchOrderRequest) (*Order, error)
- func (c *TradingClient) PostOrder(body *PostOrderRequest) (*Order, error)
- func (c *TradingClient) PostWatchlist(body *UpdateWatchlistRequest) (*Watchlist, error)
- func (c *TradingClient) RemoveAssetFromWatchlist(WatchlistID string, Symbol string) (*Watchlist, error)
- func (c *TradingClient) SetCryptoPerpAccountLeverage(params url.Values) (json.RawMessage, error)
- func (c *TradingClient) UpdateWatchlistByID(WatchlistID string, body *UpdateWatchlistRequest) (*Watchlist, error)
- func (c *TradingClient) UpdateWatchlistByName(params url.Values, body *UpdateWatchlistRequest) (*Watchlist, error)
- func (c *TradingClient) UsCorporates(params url.Values) (*UsCorporatesResp, error)
- func (c *TradingClient) UsTreasuries(params url.Values) (*UsTreasuriesResp, error)
- type TransferDirection
- type TreasurySubtype
- type UnitSplit
- type UpdateWatchlistRequest
- type UsCorporate
- type UsCorporatesResp
- type UsTreasuriesResp
- type UsTreasury
- type Watchlist
- type WatchlistWithoutAsset
- type WhitelistedAddress
- type WorthlessRemoval
Constants ¶
This section is empty.
Variables ¶
var AddAssetToWatchlistByNameOp = Op{ Name: "AddAssetToWatchlistByName", Summary: "Add asset to watchlist by name", Example: ` alpaca watchlist add-by-name --name "Tech Stocks" --symbol NVDA`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "name of the watchlist", Required: true, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "the symbol name to add to the watchlist", Source: "body"}, }, }
var AddAssetToWatchlistOp = Op{ Name: "AddAssetToWatchlist", Summary: "Add asset to watchlist", Example: ` alpaca watchlist add --watchlist-id <id> --symbol AAPL`, Flags: []FlagDef{ {Name: "symbol", OASName: "symbol", Type: "string", Description: "the symbol name to add to the watchlist", Source: "body"}, {Name: "watchlist-id", OASName: "watchlist_id", Type: "string", Description: "watchlist id", Required: true, Source: "path"}, }, }
var AllOps = []Op{}/* 108 elements not displayed */
AllOps lists every generated Op for iteration in tests and tooling.
var CalendarOp = Op{ Name: "Calendar", Summary: "Get market calendar", Example: ` alpaca calendar market --market XNYS --start 2025-01-01`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "last date to retrieve data for (inclusive). Default: one week from the start date", Source: "query"}, {Name: "market", OASName: "market", Type: "string", Description: "market identifier (MIC, BIC, or acronym)", Required: true, Source: "path"}, {Name: "start", OASName: "start", Type: "string", Description: "first date to retrieve data for (inclusive). Default: today", Source: "query"}, {Name: "timezone", OASName: "timezone", Type: "string", Description: "timezone of the times. Default: the timezone of the market", Completions: []string{"UTC"}, Source: "query"}, }, }
var ClockOp = Op{ Name: "Clock", Summary: "Get market clock", Example: ` alpaca clock markets --markets XNYS,XNAS`, Flags: []FlagDef{ {Name: "markets", OASName: "markets", Type: "string", Description: "comma-separated list of markets", Source: "query"}, {Name: "time", OASName: "time", Type: "string", Description: "instead of the current time, use this time for the clock", Source: "query"}, }, }
var CorporateActionsOp = Op{ Name: "CorporateActions", Summary: "Get corporate actions", Example: ` alpaca data corporate-actions --symbols AAPL --types forward_split --start 2025-01-01`, Flags: []FlagDef{ {Name: "cusips", OASName: "cusips", Type: "string", Description: "A comma-separated list of CUSIPs", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "ids", OASName: "ids", Type: "string", Description: "A comma-separated list of corporate action IDs", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "100", Description: "maximum number of corporate actions to return in a response.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of symbols", Source: "query"}, {Name: "types", OASName: "types", Type: "string", Description: "A comma-separated list of types", Source: "query"}, }, }
var CreateCryptoPerpTransferForAccountOp = Op{ Name: "CreateCryptoPerpTransferForAccount", Summary: "Request a new withdrawal", Example: ` alpaca crypto-perp wallet transfer create --amount 0.5 --address 0xabc... --asset BTC`, Flags: []FlagDef{ {Name: "address", OASName: "address", Type: "string", Description: "destination wallet address", Source: "body"}, {Name: "amount", OASName: "amount", Type: "string", Description: "amount, denoted in the specified asset, to be withdrawn from the user’s wallet", Source: "body"}, {Name: "asset", OASName: "asset", Type: "string", Description: "crypto asset symbol, e.g. BTC, ETH, USDT", Source: "body"}, }, }
var CreateCryptoTransferForAccountOp = Op{ Name: "CreateCryptoTransferForAccount", Summary: "Request a new withdrawal", Example: ` alpaca wallet transfer create --amount 0.5 --address 0xabc... --asset BTC`, Flags: []FlagDef{ {Name: "address", OASName: "address", Type: "string", Description: "destination wallet address", Source: "body"}, {Name: "amount", OASName: "amount", Type: "string", Description: "amount, denoted in the specified asset, to be withdrawn from the user’s wallet", Source: "body"}, {Name: "asset", OASName: "asset", Type: "string", Description: "crypto asset symbol, e.g. BTC, ETH, USDT", Source: "body"}, }, }
var CreateWhitelistedAddressOp = Op{ Name: "CreateWhitelistedAddress", Summary: "Request a new whitelisted address", Example: ` alpaca wallet whitelist add --address 0xabc... --asset ETH`, Flags: []FlagDef{ {Name: "address", OASName: "address", Type: "string", Description: "address to be whitelisted", Source: "body"}, {Name: "asset", OASName: "asset", Type: "string", Description: "symbol of underlying asset for the whitelisted address", Source: "body"}, }, }
var CreateWhitelistedPerpAddressOp = Op{ Name: "CreateWhitelistedPerpAddress", Summary: "Request a new whitelisted address", Example: ` alpaca crypto-perp wallet whitelist add --address 0xabc... --asset ETH`, Flags: []FlagDef{ {Name: "address", OASName: "address", Type: "string", Description: "address to be whitelisted", Source: "body"}, {Name: "asset", OASName: "asset", Type: "string", Description: "symbol of underlying asset for the whitelisted address", Source: "body"}, }, }
var CryptoBarsOp = Op{ Name: "CryptoBars", Summary: "Get historical bars", Example: ` alpaca data crypto bars --symbols BTC/USD --start 2025-01-01 --timeframe 1Day`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the historical market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Description: "timeframe represented by each bar in aggregation.\nYou can use any of the following values:\n - [1-59]Min or [1-59]T, e.g", Required: true, Source: "query"}, }, }
var CryptoLatestBarsOp = Op{ Name: "CryptoLatestBars", Summary: "Get latest bars", Example: ` alpaca data crypto latest-bars --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the latest market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoLatestOrderbooksOp = Op{ Name: "CryptoLatestOrderbooks", Summary: "Get latest orderbook", Example: ` alpaca data crypto-orderbook --symbols BTC/USD,ETH/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the latest market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoLatestQuotesOp = Op{ Name: "CryptoLatestQuotes", Summary: "Get latest quotes", Example: ` alpaca data crypto latest-quotes --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the latest market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoLatestTradesOp = Op{ Name: "CryptoLatestTrades", Summary: "Get latest trades", Example: ` alpaca data crypto latest-trades --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the latest market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoPerpLatestBarsOp = Op{ Name: "CryptoPerpLatestBars", Summary: "Get latest bars", Example: ` alpaca crypto-perp data latest-bars --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto perpetual location", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoPerpLatestFuturesPricingOp = Op{ Name: "CryptoPerpLatestFuturesPricing", Summary: "Get latest pricing", Example: ` alpaca crypto-perp data latest-futures-pricing --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto perpetual location", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoPerpLatestOrderbooksOp = Op{ Name: "CryptoPerpLatestOrderbooks", Summary: "Get latest orderbook", Example: ` alpaca crypto-perp data latest-orderbooks --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto perpetual location", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoPerpLatestQuotesOp = Op{ Name: "CryptoPerpLatestQuotes", Summary: "Get latest quotes", Example: ` alpaca crypto-perp data latest-quotes --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto perpetual location", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoPerpLatestTradesOp = Op{ Name: "CryptoPerpLatestTrades", Summary: "Get latest trades", Example: ` alpaca crypto-perp data latest-trades --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto perpetual location", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoQuotesOp = Op{ Name: "CryptoQuotes", Summary: "Get historical quotes", Example: ` alpaca data crypto quotes --symbols BTC/USD --start 2025-01-01`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the historical market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoSnapshotsOp = Op{ Name: "CryptoSnapshots", Summary: "Get snapshots", Example: ` alpaca data crypto snapshots --symbols BTC/USD`, Flags: []FlagDef{ {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the latest market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var CryptoTradesOp = Op{ Name: "CryptoTrades", Summary: "Get historical trades", Example: ` alpaca data crypto trades --symbols BTC/USD --start 2025-01-01`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "loc", OASName: "loc", Type: "string", Default: "us", Description: "crypto location from where the historical market data is retrieved.\n- us: Alpaca US\n- us-1: Kraken US\n- eu-1: Kraken EU", Required: true, Source: "path"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of crypto symbols", Required: true, Source: "query"}, }, }
var DeleteAllOpenPositionsOp = Op{ Name: "DeleteAllOpenPositions", Summary: "Close all positions", ReturnsArray: true, Example: ` alpaca position close-all`, Flags: []FlagDef{ {Name: "cancel-orders", OASName: "cancel_orders", Type: "bool", Description: "if true is specified, cancel all open orders before liquidating all positions", Source: "query"}, }, }
var DeleteAllOrdersOp = Op{ Name: "DeleteAllOrders", Summary: "Delete all orders", ReturnsArray: true, Example: ` alpaca order cancel-all`, }
var DeleteOpenPositionOp = Op{ Name: "DeleteOpenPosition", Summary: "Close a position", Example: ` alpaca position close --symbol-or-asset-id AAPL alpaca position close --symbol-or-asset-id AAPL --qty 5 alpaca position close --symbol-or-asset-id AAPL --percentage 50`, Flags: []FlagDef{ {Name: "percentage", OASName: "percentage", Type: "string", Description: "percentage of position to liquidate", Source: "query"}, {Name: "qty", OASName: "qty", Type: "string", Description: "the number of shares to liquidate. Can accept up to 9 decimal points. Cannot work with percentage", Source: "query"}, {Name: "symbol-or-asset-id", OASName: "symbol_or_asset_id", Type: "string", Description: "symbol or assetId", Required: true, Source: "path"}, }, }
var DeleteOrderByOrderIDOp = Op{ Name: "DeleteOrderByOrderID", Summary: "Delete order by ID", Example: ` alpaca order cancel --order-id <id>`, Flags: []FlagDef{ {Name: "order-id", OASName: "order_id", Type: "string", Description: "order id", Required: true, Source: "path"}, }, }
var DeleteWatchlistByIDOp = Op{ Name: "DeleteWatchlistByID", Summary: "Delete watchlist by id", Example: ` alpaca watchlist delete --watchlist-id <id>`, Flags: []FlagDef{ {Name: "watchlist-id", OASName: "watchlist_id", Type: "string", Description: "watchlist id", Required: true, Source: "path"}, }, }
var DeleteWatchlistByNameOp = Op{ Name: "DeleteWatchlistByName", Summary: "Delete watchlist by name", Example: ` alpaca watchlist delete-by-name --name "Tech Stocks"`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "name of the watchlist", Required: true, Source: "query"}, }, }
var DeleteWhitelistedAddressOp = Op{ Name: "DeleteWhitelistedAddress", Summary: "Delete a whitelisted address", Example: ` alpaca wallet whitelist delete --whitelisted-address-id <id>`, Flags: []FlagDef{ {Name: "whitelisted-address-id", OASName: "whitelisted_address_id", Type: "string", Description: "whitelisted address to delete", Required: true, Source: "path"}, }, }
var DeleteWhitelistedPerpAddressOp = Op{ Name: "DeleteWhitelistedPerpAddress", Summary: "Delete a whitelisted address", Example: ` alpaca crypto-perp wallet whitelist delete --whitelisted-address-id <id>`, Flags: []FlagDef{ {Name: "whitelisted-address-id", OASName: "whitelisted_address_id", Type: "string", Description: "whitelisted address to delete", Required: true, Source: "path"}, }, }
var FixedIncomeLatestPricesOp = Op{ Name: "FixedIncomeLatestPrices", Summary: "Get latest prices", Example: ` alpaca data fixed-income --isins 912797KR1,912797LB5`, Flags: []FlagDef{ {Name: "isins", OASName: "isins", Type: "string", Description: "A comma-separated list of ISINs with a limit of 1000", Required: true, Source: "query"}, }, }
var GetAccountActivitiesByActivityTypeOp = Op{ Name: "GetAccountActivitiesByActivityType", Summary: "Retrieve account activities of specific type", Example: ` alpaca account activity list-by-type --activity-type FILL --page-size 20 alpaca account activity list-by-type --activity-type DIV --after 2025-01-01`, Flags: []FlagDef{ {Name: "activity-type", OASName: "activity_type", Type: "string", Description: "activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page", Required: true, Source: "path"}, {Name: "after", OASName: "after", Type: "string", Description: "get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, {Name: "date", OASName: "date", Type: "string", Description: "filter activities by the activity date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, {Name: "direction", OASName: "direction", Type: "string", Default: "desc", Description: "chronological order of response based on the activity datetime", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "page-size", OASName: "page_size", Type: "int", Default: "100", Description: "maximum number of entries to return in the response", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results", Source: "query"}, {Name: "until", OASName: "until", Type: "string", Description: "get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, }, }
var GetAccountActivitiesOp = Op{ Name: "GetAccountActivities", Summary: "Retrieve account activities", Example: ` alpaca account activity list alpaca account activity list --activity-types FILL,TRANS --page-size 20 alpaca account activity list --direction desc`, Flags: []FlagDef{ {Name: "activity-types", OASName: "activity_types", Type: "string", Description: "A comma-separated list of activity types used to filter the results", Source: "query"}, {Name: "after", OASName: "after", Type: "string", Description: "get activities created after this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, {Name: "category", OASName: "category", Type: "string", Description: "activity category. Cannot be used with \"activity_types\" parameter", Completions: []string{"non_trade_activity", "trade_activity"}, Source: "query"}, {Name: "date", OASName: "date", Type: "string", Description: "filter activities by the activity date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, {Name: "direction", OASName: "direction", Type: "string", Default: "desc", Description: "chronological order of response based on the activity datetime", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "page-size", OASName: "page_size", Type: "int", Default: "100", Description: "maximum number of entries to return in the response", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "token used for pagination. Provide the ID of the last activity from the last page to retrieve the next set of results", Source: "query"}, {Name: "until", OASName: "until", Type: "string", Description: "get activities created before this date. Both formats YYYY-MM-DD and YYYY-MM-DDTHH:MM:SSZ are supported", Source: "query"}, }, }
var GetAccountConfigOp = Op{
Name: "GetAccountConfig", Summary: "Get account configurations",
Example: ` alpaca account config get`,
}
var GetAccountOp = Op{
Name: "GetAccount", Summary: "Get account",
Example: ` alpaca account get`,
}
var GetAccountPortfolioHistoryOp = Op{ Name: "GetAccountPortfolioHistory", Summary: "Get account portfolio history", Long: "Returns portfolio equity and P&L history. Use --jq to flatten for CSV.", Example: ` alpaca account portfolio alpaca account portfolio --period 1M --timeframe 1D`, Flags: []FlagDef{ {Name: "cashflow-types", OASName: "cashflow_types", Type: "string", Description: "cashflow activities to include in the report. One of 'ALL', 'NONE', or a comma-separated list of activity types", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "timestamp the data is returned up to in RFC3339 format (including timezone specification)", Source: "query"}, {Name: "extended-hours", OASName: "extended_hours", Type: "string", Description: "**deprecated**: Users are strongly advised to **rely on the intraday_reporting query parameter** for better control\no...", Source: "query"}, {Name: "intraday-reporting", OASName: "intraday_reporting", Type: "string", Default: "market_hours", Description: "for intraday resolutions (<1D) this specifies which timestamps to return data points for:\n\nAllowed values are:\n- **ma...", Completions: []string{"continuous", "extended_hours", "market_hours"}, Source: "query"}, {Name: "period", OASName: "period", Type: "string", Description: "duration of the data in number + unit format, such as 1D, where unit can be D for day, W for week, M for month and A ...", Source: "query"}, {Name: "pnl-reset", OASName: "pnl_reset", Type: "string", Default: "per_day", Description: "pnl_reset defines how we are calculating the baseline values for Profit And Loss (pnl) for queries with timeframe les...", Completions: []string{"no_reset", "per_day"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "timestamp the data is returned starting from in RFC3339 format (including timezone specification)", Source: "query"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Description: "resolution of time window", Source: "query"}, }, }
var GetAllOpenPositionsOp = Op{ Name: "GetAllOpenPositions", Summary: "List all open positions", ReturnsArray: true, Example: ` alpaca position list alpaca position list --csv`, }
var GetAllOrdersOp = Op{ Name: "GetAllOrders", Summary: "Get all orders", ReturnsArray: true, Example: ` alpaca order list alpaca order list --status closed --limit 20 alpaca order list --symbols AAPL,MSFT --after 2025-01-01`, Flags: []FlagDef{ {Name: "after", OASName: "after", Type: "string", Description: "response will include only ones submitted after this timestamp (exclusive.)", Source: "query"}, {Name: "after-order-id", OASName: "after_order_id", Type: "string", Description: "return orders submitted after the order with this ID (exclusive).\nMutually exclusive with before_order_id", Source: "query"}, {Name: "asset-class", OASName: "asset_class", Type: "string", Description: "A comma-separated list of asset classes, the response will include only orders in the specified asset classes", Source: "query"}, {Name: "before-order-id", OASName: "before_order_id", Type: "string", Description: "return orders submitted before the order with this ID (exclusive).\nMutually exclusive with after_order_id", Source: "query"}, {Name: "direction", OASName: "direction", Type: "string", Description: "chronological order of response based on the submission time. asc or desc. Defaults to desc", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Description: "maximum number of orders in response. Defaults to 50 and max is 500", Source: "query"}, {Name: "nested", OASName: "nested", Type: "bool", Description: "if true, the result will roll up multi-leg orders under the legs field of primary order", Source: "query"}, {Name: "side", OASName: "side", Type: "string", Description: "filters down to orders that have a matching side field set", Source: "query"}, {Name: "status", OASName: "status", Type: "string", Default: "open", Description: "order status to be queried. open, closed or all. Defaults to open", Completions: []string{"all", "closed", "open"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of symbols to filter by (ex", Source: "query"}, {Name: "until", OASName: "until", Type: "string", Description: "response will include only ones submitted until this timestamp (exclusive.)", Source: "query"}, }, }
var GetCryptoFundingTransferOp = Op{ Name: "GetCryptoFundingTransfer", Summary: "Retrieve a crypto funding transfer", Example: ` alpaca wallet transfer get --transfer-id <id>`, Flags: []FlagDef{ {Name: "transfer-id", OASName: "transfer_id", Type: "string", Description: "crypto transfer to retrieve", Required: true, Source: "path"}, }, }
var GetCryptoPerpAccountLeverageOp = Op{ Name: "GetCryptoPerpAccountLeverage", Summary: "Get account leverage for an asset", Example: ` alpaca crypto-perp leverage`, Flags: []FlagDef{ {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol of underlying asset", Source: "query"}, }, }
var GetCryptoPerpAccountVitalsOp = Op{
Name: "GetCryptoPerpAccountVitals", Summary: "Retrieve account vitals",
Example: ` alpaca crypto-perp vitals`,
}
var GetCryptoPerpFundingTransferOp = Op{ Name: "GetCryptoPerpFundingTransfer", Summary: "Retrieve a crypto funding transfer", Example: ` alpaca crypto-perp wallet transfer get --transfer-id <id>`, Flags: []FlagDef{ {Name: "transfer-id", OASName: "transfer_id", Type: "string", Description: "crypto transfer to retrieve", Required: true, Source: "path"}, }, }
var GetCryptoPerpTransferEstimateOp = Op{ Name: "GetCryptoPerpTransferEstimate", Summary: "Returns the estimated gas fee for a proposed transaction", Example: ` alpaca crypto-perp wallet transfer estimate --asset BTC --amount 0.5`, Flags: []FlagDef{ {Name: "amount", OASName: "amount", Type: "string", Description: "amount, denoted in the specified asset, of the proposed transaction", Source: "query"}, {Name: "asset", OASName: "asset", Type: "string", Description: "asset for the proposed transaction", Source: "query"}, {Name: "from-address", OASName: "from_address", Type: "string", Description: "originating address of the proposed transaction", Source: "query"}, {Name: "to-address", OASName: "to_address", Type: "string", Description: "destination address of the proposed transaction", Source: "query"}, }, }
var GetCryptoTransferEstimateOp = Op{ Name: "GetCryptoTransferEstimate", Summary: "Returns the estimated gas fee for a proposed transaction", Example: ` alpaca wallet transfer estimate --asset BTC --amount 0.5 \ --from-address 0xabc... --to-address 0xdef...`, Flags: []FlagDef{ {Name: "amount", OASName: "amount", Type: "string", Description: "amount, denoted in the specified asset, of the proposed transaction", Source: "query"}, {Name: "asset", OASName: "asset", Type: "string", Description: "asset for the proposed transaction", Source: "query"}, {Name: "from-address", OASName: "from_address", Type: "string", Description: "originating address of the proposed transaction", Source: "query"}, {Name: "to-address", OASName: "to_address", Type: "string", Description: "destination address of the proposed transaction", Source: "query"}, }, }
var GetOpenPositionOp = Op{ Name: "GetOpenPosition", Summary: "Get an open position", Example: ` alpaca position get --symbol-or-asset-id AAPL alpaca position get --symbol-or-asset-id BTC/USD`, Flags: []FlagDef{ {Name: "symbol-or-asset-id", OASName: "symbol_or_asset_id", Type: "string", Description: "symbol or assetId", Required: true, Source: "path"}, }, }
var GetOptionContractSymbolOrIDOp = Op{ Name: "GetOptionContractSymbolOrID", Summary: "Get an option contract by ID or symbol", Example: ` alpaca option get --symbol-or-id AAPL250620C00200000`, Flags: []FlagDef{ {Name: "symbol-or-id", OASName: "symbol_or_id", Type: "string", Description: "symbol or contract ID", Required: true, Source: "path"}, }, }
var GetOptionsContractsOp = Op{ Name: "GetOptionsContracts", Summary: "Get option contracts", Long: "List option contracts for an underlying symbol. For market data (greeks, pricing), use `data option chain`.", Example: ` alpaca option contracts --underlying-symbols AAPL alpaca option contracts --underlying-symbols AAPL --expiration-date 2025-06-20 --type call alpaca option contracts --underlying-symbols SPY --strike-price-gte 400 --strike-price-lte 450`, Flags: []FlagDef{ {Name: "expiration-date", OASName: "expiration_date", Type: "string", Description: "filter contracts by the exact expiration date (format: YYYY-MM-DD)", Source: "query"}, {Name: "expiration-date-gte", OASName: "expiration_date_gte", Type: "string", Description: "filter contracts with expiration date greater than or equal to the specified date", Source: "query"}, {Name: "expiration-date-lte", OASName: "expiration_date_lte", Type: "string", Description: "filter contracts with expiration date less than or equal to the specified date", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Description: "number of contracts to limit per page (default=100, max=10000)", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "used for pagination, this token retrieves the next page of results", Source: "query"}, {Name: "ppind", OASName: "ppind", Type: "bool", Description: "ppind(Penny Program Indicator) field indicates whether an option contract is eligible for penny price increments,", Source: "query"}, {Name: "root-symbol", OASName: "root_symbol", Type: "string", Description: "filter contracts by the root symbol", Source: "query"}, {Name: "show-deliverables", OASName: "show_deliverables", Type: "bool", Description: "include deliverables array in the response", Source: "query"}, {Name: "status", OASName: "status", Type: "string", Description: "filter contracts by status (active/inactive). By default only active contracts are returned", Completions: []string{"active", "inactive"}, Source: "query"}, {Name: "strike-price-gte", OASName: "strike_price_gte", Type: "string", Description: "filter contracts with strike price greater than or equal to the specified value", Source: "query"}, {Name: "strike-price-lte", OASName: "strike_price_lte", Type: "string", Description: "filter contracts with strike price less than or equal to the specified value", Source: "query"}, {Name: "style", OASName: "style", Type: "string", Description: "filter contracts by the style (american/european)", Completions: []string{"american", "european"}, Source: "query"}, {Name: "type", OASName: "type", Type: "string", Description: "filter contracts by the type (call/put)", Completions: []string{"call", "put"}, Source: "query"}, {Name: "underlying-symbols", OASName: "underlying_symbols", Type: "string", Description: "filter contracts by one or more underlying symbols", Source: "query"}, }, }
var GetOrderByClientOrderIDOp = Op{ Name: "GetOrderByClientOrderID", Summary: "Get order by client order ID", Example: ` alpaca order get-by-client-id --client-order-id my-order-123`, Flags: []FlagDef{ {Name: "client-order-id", OASName: "client_order_id", Type: "string", Description: "client-assigned order ID", Required: true, Source: "query"}, }, }
var GetOrderByOrderIDOp = Op{ Name: "GetOrderByOrderID", Summary: "Get order by ID", Example: ` alpaca order get --order-id 61e69015-8549-4baf-b96f-9c4f3e8d0c35`, Flags: []FlagDef{ {Name: "nested", OASName: "nested", Type: "bool", Description: "if true, the result will roll up multi-leg orders under the legs field of primary order", Source: "query"}, {Name: "order-id", OASName: "order_id", Type: "string", Description: "order id", Required: true, Source: "path"}, }, }
var GetV2AssetsOp = Op{ Name: "GetV2Assets", Summary: "Get assets", ReturnsArray: true, Example: ` alpaca asset list alpaca asset list --asset-class us_equity --status active alpaca asset list --exchange NYSE`, Flags: []FlagDef{ {Name: "asset-class", OASName: "asset_class", Type: "string", Description: "defaults to us_equity", Source: "query"}, {Name: "attributes", OASName: "attributes", Type: "string", Description: "comma separated values to query for more than one attribute", Source: "query"}, {Name: "exchange", OASName: "exchange", Type: "string", Description: "optional AMEX, ARCA, BATS, NYSE, NASDAQ, NYSEARCA or OTC", Source: "query"}, {Name: "status", OASName: "status", Type: "string", Description: "e.g. “active”. By default, all statuses are included", Source: "query"}, }, }
var GetV2AssetsSymbolOrAssetIDOp = Op{ Name: "GetV2AssetsSymbolOrAssetID", Summary: "Get an asset by ID or symbol", Example: ` alpaca asset get --symbol-or-asset-id AAPL alpaca asset get --symbol-or-asset-id BTC/USD`, Flags: []FlagDef{ {Name: "symbol-or-asset-id", OASName: "symbol_or_asset_id", Type: "string", Description: "symbol or assetId. CUSIP is also accepted for US equities", Required: true, Source: "path"}, }, }
var GetV2CorporateActionsAnnouncementsIDOp = Op{ Name: "GetV2CorporateActionsAnnouncementsID", Summary: "Retrieve a specific announcement", Example: ` alpaca corporate-action get --id <announcement-id>`, Flags: []FlagDef{ {Name: "id", OASName: "id", Type: "string", Description: "corporate announcement’s id", Required: true, Source: "path"}, }, }
var GetV2CorporateActionsAnnouncementsOp = Op{ Name: "GetV2CorporateActionsAnnouncements", Summary: "Retrieve announcements", Example: ` alpaca corporate-action list --ca-types reverse_split --since 2025-01-01 --until 2025-12-31 alpaca corporate-action list --ca-types cash_dividend --symbol AAPL --since 2025-01-01 --until 2025-06-30`, Flags: []FlagDef{ {Name: "ca-types", OASName: "ca_types", Type: "string", Description: "A comma-delimited list of Dividend, Merger, Spinoff, or Split", Required: true, Source: "query"}, {Name: "cusip", OASName: "cusip", Type: "string", Description: "CUSIP of the company initiating the announcement", Source: "query"}, {Name: "date-type", OASName: "date_type", Type: "string", Description: "declaration_date, ex_date, record_date, or payable_date", Source: "query"}, {Name: "since", OASName: "since", Type: "string", Description: "start (inclusive) of the date range when searching corporate action announcements", Required: true, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol of the company initiating the announcement", Source: "query"}, {Name: "until", OASName: "until", Type: "string", Description: "end (inclusive) of the date range when searching corporate action announcements", Required: true, Source: "query"}, }, }
var GetWatchlistByIDOp = Op{ Name: "GetWatchlistByID", Summary: "Get watchlist by ID", Example: ` alpaca watchlist get --watchlist-id <id>`, Flags: []FlagDef{ {Name: "watchlist-id", OASName: "watchlist_id", Type: "string", Description: "watchlist id", Required: true, Source: "path"}, }, }
var GetWatchlistByNameOp = Op{ Name: "GetWatchlistByName", Summary: "Get watchlist by name", Example: ` alpaca watchlist get-by-name --name "Tech Stocks"`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "name of the watchlist", Required: true, Source: "query"}, }, }
var GetWatchlistsOp = Op{ Name: "GetWatchlists", Summary: "Get all watchlists", ReturnsArray: true, Example: ` alpaca watchlist list`, }
var LatestRatesOp = Op{ Name: "LatestRates", Summary: "Get latest rates for currency pairs", Example: ` alpaca data forex latest --currency-pairs EUR/USD,GBP/USD`, Flags: []FlagDef{ {Name: "currency-pairs", OASName: "currency_pairs", Type: "string", Description: "A comma-separated string with currency pairs", Required: true, Source: "query"}, }, }
var LegacyCalendarOp = Op{ Name: "LegacyCalendar", Summary: "Get US market calendar", Example: ` alpaca calendar alpaca calendar --start 2025-01-01 --end 2025-12-31`, Flags: []FlagDef{ {Name: "date-type", OASName: "date_type", Type: "string", Description: "indicates what start and end mean", Completions: []string{"SETTLEMENT", "TRADING"}, Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "last date to retrieve data for (inclusive)", Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "first date to retrieve data for (inclusive)", Source: "query"}, }, }
var LegacyClockOp = Op{
Name: "LegacyClock", Summary: "Get US market clock",
Example: ` alpaca clock`,
}
var ListCryptoFundingTransfersOp = Op{
Name: "ListCryptoFundingTransfers", Summary: "Retrieve crypto funding transfers",
Example: ` alpaca wallet transfer list`,
}
var ListCryptoFundingWalletsOp = Op{ Name: "ListCryptoFundingWallets", Summary: "Retrieve crypto funding wallets", Example: ` alpaca wallet list`, Flags: []FlagDef{ {Name: "asset", OASName: "asset", Type: "string", Description: "filter by crypto asset symbol, e.g. BTC, ETH, USDT. If specified and no wallet exists, one will be created", Source: "query"}, {Name: "network", OASName: "network", Type: "string", Description: "optional network identifier", Completions: []string{"ethereum", "solana"}, Source: "query"}, }, }
var ListCryptoPerpFundingTransfersOp = Op{
Name: "ListCryptoPerpFundingTransfers", Summary: "Retrieve crypto funding transfers",
Example: ` alpaca crypto-perp wallet transfer list`,
}
var ListCryptoPerpFundingWalletsOp = Op{ Name: "ListCryptoPerpFundingWallets", Summary: "Retrieve crypto funding wallets", Example: ` alpaca crypto-perp wallet list`, Flags: []FlagDef{ {Name: "asset", OASName: "asset", Type: "string", Description: "asset", Source: "query"}, }, }
var ListWhitelistedAddressOp = Op{
Name: "ListWhitelistedAddress", Summary: "Get an array of whitelisted addresses",
Example: ` alpaca wallet whitelist list`,
}
var ListWhitelistedPerpAddressOp = Op{
Name: "ListWhitelistedPerpAddress", Summary: "Get an array of whitelisted addresses",
Example: ` alpaca crypto-perp wallet whitelist list`,
}
var LogosOp = Op{ Name: "Logos", Summary: "Get logos", Example: ` alpaca data logo --symbol AAPL`, Flags: []FlagDef{ {Name: "placeholder", OASName: "placeholder", Type: "bool", Default: "true", Description: "if true, returns a placeholder image when no logo is available. Defaults to true", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "A unique series of letters assigned to a security for trading purposes", Required: true, Source: "path"}, }, }
var MostActivesOp = Op{ Name: "MostActives", Summary: "Get most active stocks", Example: ` alpaca data screener most-actives alpaca data screener most-actives --by trades --top 10`, Flags: []FlagDef{ {Name: "by", OASName: "by", Type: "string", Default: "volume", Description: "metric used for ranking the most active stocks", Completions: []string{"trades", "volume"}, Source: "query"}, {Name: "top", OASName: "top", Type: "int", Default: "10", Description: "number of top most active stocks to fetch per day", Source: "query"}, }, }
var MoversOp = Op{ Name: "Movers", Summary: "Get top market movers", Example: ` alpaca data screener movers alpaca data screener movers --market-type crypto --top 5`, Flags: []FlagDef{ {Name: "market-type", OASName: "market_type", Type: "string", Default: "stocks", Description: "screen-specific market (stocks or crypto)", Required: true, Source: "path"}, {Name: "top", OASName: "top", Type: "int", Default: "10", Description: "number of top market movers to fetch (gainers and losers)", Source: "query"}, }, }
var NewsOp = Op{ Name: "News", Summary: "Get news articles", Example: ` alpaca data news alpaca data news --symbols AAPL,MSFT --limit 10`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "exclude-contentless", OASName: "exclude_contentless", Type: "bool", Description: "boolean indicator to exclude news articles that do not contain content", Source: "query"}, {Name: "include-content", OASName: "include_content", Type: "bool", Description: "boolean indicator to include content for news articles (if available)", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Description: "limit of news items to be returned for a result page", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "desc", Description: "sort articles by updated date", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of symbols for which to query news", Source: "query"}, }, }
var OptionBarsOp = Op{ Name: "OptionBars", Summary: "Get historical bars", Example: ` alpaca data option bars --symbols AAPL250620C00200000 --start 2025-01-01 alpaca data option bars --symbols AAPL250620C00200000,AAPL250620P00200000 --timeframe 1Day`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of contract symbols with a limit of 100", Required: true, Source: "query"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Description: "timeframe represented by each bar in aggregation.\nYou can use any of the following values:\n - [1-59]Min or [1-59]T, e.g", Required: true, Source: "query"}, }, }
var OptionChainOp = Op{ Name: "OptionChain", Summary: "Get option chain", Example: ` alpaca data option chain --underlying-symbol AAPL alpaca data option chain --underlying-symbol SPY --expiration-date 2025-06-20 --type call`, Flags: []FlagDef{ {Name: "expiration-date", OASName: "expiration_date", Type: "string", Description: "filter contracts by the exact expiration date (format: YYYY-MM-DD)", Source: "query"}, {Name: "expiration-date-gte", OASName: "expiration_date_gte", Type: "string", Description: "filter contracts with expiration date greater than or equal to the specified date", Source: "query"}, {Name: "expiration-date-lte", OASName: "expiration_date_lte", Type: "string", Description: "filter contracts with expiration date less than or equal to the specified date", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "opra", Description: "source feed of the data", Completions: []string{"indicative", "opra"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "100", Description: "number of maximum snapshots to return in a response.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "root-symbol", OASName: "root_symbol", Type: "string", Description: "filter contracts by the root symbol", Source: "query"}, {Name: "strike-price-gte", OASName: "strike_price_gte", Type: "string", Description: "filter contracts with strike price greater than or equal to the specified value", Source: "query"}, {Name: "strike-price-lte", OASName: "strike_price_lte", Type: "string", Description: "filter contracts with strike price less than or equal to the specified value", Source: "query"}, {Name: "type", OASName: "type", Type: "string", Description: "filter contracts by the type (call or put)", Completions: []string{"call", "put"}, Source: "query"}, {Name: "underlying-symbol", OASName: "underlying_symbol", Type: "string", Description: "financial instrument on which an option contract is based or derived", Required: true, Source: "path"}, {Name: "updated-since", OASName: "updated_since", Type: "string", Description: "filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is g...", Source: "query"}, }, }
var OptionDoNotExerciseOp = Op{ Name: "OptionDoNotExercise", Summary: "Do not exercise an options position", Example: ` alpaca option do-not-exercise --symbol-or-contract-id AAPL250620C00200000`, Flags: []FlagDef{ {Name: "symbol-or-contract-id", OASName: "symbol_or_contract_id", Type: "string", Description: "option contract symbol or ID", Required: true, Source: "path"}, }, }
var OptionExerciseOp = Op{ Name: "OptionExercise", Summary: "Exercise an options position", Example: ` alpaca option exercise --symbol-or-contract-id AAPL250620C00200000`, Flags: []FlagDef{ {Name: "symbol-or-contract-id", OASName: "symbol_or_contract_id", Type: "string", Description: "option contract symbol or ID", Required: true, Source: "path"}, }, }
var OptionLatestQuotesOp = Op{ Name: "OptionLatestQuotes", Summary: "Get latest quotes", Example: ` alpaca data option latest-quotes --symbols AAPL250620C00200000`, Flags: []FlagDef{ {Name: "feed", OASName: "feed", Type: "string", Default: "opra", Description: "source feed of the data", Completions: []string{"indicative", "opra"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of contract symbols with a limit of 100", Required: true, Source: "query"}, }, }
var OptionLatestTradesOp = Op{ Name: "OptionLatestTrades", Summary: "Get latest trades", Example: ` alpaca data option latest-trades --symbols AAPL250620C00200000`, Flags: []FlagDef{ {Name: "feed", OASName: "feed", Type: "string", Default: "opra", Description: "source feed of the data", Completions: []string{"indicative", "opra"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of contract symbols with a limit of 100", Required: true, Source: "query"}, }, }
var OptionMetaConditionsOp = Op{ Name: "OptionMetaConditions", Summary: "Get condition codes", Example: ` alpaca data option conditions --ticktype trade`, Flags: []FlagDef{ {Name: "ticktype", OASName: "ticktype", Type: "string", Description: "type of ticks", Required: true, Source: "path"}, }, }
var OptionMetaExchangesOp = Op{
Name: "OptionMetaExchanges", Summary: "Get exchange codes",
Example: ` alpaca data option exchanges`,
}
var OptionSnapshotsOp = Op{ Name: "OptionSnapshots", Summary: "Get snapshots", Example: ` alpaca data option snapshot --symbols AAPL250620C00200000 alpaca data option snapshot --symbols AAPL250620C00200000,AAPL250620P00200000`, Flags: []FlagDef{ {Name: "feed", OASName: "feed", Type: "string", Default: "opra", Description: "source feed of the data", Completions: []string{"indicative", "opra"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "100", Description: "number of maximum snapshots to return in a response.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of contract symbols with a limit of 100", Required: true, Source: "query"}, {Name: "updated-since", OASName: "updated_since", Type: "string", Description: "filter to snapshots that were updated since this timestamp, meaning that the timestamp of the trade or the quote is g...", Source: "query"}, }, }
var OptionTradesOp = Op{ Name: "OptionTrades", Summary: "Get historical trades", Example: ` alpaca data option trades --symbols AAPL250620C00200000 --start 2025-01-01`, Flags: []FlagDef{ {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of contract symbols with a limit of 100", Required: true, Source: "query"}, }, }
var PatchAccountConfigOp = Op{ Name: "PatchAccountConfig", Summary: "Update account configurations", Example: ` alpaca account config set --no-shorting true alpaca account config set --dtbp-check entry`, Flags: []FlagDef{ {Name: "disable-overnight-trading", OASName: "disable_overnight_trading", Type: "bool", Description: "if true, overnight trading is disabled", Source: "body"}, {Name: "dtbp-check", OASName: "dtbp_check", Type: "string", Description: "both, entry, or exit. Controls Day Trading Margin Call (DTMC) checks", Completions: []string{"both", "entry", "exit"}, Source: "body"}, {Name: "fractional-trading", OASName: "fractional_trading", Type: "bool", Description: "if true, account is able to participate in fractional trading", Source: "body"}, {Name: "max-margin-multiplier", OASName: "max_margin_multiplier", Type: "string", Description: "can be \"1\", \"2\", or \"4\"", Source: "body"}, {Name: "max-options-trading-level", OASName: "max_options_trading_level", Type: "int", Description: "desired maximum options trading level. 0=disabled, 1=Covered Call/Cash-Secured Put, 2=Long Call/Put, 3=Spreads/Straddles", Completions: []string{"0", "1", "2", "3"}, Source: "body"}, {Name: "no-shorting", OASName: "no_shorting", Type: "bool", Description: "if true, account becomes long-only mode", Source: "body"}, {Name: "pdt-check", OASName: "pdt_check", Type: "string", Description: "both, entry, or exit", Source: "body"}, {Name: "ptp-no-exception-entry", OASName: "ptp_no_exception_entry", Type: "bool", Description: "if set to true then Alpaca will accept orders for PTP symbols with no exception. Default is false", Source: "body"}, {Name: "suspend-trade", OASName: "suspend_trade", Type: "bool", Description: "if true, new orders are blocked", Source: "body"}, {Name: "trade-confirm-email", OASName: "trade_confirm_email", Type: "string", Description: "all or none. If none, emails for order fills are not sent", Source: "body"}, }, }
var PatchOrderByOrderIDOp = Op{ Name: "PatchOrderByOrderID", Summary: "Replace order by ID", Example: ` alpaca order replace --order-id <id> --qty 20 --limit-price 190.00`, Flags: []FlagDef{ {Name: "advanced-instructions", OASName: "advanced_instructions", Type: "string", Description: "advanced instructions for Elite Smart Router: https://docs.alpaca.markets/docs/alpaca-elite-smart-router", Source: "body"}, {Name: "client-order-id", OASName: "client_order_id", Type: "string", Description: "A unique identifier for the new order. Automatically generated if not sent. (<= 128 characters)", Source: "body"}, {Name: "limit-price", OASName: "limit_price", Type: "string", Description: "required if original order's type field was limit or stop_limit.", Source: "body"}, {Name: "order-id", OASName: "order_id", Type: "string", Description: "order id", Required: true, Source: "path"}, {Name: "qty", OASName: "qty", Type: "string", Description: "number of shares to trade.", Source: "body"}, {Name: "stop-price", OASName: "stop_price", Type: "string", Description: "required if original order type is limit or stop_limit", Source: "body"}, {Name: "time-in-force", OASName: "time_in_force", Type: "string", Description: "time-In-Force values supported by Alpaca vary based on the order's security type", Completions: []string{"cls", "day", "fok", "gtc", "ioc", "opg"}, Source: "body"}, {Name: "trail", OASName: "trail", Type: "string", Description: "the new value of the trail_price or trail_percent value (works only for type=“trailing_stop”)", Source: "body"}, }, }
var PostOrderOp = Op{ Name: "PostOrder", Summary: "Create an order", Flags: []FlagDef{ {Name: "advanced-instructions", OASName: "advanced_instructions", Type: "string", Description: "advanced instructions for Elite Smart Router: https://docs.alpaca.markets/docs/alpaca-elite-smart-router", Source: "body"}, {Name: "client-order-id", OASName: "client_order_id", Type: "string", Description: "A unique identifier for the order. Automatically generated if not sent. (<= 128 characters)", Source: "body"}, {Name: "extended-hours", OASName: "extended_hours", Type: "bool", Description: "(default) false", Source: "body"}, {Name: "legs", OASName: "legs", Type: "string", Description: "list of order legs (<= 4)", Source: "body"}, {Name: "limit-price", OASName: "limit_price", Type: "string", Description: "required if type is limit or stop_limit.", Source: "body"}, {Name: "notional", OASName: "notional", Type: "string", Description: "dollar amount to trade. Cannot work with qty. Can only work for market order types and day for time in force", Source: "body"}, {Name: "order-class", OASName: "order_class", Type: "string", Description: "order classes supported by Alpaca vary based on the order's security type", Completions: []string{"bracket", "mleg", "oco", "oto", "simple"}, Source: "body"}, {Name: "position-intent", OASName: "position_intent", Type: "string", Description: "represents the desired position strategy", Completions: []string{"buy_to_close", "buy_to_open", "sell_to_close", "sell_to_open"}, Source: "body"}, {Name: "qty", OASName: "qty", Type: "string", Description: "number of shares to trade", Source: "body"}, {Name: "side", OASName: "side", Type: "string", Description: "represents which side this order was on:\n- buy\n- sell\nRequired for all order classes except for mleg", Completions: []string{"buy", "sell"}, Source: "body"}, {Name: "stop-loss", OASName: "stop_loss", Type: "string", Description: "takes in string/number values for stop_price and limit_price", Source: "body"}, {Name: "stop-price", OASName: "stop_price", Type: "string", Description: "required if type is stop or stop_limit", Source: "body"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol, asset ID, or currency pair to identify the asset to trade, required for all order classes except for mleg", Source: "body"}, {Name: "take-profit", OASName: "take_profit", Type: "string", Description: "takes in a string/number value for limit_price", Source: "body"}, {Name: "time-in-force", OASName: "time_in_force", Type: "string", Description: "time-In-Force values supported by Alpaca vary based on the order's security type", Completions: []string{"cls", "day", "fok", "gtc", "ioc", "opg"}, Source: "body"}, {Name: "trail-percent", OASName: "trail_percent", Type: "string", Description: "this or trail_price is required if type is trailing_stop", Source: "body"}, {Name: "trail-price", OASName: "trail_price", Type: "string", Description: "this or trail_percent is required if type is trailing_stop", Source: "body"}, {Name: "type", OASName: "type", Type: "string", Description: "order types supported by Alpaca vary based on the order's security type", Completions: []string{"limit", "market", "stop", "stop_limit", "trailing_stop"}, Source: "body"}, }, }
var PostWatchlistOp = Op{ Name: "PostWatchlist", Summary: "Create watchlist", Example: ` alpaca watchlist create --name "Tech Stocks" --symbols AAPL,MSFT,GOOG`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "watchlist name", Source: "body"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "list of asset symbols to include in the watchlist", Source: "body"}, }, }
var RatesOp = Op{ Name: "Rates", Summary: "Get historical rates for currency pairs", Example: ` alpaca data forex rates --currency-pairs EUR/USD,GBP/USD --start 2025-01-01 alpaca data forex rates --currency-pairs USD/JPY --timeframe 1Hour`, Flags: []FlagDef{ {Name: "currency-pairs", OASName: "currency_pairs", Type: "string", Description: "A comma-separated string with currency pairs", Required: true, Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Default: "1Min", Description: "sampling interval of the currency rates", Source: "query"}, }, }
var RemoveAssetFromWatchlistOp = Op{ Name: "RemoveAssetFromWatchlist", Summary: "Delete symbol from watchlist", Example: ` alpaca watchlist remove --watchlist-id <id> --symbol AAPL`, Flags: []FlagDef{ {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol name to remove from the watchlist content", Required: true, Source: "path"}, {Name: "watchlist-id", OASName: "watchlist_id", Type: "string", Description: "watchlist ID", Required: true, Source: "path"}, }, }
var SetCryptoPerpAccountLeverageOp = Op{ Name: "SetCryptoPerpAccountLeverage", Summary: "Set account leverage for an asset", Example: ` alpaca crypto-perp set-leverage --asset BTC --leverage 5`, Flags: []FlagDef{ {Name: "leverage", OASName: "leverage", Type: "int", Description: "leverage for the underlying asset", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol of underlying asset", Source: "query"}, }, }
var StockAuctionSingleOp = Op{ Name: "StockAuctionSingle", Summary: "Get historical auctions (single)", Example: ` alpaca data auction --symbol AAPL --start 2025-01-01`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "only sip is valid for auctions", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockAuctionsOp = Op{ Name: "StockAuctions", Summary: "Get historical auctions", Example: ` alpaca data auctions --symbols AAPL --start 2025-01-01 alpaca data auctions --symbols AAPL,MSFT --limit 10`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "only sip is valid for auctions", Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockBarSingleOp = Op{ Name: "StockBarSingle", Summary: "Get historical bars (single symbol)", Example: ` alpaca data bars --symbol AAPL --start 2025-01-01 --timeframe 1Day alpaca data bars --symbol AAPL --start 2025-01-01 --end 2025-06-01 --limit 100`, Flags: []FlagDef{ {Name: "adjustment", OASName: "adjustment", Type: "string", Default: "raw", Description: "specifies the adjustments for the bars.\n\n - raw: no adjustments\n - split: adjust price and volume for forward and rev...", Source: "query"}, {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Description: "timeframe represented by each bar in aggregation.\nYou can use any of the following values:\n - [1-59]Min or [1-59]T, e.g", Required: true, Source: "query"}, }, }
var StockBarsOp = Op{ Name: "StockBars", Summary: "Get historical bars", Example: ` alpaca data multi-bars --symbols AAPL,MSFT --start 2025-01-01 --timeframe 1Day`, Flags: []FlagDef{ {Name: "adjustment", OASName: "adjustment", Type: "string", Default: "raw", Description: "specifies the adjustments for the bars.\n\n - raw: no adjustments\n - split: adjust price and volume for forward and rev...", Source: "query"}, {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, {Name: "timeframe", OASName: "timeframe", Type: "string", Description: "timeframe represented by each bar in aggregation.\nYou can use any of the following values:\n - [1-59]Min or [1-59]T, e.g", Required: true, Source: "query"}, }, }
var StockLatestBarSingleOp = Op{ Name: "StockLatestBarSingle", Summary: "Get latest bar (single symbol)", Example: ` alpaca data latest-bar --symbol AAPL`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockLatestBarsOp = Op{ Name: "StockLatestBars", Summary: "Get latest bars", Example: ` alpaca data latest-bars --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockLatestQuoteSingleOp = Op{ Name: "StockLatestQuoteSingle", Summary: "Get latest quote (single symbol)", Example: ` alpaca data latest-quote --symbol AAPL`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockLatestQuotesOp = Op{ Name: "StockLatestQuotes", Summary: "Get latest quotes", Example: ` alpaca data latest-quotes --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockLatestTradeSingleOp = Op{ Name: "StockLatestTradeSingle", Summary: "Get latest trade (single symbol)", Example: ` alpaca data latest-trade --symbol AAPL alpaca data latest-trade --symbol AAPL --feed sip`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockLatestTradesOp = Op{ Name: "StockLatestTrades", Summary: "Get latest trades", Example: ` alpaca data latest-trades --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockMetaConditionsOp = Op{ Name: "StockMetaConditions", Summary: "Get condition codes", Example: ` alpaca data meta conditions --ticktype trade`, Flags: []FlagDef{ {Name: "tape", OASName: "tape", Type: "string", Description: "one character name of the tape", Completions: []string{"A", "B", "C"}, Required: true, Source: "query"}, {Name: "ticktype", OASName: "ticktype", Type: "string", Description: "type of ticks", Required: true, Source: "path"}, }, }
var StockMetaExchangesOp = Op{
Name: "StockMetaExchanges", Summary: "Get exchange codes",
Example: ` alpaca data meta exchanges`,
}
var StockQuoteSingleOp = Op{ Name: "StockQuoteSingle", Summary: "Get historical quotes (single symbol)", Example: ` alpaca data quotes --symbol AAPL --start 2025-01-01 alpaca data quotes --symbol AAPL --start 2025-01-01 --end 2025-01-31 --limit 50`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockQuotesOp = Op{ Name: "StockQuotes", Summary: "Get historical quotes", Example: ` alpaca data multi-quotes --symbols AAPL,MSFT --start 2025-01-01`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockSnapshotSingleOp = Op{ Name: "StockSnapshotSingle", Summary: "Get snapshot (single symbol)", Long: "Returns the latest snapshot for a stock symbol. Use --jq to flatten for CSV.", Example: ` alpaca data snapshot --symbol AAPL alpaca data snapshot --symbol AAPL --feed sip`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockSnapshotsOp = Op{ Name: "StockSnapshots", Summary: "Get snapshots", Example: ` alpaca data multi-snapshots --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Description: "source feed of the data.", Completions: []string{"boats", "delayed_sip", "iex", "otc", "overnight", "sip"}, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var StockTradeSingleOp = Op{ Name: "StockTradeSingle", Summary: "Get historical trades (single symbol)", Example: ` alpaca data trades --symbol AAPL --start 2025-01-01 alpaca data trades --symbol AAPL --start 2025-01-01 --limit 100`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbol", OASName: "symbol", Type: "string", Description: "symbol to query", Required: true, Source: "path"}, }, }
var StockTradesOp = Op{ Name: "StockTrades", Summary: "Get historical trades", Example: ` alpaca data multi-trades --symbols AAPL,MSFT --start 2025-01-01`, Flags: []FlagDef{ {Name: "asof", OASName: "asof", Type: "string", Description: "as-of date of the queried stock symbol(s)", Source: "query"}, {Name: "currency", OASName: "currency", Type: "string", Description: "currency of all prices in ISO 4217 format. Default: USD", Source: "query"}, {Name: "end", OASName: "end", Type: "string", Description: "inclusive end of the interval", Source: "query"}, {Name: "feed", OASName: "feed", Type: "string", Default: "sip", Description: "source feed of the data.", Completions: []string{"boats", "iex", "otc", "sip"}, Source: "query"}, {Name: "limit", OASName: "limit", Type: "int", Default: "1000", Description: "maximum number of data points to return in the response page.", Source: "query"}, {Name: "page-token", OASName: "page_token", Type: "string", Description: "pagination token from which to continue", Source: "query"}, {Name: "sort", OASName: "sort", Type: "string", Default: "asc", Description: "sort data in ascending or descending order", Completions: []string{"asc", "desc"}, Source: "query"}, {Name: "start", OASName: "start", Type: "string", Description: "inclusive start of the interval", Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "A comma-separated list of stock symbols", Required: true, Source: "query"}, }, }
var UpdateWatchlistByIDOp = Op{ Name: "UpdateWatchlistByID", Summary: "Update watchlist by id", Example: ` alpaca watchlist update --watchlist-id <id> --name "Updated" --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "watchlist name", Source: "body"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "list of asset symbols to include in the watchlist", Source: "body"}, {Name: "watchlist-id", OASName: "watchlist_id", Type: "string", Description: "watchlist id", Required: true, Source: "path"}, }, }
var UpdateWatchlistByNameOp = Op{ Name: "UpdateWatchlistByName", Summary: "Update watchlist by name", Example: ` alpaca watchlist update-by-name --name "Tech Stocks" --new-name "Technology" --symbols AAPL,MSFT`, Flags: []FlagDef{ {Name: "name", OASName: "name", Type: "string", Description: "name of the watchlist", Required: true, Source: "query"}, {Name: "symbols", OASName: "symbols", Type: "string", Description: "list of asset symbols to include in the watchlist", Source: "body"}, }, }
var UsCorporatesOp = Op{ Name: "UsCorporates", Summary: "Get US corporates", Example: ` alpaca asset bond alpaca asset bond --bond-status active`, Flags: []FlagDef{ {Name: "bond-status", OASName: "bond_status", Type: "string", Description: "status of the bond", Completions: []string{"matured", "outstanding", "pre_issuance"}, Source: "query"}, {Name: "cusips", OASName: "cusips", Type: "string", Description: "A comma-separated list of CUSIPs with a limit of 1000", Source: "query"}, {Name: "isins", OASName: "isins", Type: "string", Description: "A comma-separated list of ISINs with a limit of 1000", Source: "query"}, {Name: "tickers", OASName: "tickers", Type: "string", Description: "A comma-separated list of tickers with a limit of 1000", Source: "query"}, }, }
var UsTreasuriesOp = Op{ Name: "UsTreasuries", Summary: "Get US treasuries", Example: ` alpaca asset treasury alpaca asset treasury --bond-status active`, Flags: []FlagDef{ {Name: "bond-status", OASName: "bond_status", Type: "string", Description: "status of the bond", Completions: []string{"matured", "outstanding", "pre_issuance"}, Source: "query"}, {Name: "cusips", OASName: "cusips", Type: "string", Description: "A comma-separated list of CUSIPs with a limit of 1000", Source: "query"}, {Name: "isins", OASName: "isins", Type: "string", Description: "A comma-separated list of ISINs with a limit of 1000", Source: "query"}, {Name: "subtype", OASName: "subtype", Type: "string", Description: "subtype of the treasury", Completions: []string{"bill", "bond", "floating", "note", "strips", "tips"}, Source: "query"}, }, }
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
AccountBlocked bool `json:"account_blocked,omitempty"`
AccountNumber string `json:"account_number,omitempty"`
AccruedFees string `json:"accrued_fees,omitempty"`
BalanceAsof string `json:"balance_asof,omitempty"`
BuyingPower string `json:"buying_power,omitempty"`
Cash string `json:"cash,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
Currency string `json:"currency,omitempty"`
DaytradeCount int `json:"daytrade_count,omitempty"`
DaytradingBuyingPower string `json:"daytrading_buying_power,omitempty"`
Equity string `json:"equity,omitempty"`
ID string `json:"id"`
InitialMargin string `json:"initial_margin,omitempty"`
IntradayAdjustments string `json:"intraday_adjustments,omitempty"`
LastEquity string `json:"last_equity,omitempty"`
LastMaintenanceMargin string `json:"last_maintenance_margin,omitempty"`
LongMarketValue string `json:"long_market_value,omitempty"`
MaintenanceMargin string `json:"maintenance_margin,omitempty"`
Multiplier string `json:"multiplier,omitempty"`
NonMarginableBuyingPower string `json:"non_marginable_buying_power,omitempty"`
OptionsApprovedLevel int `json:"options_approved_level,omitempty"`
OptionsBuyingPower string `json:"options_buying_power,omitempty"`
OptionsTradingLevel int `json:"options_trading_level,omitempty"`
PatternDayTrader bool `json:"pattern_day_trader,omitempty"`
PendingRegTafFees string `json:"pending_reg_taf_fees,omitempty"`
PendingTransferIn string `json:"pending_transfer_in,omitempty"`
PendingTransferOut string `json:"pending_transfer_out,omitempty"`
PortfolioValue string `json:"portfolio_value,omitempty"`
RegtBuyingPower string `json:"regt_buying_power,omitempty"`
ShortMarketValue string `json:"short_market_value,omitempty"`
ShortingEnabled bool `json:"shorting_enabled,omitempty"`
SMA string `json:"sma,omitempty"`
Status AccountStatus `json:"status"`
TradeSuspendedByUser bool `json:"trade_suspended_by_user,omitempty"`
TradingBlocked bool `json:"trading_blocked,omitempty"`
TransfersBlocked bool `json:"transfers_blocked,omitempty"`
}
type AccountConfigurations ¶
type AccountConfigurations struct {
DisableOvernightTrading bool `json:"disable_overnight_trading,omitempty"`
DTBPCheck string `json:"dtbp_check,omitempty"`
FractionalTrading bool `json:"fractional_trading,omitempty"`
MaxMarginMultiplier string `json:"max_margin_multiplier,omitempty"`
MaxOptionsTradingLevel int `json:"max_options_trading_level,omitempty"`
NoShorting bool `json:"no_shorting,omitempty"`
PDTCheck string `json:"pdt_check,omitempty"`
PtpNoExceptionEntry bool `json:"ptp_no_exception_entry,omitempty"`
SuspendTrade bool `json:"suspend_trade,omitempty"`
TradeConfirmEmail string `json:"trade_confirm_email,omitempty"`
}
type AccountStatus ¶
type AccountStatus string
type ActivityType ¶
type ActivityType string
type AddAssetToWatchlistByNameRequest ¶
type AddAssetToWatchlistByNameRequest struct {
Symbol string `json:"symbol,omitempty"`
}
type AddAssetToWatchlistRequest ¶
type AddAssetToWatchlistRequest struct {
Symbol string `json:"symbol,omitempty"`
}
type AdvancedInstructions ¶
type AdvancedInstructions struct {
Algorithm string `json:"algorithm,omitempty"`
Destination string `json:"destination,omitempty"`
DisplayQty string `json:"display_qty,omitempty"`
EndTime string `json:"end_time,omitempty"`
MaxPercentage string `json:"max_percentage,omitempty"`
StartTime string `json:"start_time,omitempty"`
}
type AssetClass ¶
type AssetClass string
type Assets ¶
type Assets struct {
Attributes []string `json:"attributes,omitempty"`
Class AssetClass `json:"class"`
Cusip string `json:"cusip,omitempty"`
EasyToBorrow bool `json:"easy_to_borrow"`
Exchange Exchange `json:"exchange"`
Fractionable bool `json:"fractionable"`
ID string `json:"id"`
MaintenanceMarginRequirement float64 `json:"maintenance_margin_requirement,omitempty"`
MarginRequirementLong string `json:"margin_requirement_long,omitempty"`
MarginRequirementShort string `json:"margin_requirement_short,omitempty"`
Marginable bool `json:"marginable"`
Name string `json:"name"`
Shortable bool `json:"shortable"`
Status string `json:"status"`
Symbol string `json:"symbol"`
Tradable bool `json:"tradable"`
}
type BondStatus ¶
type BondStatus string
type CalendarDay ¶
type CalendarDay struct {
CoreEnd string `json:"core_end"`
CoreStart string `json:"core_start"`
Date string `json:"date"`
LunchEnd string `json:"lunch_end,omitempty"`
LunchStart string `json:"lunch_start,omitempty"`
PostEnd string `json:"post_end,omitempty"`
PostStart string `json:"post_start,omitempty"`
PreEnd string `json:"pre_end,omitempty"`
PreStart string `json:"pre_start,omitempty"`
SettlementDate string `json:"settlement_date,omitempty"`
}
type CanceledOrderResponse ¶
type CashDividend ¶
type CashDividend struct {
Cusip string `json:"cusip"`
DueBillOffDate string `json:"due_bill_off_date,omitempty"`
DueBillOnDate string `json:"due_bill_on_date,omitempty"`
ExDate string `json:"ex_date"`
Foreign bool `json:"foreign"`
ID string `json:"id"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
Rate float64 `json:"rate"`
RecordDate string `json:"record_date,omitempty"`
Special bool `json:"special"`
Symbol string `json:"symbol"`
}
type CashMerger ¶
type CashMerger struct {
AcquireeCusip string `json:"acquiree_cusip"`
AcquireeSymbol string `json:"acquiree_symbol"`
AcquirerCusip string `json:"acquirer_cusip,omitempty"`
AcquirerSymbol string `json:"acquirer_symbol,omitempty"`
EffectiveDate string `json:"effective_date"`
ID string `json:"id"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
Rate float64 `json:"rate"`
}
type CorporateActions ¶
type CorporateActions struct {
CashDividends []CashDividend `json:"cash_dividends,omitempty"`
CashMergers []CashMerger `json:"cash_mergers,omitempty"`
ForwardSplits []ForwardSplit `json:"forward_splits,omitempty"`
NameChanges []NameChange `json:"name_changes,omitempty"`
Redemptions []Redemption `json:"redemptions,omitempty"`
ReverseSplits []ReverseSplit `json:"reverse_splits,omitempty"`
RightsDistributions []RightsDistribution `json:"rights_distributions,omitempty"`
SpinOffs []SpinOff `json:"spin_offs,omitempty"`
StockAndCashMergers []StockAndCashMerger `json:"stock_and_cash_mergers,omitempty"`
StockDividends []StockDividend `json:"stock_dividends,omitempty"`
StockMergers []StockMerger `json:"stock_mergers,omitempty"`
UnitSplits []UnitSplit `json:"unit_splits,omitempty"`
WorthlessRemovals []WorthlessRemoval `json:"worthless_removals,omitempty"`
}
type CorporateActionsResp ¶
type CorporateActionsResp struct {
CorporateActions CorporateActions `json:"corporate_actions"`
NextPageToken string `json:"next_page_token"`
}
type CouponFrequency ¶
type CouponFrequency string
type CouponType ¶
type CouponType string
type CreateCryptoTransferRequest ¶
type CreateCryptoTransferRequest struct {
Address string `json:"address"`
Amount string `json:"amount"`
Asset string `json:"asset"`
}
func (*CreateCryptoTransferRequest) Validate ¶
func (r *CreateCryptoTransferRequest) Validate() error
type CryptoBarsResp ¶
type CryptoHistoricalLoc ¶
type CryptoHistoricalLoc string
type CryptoLatestBarsResp ¶
type CryptoLatestLoc ¶
type CryptoLatestLoc string
type CryptoLatestOrderbooksResp ¶
type CryptoLatestOrderbooksResp struct {
Orderbooks map[string]CryptoOrderbook `json:"orderbooks"`
}
type CryptoLatestQuotesResp ¶
type CryptoLatestQuotesResp struct {
Quotes map[string]CryptoQuote `json:"quotes"`
}
type CryptoLatestTradesResp ¶
type CryptoLatestTradesResp struct {
Trades map[string]CryptoTrade `json:"trades"`
}
type CryptoOrderbook ¶
type CryptoOrderbook struct {
A []CryptoOrderbookEntry `json:"a"`
B []CryptoOrderbookEntry `json:"b"`
T string `json:"t"`
}
type CryptoOrderbookEntry ¶
type CryptoPerpLatestFuturesPricingResp ¶
type CryptoPerpLatestFuturesPricingResp struct {
Pricing map[string]CryptoPerpFuturesPricing `json:"pricing"`
}
type CryptoPerpLoc ¶
type CryptoPerpLoc string
type CryptoQuote ¶
type CryptoQuotesResp ¶
type CryptoQuotesResp struct {
NextPageToken string `json:"next_page_token"`
Quotes map[string][]CryptoQuote `json:"quotes"`
}
type CryptoSnapshot ¶
type CryptoSnapshot struct {
DailyBar CryptoBar `json:"dailyBar,omitempty"`
LatestQuote CryptoQuote `json:"latestQuote,omitempty"`
LatestTrade CryptoTrade `json:"latestTrade,omitempty"`
MinuteBar CryptoBar `json:"minuteBar,omitempty"`
PrevDailyBar CryptoBar `json:"prevDailyBar,omitempty"`
}
type CryptoSnapshotsResp ¶
type CryptoSnapshotsResp struct {
Snapshots map[string]CryptoSnapshot `json:"snapshots"`
}
type CryptoTrade ¶
type CryptoTradesResp ¶
type CryptoTradesResp struct {
NextPageToken string `json:"next_page_token"`
Trades map[string][]CryptoTrade `json:"trades"`
}
type CryptoTransfer ¶
type CryptoTransfer struct {
Amount string `json:"amount,omitempty"`
Asset string `json:"asset,omitempty"`
Chain string `json:"chain,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
Direction TransferDirection `json:"direction,omitempty"`
Fees string `json:"fees,omitempty"`
FromAddress string `json:"from_address,omitempty"`
ID string `json:"id,omitempty"`
NetworkFee string `json:"network_fee,omitempty"`
Status CryptoTransferStatus `json:"status,omitempty"`
ToAddress string `json:"to_address,omitempty"`
TxHash string `json:"tx_hash,omitempty"`
UsdValue string `json:"usd_value,omitempty"`
}
type CryptoTransferStatus ¶
type CryptoTransferStatus string
type CryptoWallet ¶
type ExchangeForPosition ¶
type ExchangeForPosition string
type FixedIncomeLatestPricesResp ¶
type FixedIncomeLatestPricesResp struct {
Prices map[string]FixedIncomePrice `json:"prices"`
}
type FixedIncomePrice ¶
type FlagDef ¶
type FlagDef struct {
Name string // kebab-case CLI flag name
OASName string // original OAS property/parameter name
Type string // "string", "bool", "int"
Default string
Description string
Completions []string // enum values for shell completion
Required bool // true if OAS marks this parameter as required
Source string // "path", "query", or "body"
}
FlagDef describes a CLI flag derived from the OpenAPI spec.
type ForexLatestRatesResp ¶
type ForexRatesResp ¶
type ForwardSplit ¶
type ForwardSplit struct {
Cusip string `json:"cusip"`
DueBillRedemptionDate string `json:"due_bill_redemption_date,omitempty"`
ExDate string `json:"ex_date"`
ID string `json:"id"`
NewRate float64 `json:"new_rate"`
OldRate float64 `json:"old_rate"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
RecordDate string `json:"record_date,omitempty"`
Symbol string `json:"symbol"`
}
type LegacyCalendarDay ¶
type LegacyClock ¶
type MLegOrderLeg ¶
type MLegOrderLeg struct {
PositionIntent PositionIntent `json:"position_intent,omitempty"`
RatioQty string `json:"ratio_qty"`
Side OrderSide `json:"side,omitempty"`
Symbol string `json:"symbol"`
}
type MarketDataClient ¶
MarketDataClient provides typed methods for the MarketData API.
func NewMarketDataClient ¶
func NewMarketDataClient(raw *client.Client) *MarketDataClient
func (*MarketDataClient) CorporateActions ¶
func (c *MarketDataClient) CorporateActions(params url.Values) (*CorporateActionsResp, error)
CorporateActions — Corporate actions
func (*MarketDataClient) CryptoBars ¶
func (c *MarketDataClient) CryptoBars(Loc string, params url.Values) (*CryptoBarsResp, error)
CryptoBars — Historical bars
func (*MarketDataClient) CryptoLatestBars ¶
func (c *MarketDataClient) CryptoLatestBars(Loc string, params url.Values) (*CryptoLatestBarsResp, error)
CryptoLatestBars — Latest bars
func (*MarketDataClient) CryptoLatestOrderbooks ¶
func (c *MarketDataClient) CryptoLatestOrderbooks(Loc string, params url.Values) (*CryptoLatestOrderbooksResp, error)
CryptoLatestOrderbooks — Latest orderbook
func (*MarketDataClient) CryptoLatestQuotes ¶
func (c *MarketDataClient) CryptoLatestQuotes(Loc string, params url.Values) (*CryptoLatestQuotesResp, error)
CryptoLatestQuotes — Latest quotes
func (*MarketDataClient) CryptoLatestTrades ¶
func (c *MarketDataClient) CryptoLatestTrades(Loc string, params url.Values) (*CryptoLatestTradesResp, error)
CryptoLatestTrades — Latest trades
func (*MarketDataClient) CryptoPerpLatestBars ¶
func (c *MarketDataClient) CryptoPerpLatestBars(Loc string, params url.Values) (*CryptoLatestBarsResp, error)
CryptoPerpLatestBars — Latest bars
func (*MarketDataClient) CryptoPerpLatestFuturesPricing ¶
func (c *MarketDataClient) CryptoPerpLatestFuturesPricing(Loc string, params url.Values) (*CryptoPerpLatestFuturesPricingResp, error)
CryptoPerpLatestFuturesPricing — Latest pricing
func (*MarketDataClient) CryptoPerpLatestOrderbooks ¶
func (c *MarketDataClient) CryptoPerpLatestOrderbooks(Loc string, params url.Values) (*CryptoLatestOrderbooksResp, error)
CryptoPerpLatestOrderbooks — Latest orderbook
func (*MarketDataClient) CryptoPerpLatestQuotes ¶
func (c *MarketDataClient) CryptoPerpLatestQuotes(Loc string, params url.Values) (*CryptoLatestQuotesResp, error)
CryptoPerpLatestQuotes — Latest quotes
func (*MarketDataClient) CryptoPerpLatestTrades ¶
func (c *MarketDataClient) CryptoPerpLatestTrades(Loc string, params url.Values) (*CryptoLatestTradesResp, error)
CryptoPerpLatestTrades — Latest trades
func (*MarketDataClient) CryptoQuotes ¶
func (c *MarketDataClient) CryptoQuotes(Loc string, params url.Values) (*CryptoQuotesResp, error)
CryptoQuotes — Historical quotes
func (*MarketDataClient) CryptoSnapshots ¶
func (c *MarketDataClient) CryptoSnapshots(Loc string, params url.Values) (*CryptoSnapshotsResp, error)
CryptoSnapshots — Snapshots
func (*MarketDataClient) CryptoTrades ¶
func (c *MarketDataClient) CryptoTrades(Loc string, params url.Values) (*CryptoTradesResp, error)
CryptoTrades — Historical trades
func (*MarketDataClient) FixedIncomeLatestPrices ¶
func (c *MarketDataClient) FixedIncomeLatestPrices(params url.Values) (*FixedIncomeLatestPricesResp, error)
FixedIncomeLatestPrices — Latest prices
func (*MarketDataClient) LatestRates ¶
func (c *MarketDataClient) LatestRates(params url.Values) (*ForexLatestRatesResp, error)
LatestRates — Latest rates for currency pairs
func (*MarketDataClient) Logos ¶
func (c *MarketDataClient) Logos(Symbol string, params url.Values) (json.RawMessage, error)
Logos — Logos
func (*MarketDataClient) MostActives ¶
func (c *MarketDataClient) MostActives(params url.Values) (*MostActivesResp, error)
MostActives — Most active stocks
func (*MarketDataClient) Movers ¶
func (c *MarketDataClient) Movers(MarketType string, params url.Values) (*MoversResp, error)
Movers — Top market movers
func (*MarketDataClient) News ¶
func (c *MarketDataClient) News(params url.Values) (*NewsResp, error)
News — News articles
func (*MarketDataClient) OptionBars ¶
func (c *MarketDataClient) OptionBars(params url.Values) (*OptionBarsResp, error)
OptionBars — Historical bars
func (*MarketDataClient) OptionChain ¶
func (c *MarketDataClient) OptionChain(UnderlyingSymbol string, params url.Values) (*OptionSnapshotsResp, error)
OptionChain — Option chain
func (*MarketDataClient) OptionLatestQuotes ¶
func (c *MarketDataClient) OptionLatestQuotes(params url.Values) (*OptionLatestQuotesResp, error)
OptionLatestQuotes — Latest quotes
func (*MarketDataClient) OptionLatestTrades ¶
func (c *MarketDataClient) OptionLatestTrades(params url.Values) (*OptionLatestTradesResp, error)
OptionLatestTrades — Latest trades
func (*MarketDataClient) OptionMetaConditions ¶
func (c *MarketDataClient) OptionMetaConditions(Ticktype string) (json.RawMessage, error)
OptionMetaConditions — Condition codes
func (*MarketDataClient) OptionMetaExchanges ¶
func (c *MarketDataClient) OptionMetaExchanges() (json.RawMessage, error)
OptionMetaExchanges — Exchange codes
func (*MarketDataClient) OptionSnapshots ¶
func (c *MarketDataClient) OptionSnapshots(params url.Values) (*OptionSnapshotsResp, error)
OptionSnapshots — Snapshots
func (*MarketDataClient) OptionTrades ¶
func (c *MarketDataClient) OptionTrades(params url.Values) (*OptionTradesResp, error)
OptionTrades — Historical trades
func (*MarketDataClient) Rates ¶
func (c *MarketDataClient) Rates(params url.Values) (*ForexRatesResp, error)
Rates — Historical rates for currency pairs
func (*MarketDataClient) StockAuctionSingle ¶
func (c *MarketDataClient) StockAuctionSingle(Symbol string, params url.Values) (*StockAuctionsRespSingle, error)
StockAuctionSingle — Historical auctions (single)
func (*MarketDataClient) StockAuctions ¶
func (c *MarketDataClient) StockAuctions(params url.Values) (*StockAuctionsResp, error)
StockAuctions — Historical auctions
func (*MarketDataClient) StockBarSingle ¶
func (c *MarketDataClient) StockBarSingle(Symbol string, params url.Values) (*StockBarsRespSingle, error)
StockBarSingle — Historical bars (single symbol)
func (*MarketDataClient) StockBars ¶
func (c *MarketDataClient) StockBars(params url.Values) (*StockBarsResp, error)
StockBars — Historical bars
func (*MarketDataClient) StockLatestBarSingle ¶
func (c *MarketDataClient) StockLatestBarSingle(Symbol string, params url.Values) (*StockLatestBarsRespSingle, error)
StockLatestBarSingle — Latest bar (single symbol)
func (*MarketDataClient) StockLatestBars ¶
func (c *MarketDataClient) StockLatestBars(params url.Values) (*StockLatestBarsResp, error)
StockLatestBars — Latest bars
func (*MarketDataClient) StockLatestQuoteSingle ¶
func (c *MarketDataClient) StockLatestQuoteSingle(Symbol string, params url.Values) (*StockLatestQuotesRespSingle, error)
StockLatestQuoteSingle — Latest quote (single symbol)
func (*MarketDataClient) StockLatestQuotes ¶
func (c *MarketDataClient) StockLatestQuotes(params url.Values) (*StockLatestQuotesResp, error)
StockLatestQuotes — Latest quotes
func (*MarketDataClient) StockLatestTradeSingle ¶
func (c *MarketDataClient) StockLatestTradeSingle(Symbol string, params url.Values) (*StockLatestTradesRespSingle, error)
StockLatestTradeSingle — Latest trade (single symbol)
func (*MarketDataClient) StockLatestTrades ¶
func (c *MarketDataClient) StockLatestTrades(params url.Values) (*StockLatestTradesResp, error)
StockLatestTrades — Latest trades
func (*MarketDataClient) StockMetaConditions ¶
func (c *MarketDataClient) StockMetaConditions(Ticktype string, params url.Values) (json.RawMessage, error)
StockMetaConditions — Condition codes
func (*MarketDataClient) StockMetaExchanges ¶
func (c *MarketDataClient) StockMetaExchanges() (json.RawMessage, error)
StockMetaExchanges — Exchange codes
func (*MarketDataClient) StockQuoteSingle ¶
func (c *MarketDataClient) StockQuoteSingle(Symbol string, params url.Values) (*StockQuotesRespSingle, error)
StockQuoteSingle — Historical quotes (single symbol)
func (*MarketDataClient) StockQuotes ¶
func (c *MarketDataClient) StockQuotes(params url.Values) (*StockQuotesResp, error)
StockQuotes — Historical quotes
func (*MarketDataClient) StockSnapshotSingle ¶
func (c *MarketDataClient) StockSnapshotSingle(Symbol string, params url.Values) (json.RawMessage, error)
StockSnapshotSingle — Snapshot (single symbol)
func (*MarketDataClient) StockSnapshots ¶
func (c *MarketDataClient) StockSnapshots(params url.Values) (json.RawMessage, error)
StockSnapshots — Snapshots
func (*MarketDataClient) StockTradeSingle ¶
func (c *MarketDataClient) StockTradeSingle(Symbol string, params url.Values) (*StockTradesRespSingle, error)
StockTradeSingle — Historical trades (single symbol)
func (*MarketDataClient) StockTrades ¶
func (c *MarketDataClient) StockTrades(params url.Values) (*StockTradesResp, error)
StockTrades — Historical trades
type MarketType ¶
type MarketType string
type MostActive ¶
type MostActivesResp ¶
type MostActivesResp struct {
LastUpdated string `json:"last_updated"`
MostActives []MostActive `json:"most_actives"`
}
type MoversResp ¶
type MoversResp struct {
Gainers []Mover `json:"gainers"`
LastUpdated string `json:"last_updated"`
Losers []Mover `json:"losers"`
MarketType MarketType `json:"market_type"`
}
type NameChange ¶
type News ¶
type News struct {
Author string `json:"author"`
Content string `json:"content"`
CreatedAt string `json:"created_at"`
Headline string `json:"headline"`
ID int `json:"id"`
Images []NewsImage `json:"images"`
Source string `json:"source"`
Summary string `json:"summary"`
Symbols []string `json:"symbols"`
UpdatedAt string `json:"updated_at"`
URL string `json:"url,omitempty"`
}
type NonTradeActivities ¶
type NonTradeActivities struct {
ActivitySubType string `json:"activity_sub_type,omitempty"`
ActivityType ActivityType `json:"activity_type,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
Cusip string `json:"cusip,omitempty"`
Date string `json:"date,omitempty"`
GroupID string `json:"group_id,omitempty"`
ID string `json:"id,omitempty"`
NetAmount string `json:"net_amount,omitempty"`
Qty string `json:"qty,omitempty"`
Status string `json:"status,omitempty"`
Symbol string `json:"symbol,omitempty"`
}
type Op ¶
type Op struct {
Name string
Summary string
Long string
Example string
ReturnsArray bool
Flags []FlagDef
}
Op describes a generated API operation. Passed to fetchCmd/attachCmd for automatic flag registration, help text, and required-flag validation.
type OptionBarsResp ¶
type OptionContract ¶
type OptionContract struct {
ClosePrice string `json:"close_price,omitempty"`
ClosePriceDate string `json:"close_price_date,omitempty"`
Deliverables []OptionDeliverable `json:"deliverables,omitempty"`
ExpirationDate string `json:"expiration_date"`
ID string `json:"id"`
Multiplier string `json:"multiplier"`
Name string `json:"name"`
OpenInterest string `json:"open_interest,omitempty"`
OpenInterestDate string `json:"open_interest_date,omitempty"`
RootSymbol string `json:"root_symbol,omitempty"`
Size string `json:"size"`
Status string `json:"status"`
StrikePrice string `json:"strike_price"`
Style string `json:"style"`
Symbol string `json:"symbol"`
Tradable bool `json:"tradable"`
Type string `json:"type"`
UnderlyingAssetID string `json:"underlying_asset_id"`
UnderlyingSymbol string `json:"underlying_symbol"`
}
type OptionDeliverable ¶
type OptionDeliverable struct {
AllocationPercentage string `json:"allocation_percentage"`
Amount string `json:"amount"`
AssetID string `json:"asset_id,omitempty"`
DelayedSettlement bool `json:"delayed_settlement"`
SettlementMethod string `json:"settlement_method"`
SettlementType string `json:"settlement_type"`
Symbol string `json:"symbol"`
Type string `json:"type"`
}
type OptionFeed ¶
type OptionFeed string
type OptionGreeks ¶
type OptionLatestQuotesResp ¶
type OptionLatestQuotesResp struct {
Quotes map[string]OptionQuote `json:"quotes"`
}
type OptionLatestTradesResp ¶
type OptionLatestTradesResp struct {
Trades map[string]OptionTrade `json:"trades"`
}
type OptionQuote ¶
type OptionSnapshot ¶
type OptionSnapshot struct {
DailyBar OptionBar `json:"dailyBar,omitempty"`
Greeks OptionGreeks `json:"greeks,omitempty"`
ImpliedVolatility float64 `json:"impliedVolatility,omitempty"`
LatestQuote OptionQuote `json:"latestQuote,omitempty"`
LatestTrade OptionTrade `json:"latestTrade,omitempty"`
MinuteBar OptionBar `json:"minuteBar,omitempty"`
PrevDailyBar OptionBar `json:"prevDailyBar,omitempty"`
}
type OptionSnapshotsResp ¶
type OptionSnapshotsResp struct {
NextPageToken string `json:"next_page_token"`
Snapshots map[string]OptionSnapshot `json:"snapshots"`
}
type OptionTrade ¶
type OptionTradesResp ¶
type OptionTradesResp struct {
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Trades map[string][]OptionTrade `json:"trades"`
}
type Order ¶
type Order struct {
AssetClass AssetClass `json:"asset_class,omitempty"`
AssetID string `json:"asset_id,omitempty"`
CanceledAt string `json:"canceled_at,omitempty"`
ClientOrderID string `json:"client_order_id,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
ExpiredAt string `json:"expired_at,omitempty"`
ExtendedHours bool `json:"extended_hours,omitempty"`
FailedAt string `json:"failed_at,omitempty"`
FilledAt string `json:"filled_at,omitempty"`
FilledAvgPrice string `json:"filled_avg_price,omitempty"`
FilledQty string `json:"filled_qty,omitempty"`
Hwm string `json:"hwm,omitempty"`
ID string `json:"id,omitempty"`
Legs []OrderLeg `json:"legs,omitempty"`
LimitPrice string `json:"limit_price,omitempty"`
Notional string `json:"notional"`
OrderClass OrderClass `json:"order_class,omitempty"`
OrderType string `json:"order_type,omitempty"`
PositionIntent PositionIntent `json:"position_intent,omitempty"`
Qty string `json:"qty,omitempty"`
ReplacedAt string `json:"replaced_at,omitempty"`
ReplacedBy string `json:"replaced_by,omitempty"`
Replaces string `json:"replaces,omitempty"`
Side OrderSide `json:"side,omitempty"`
Status OrderStatus `json:"status,omitempty"`
StopPrice string `json:"stop_price,omitempty"`
SubmittedAt string `json:"submitted_at,omitempty"`
Symbol string `json:"symbol,omitempty"`
TimeInForce TimeInForce `json:"time_in_force"`
TrailPercent string `json:"trail_percent,omitempty"`
TrailPrice string `json:"trail_price,omitempty"`
Type OrderType `json:"type"`
UpdatedAt string `json:"updated_at,omitempty"`
}
type OrderClass ¶
type OrderClass string
type OrderLeg ¶
type OrderLeg struct {
AssetClass AssetClass `json:"asset_class,omitempty"`
AssetID string `json:"asset_id,omitempty"`
CanceledAt string `json:"canceled_at,omitempty"`
ClientOrderID string `json:"client_order_id,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
ExpiredAt string `json:"expired_at,omitempty"`
ExtendedHours bool `json:"extended_hours,omitempty"`
FailedAt string `json:"failed_at,omitempty"`
FilledAt string `json:"filled_at,omitempty"`
FilledAvgPrice string `json:"filled_avg_price,omitempty"`
FilledQty string `json:"filled_qty,omitempty"`
Hwm string `json:"hwm,omitempty"`
ID string `json:"id,omitempty"`
Legs []any `json:"legs,omitempty"`
LimitPrice string `json:"limit_price,omitempty"`
Notional string `json:"notional"`
OrderClass OrderClass `json:"order_class,omitempty"`
OrderType string `json:"order_type,omitempty"`
PositionIntent PositionIntent `json:"position_intent,omitempty"`
Qty string `json:"qty"`
ReplacedAt string `json:"replaced_at,omitempty"`
ReplacedBy string `json:"replaced_by,omitempty"`
Replaces string `json:"replaces,omitempty"`
Side OrderSide `json:"side"`
Status OrderStatus `json:"status,omitempty"`
StopPrice string `json:"stop_price,omitempty"`
SubmittedAt string `json:"submitted_at,omitempty"`
Symbol string `json:"symbol"`
TimeInForce TimeInForce `json:"time_in_force"`
TrailPercent string `json:"trail_percent,omitempty"`
TrailPrice string `json:"trail_price,omitempty"`
Type OrderType `json:"type"`
UpdatedAt string `json:"updated_at,omitempty"`
}
type OrderStatus ¶
type OrderStatus string
type PatchOrderRequest ¶
type PatchOrderRequest struct {
AdvancedInstructions AdvancedInstructions `json:"advanced_instructions,omitempty"`
ClientOrderID string `json:"client_order_id,omitempty"`
LimitPrice string `json:"limit_price,omitempty"`
Qty string `json:"qty,omitempty"`
StopPrice string `json:"stop_price,omitempty"`
TimeInForce TimeInForce `json:"time_in_force,omitempty"`
Trail string `json:"trail,omitempty"`
}
type PortfolioHistory ¶
type PortfolioHistory struct {
BaseValue float64 `json:"base_value"`
BaseValueAsof string `json:"base_value_asof,omitempty"`
Cashflow map[string]any `json:"cashflow,omitempty"`
Equity []float64 `json:"equity"`
ProfitLoss []float64 `json:"profit_loss"`
ProfitLossPct []float64 `json:"profit_loss_pct"`
Timeframe string `json:"timeframe"`
Timestamp []int `json:"timestamp"`
}
type Position ¶
type Position struct {
AssetClass AssetClass `json:"asset_class"`
AssetID string `json:"asset_id"`
AssetMarginable bool `json:"asset_marginable"`
AvgEntryPrice string `json:"avg_entry_price"`
ChangeToday string `json:"change_today"`
CostBasis string `json:"cost_basis"`
CurrentPrice string `json:"current_price"`
Exchange ExchangeForPosition `json:"exchange"`
LastdayPrice string `json:"lastday_price"`
MarketValue string `json:"market_value"`
Qty string `json:"qty"`
QtyAvailable string `json:"qty_available,omitempty"`
Side string `json:"side"`
Symbol string `json:"symbol"`
UnrealizedIntradayPL string `json:"unrealized_intraday_pl"`
UnrealizedIntradayPlpc string `json:"unrealized_intraday_plpc"`
UnrealizedPL string `json:"unrealized_pl"`
UnrealizedPlpc string `json:"unrealized_plpc"`
}
type PositionClosedReponse ¶
type PositionIntent ¶
type PositionIntent string
type PostOrderRequest ¶
type PostOrderRequest struct {
AdvancedInstructions AdvancedInstructions `json:"advanced_instructions,omitempty"`
ClientOrderID string `json:"client_order_id,omitempty"`
ExtendedHours bool `json:"extended_hours,omitempty"`
Legs []MLegOrderLeg `json:"legs,omitempty"`
LimitPrice string `json:"limit_price,omitempty"`
Notional string `json:"notional,omitempty"`
OrderClass OrderClass `json:"order_class,omitempty"`
PositionIntent PositionIntent `json:"position_intent,omitempty"`
Qty string `json:"qty,omitempty"`
Side OrderSide `json:"side,omitempty"`
StopLoss map[string]any `json:"stop_loss,omitempty"`
StopPrice string `json:"stop_price,omitempty"`
Symbol string `json:"symbol,omitempty"`
TakeProfit map[string]any `json:"take_profit,omitempty"`
TimeInForce TimeInForce `json:"time_in_force"`
TrailPercent string `json:"trail_percent,omitempty"`
TrailPrice string `json:"trail_price,omitempty"`
Type OrderType `json:"type"`
}
type PublicCalendarResp ¶
type PublicCalendarResp struct {
Calendar []CalendarDay `json:"calendar"`
Market PublicMarket `json:"market"`
}
type PublicMarket ¶
type Redemption ¶
type ResponseField ¶
ResponseField describes a field in an API response.
func ResponseSchema ¶
func ResponseSchema(opName string) ([]ResponseField, bool)
ResponseSchema returns response fields for an operation (lazy-loaded).
type ReverseSplit ¶
type ReverseSplit struct {
ExDate string `json:"ex_date"`
ID string `json:"id"`
NewCusip string `json:"new_cusip"`
NewRate float64 `json:"new_rate"`
OldCusip string `json:"old_cusip"`
OldRate float64 `json:"old_rate"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
RecordDate string `json:"record_date,omitempty"`
Symbol string `json:"symbol"`
}
type RightsDistribution ¶
type RightsDistribution struct {
ExDate string `json:"ex_date"`
ExpirationDate string `json:"expiration_date,omitempty"`
ID string `json:"id"`
NewCusip string `json:"new_cusip"`
NewSymbol string `json:"new_symbol"`
PayableDate string `json:"payable_date"`
ProcessDate string `json:"process_date"`
Rate float64 `json:"rate"`
RecordDate string `json:"record_date,omitempty"`
SourceCusip string `json:"source_cusip"`
SourceSymbol string `json:"source_symbol"`
}
type SpinOff ¶
type SpinOff struct {
DueBillRedemptionDate string `json:"due_bill_redemption_date,omitempty"`
ExDate string `json:"ex_date"`
ID string `json:"id"`
NewCusip string `json:"new_cusip"`
NewRate float64 `json:"new_rate"`
NewSymbol string `json:"new_symbol"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
RecordDate string `json:"record_date,omitempty"`
SourceCusip string `json:"source_cusip"`
SourceRate float64 `json:"source_rate"`
SourceSymbol string `json:"source_symbol"`
}
type StockAndCashMerger ¶
type StockAndCashMerger struct {
AcquireeCusip string `json:"acquiree_cusip"`
AcquireeRate float64 `json:"acquiree_rate"`
AcquireeSymbol string `json:"acquiree_symbol"`
AcquirerCusip string `json:"acquirer_cusip"`
AcquirerRate float64 `json:"acquirer_rate"`
AcquirerSymbol string `json:"acquirer_symbol"`
CashRate float64 `json:"cash_rate"`
EffectiveDate string `json:"effective_date"`
ID string `json:"id"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
}
type StockAuction ¶
type StockAuctionsResp ¶
type StockAuctionsResp struct {
Auctions map[string][]StockDailyAuctions `json:"auctions"`
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
}
type StockAuctionsRespSingle ¶
type StockAuctionsRespSingle struct {
Auctions []StockDailyAuctions `json:"auctions"`
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Symbol string `json:"symbol"`
}
type StockBarsResp ¶
type StockBarsRespSingle ¶
type StockDailyAuctions ¶
type StockDailyAuctions struct {
C []StockAuction `json:"c"`
D string `json:"d"`
O []StockAuction `json:"o"`
}
type StockDividend ¶
type StockDividend struct {
Cusip string `json:"cusip"`
ExDate string `json:"ex_date"`
ID string `json:"id"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
Rate float64 `json:"rate"`
RecordDate string `json:"record_date,omitempty"`
Symbol string `json:"symbol"`
}
type StockHistoricalFeed ¶
type StockHistoricalFeed string
type StockLatestBarsResp ¶
type StockLatestFeed ¶
type StockLatestFeed string
type StockLatestQuotesResp ¶
type StockLatestQuotesResp struct {
Currency string `json:"currency,omitempty"`
Quotes map[string]StockQuote `json:"quotes"`
}
type StockLatestQuotesRespSingle ¶
type StockLatestQuotesRespSingle struct {
Currency string `json:"currency,omitempty"`
Quote StockQuote `json:"quote"`
Symbol string `json:"symbol"`
}
type StockLatestTradesResp ¶
type StockLatestTradesResp struct {
Currency string `json:"currency,omitempty"`
Trades map[string]StockTrade `json:"trades"`
}
type StockLatestTradesRespSingle ¶
type StockLatestTradesRespSingle struct {
Currency string `json:"currency,omitempty"`
Symbol string `json:"symbol"`
Trade StockTrade `json:"trade"`
}
type StockMerger ¶
type StockMerger struct {
AcquireeCusip string `json:"acquiree_cusip"`
AcquireeRate float64 `json:"acquiree_rate"`
AcquireeSymbol string `json:"acquiree_symbol"`
AcquirerCusip string `json:"acquirer_cusip"`
AcquirerRate float64 `json:"acquirer_rate"`
AcquirerSymbol string `json:"acquirer_symbol"`
EffectiveDate string `json:"effective_date"`
ID string `json:"id"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
}
type StockQuote ¶
type StockQuotesResp ¶
type StockQuotesResp struct {
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Quotes map[string][]StockQuote `json:"quotes"`
}
type StockQuotesRespSingle ¶
type StockQuotesRespSingle struct {
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Quotes []StockQuote `json:"quotes"`
Symbol string `json:"symbol"`
}
type StockSnapshot ¶
type StockSnapshot struct {
DailyBar StockBar `json:"dailyBar,omitempty"`
LatestQuote StockQuote `json:"latestQuote,omitempty"`
LatestTrade StockTrade `json:"latestTrade,omitempty"`
MinuteBar StockBar `json:"minuteBar,omitempty"`
PrevDailyBar StockBar `json:"prevDailyBar,omitempty"`
}
type StockTrade ¶
type StockTradesResp ¶
type StockTradesResp struct {
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Trades map[string][]StockTrade `json:"trades"`
}
type StockTradesRespSingle ¶
type StockTradesRespSingle struct {
Currency string `json:"currency,omitempty"`
NextPageToken string `json:"next_page_token"`
Symbol string `json:"symbol"`
Trades []StockTrade `json:"trades"`
}
type TimeInForce ¶
type TimeInForce string
type TradingActivities ¶
type TradingActivities struct {
ActivityType ActivityType `json:"activity_type,omitempty"`
CumQty string `json:"cum_qty,omitempty"`
ID string `json:"id,omitempty"`
LeavesQty string `json:"leaves_qty,omitempty"`
OrderID string `json:"order_id,omitempty"`
OrderStatus OrderStatus `json:"order_status,omitempty"`
Price string `json:"price,omitempty"`
Qty string `json:"qty,omitempty"`
Side string `json:"side,omitempty"`
Symbol string `json:"symbol,omitempty"`
TransactionTime string `json:"transaction_time,omitempty"`
Type string `json:"type,omitempty"`
}
type TradingClient ¶
TradingClient provides typed methods for the Trading API.
func NewTradingClient ¶
func NewTradingClient(raw *client.Client) *TradingClient
func (*TradingClient) AddAssetToWatchlist ¶
func (c *TradingClient) AddAssetToWatchlist(WatchlistID string, body *AddAssetToWatchlistRequest) (*Watchlist, error)
AddAssetToWatchlist — Add Asset to Watchlist
func (*TradingClient) AddAssetToWatchlistByName ¶
func (c *TradingClient) AddAssetToWatchlistByName(params url.Values, body *AddAssetToWatchlistByNameRequest) (*Watchlist, error)
AddAssetToWatchlistByName — Add Asset to Watchlist By Name
func (*TradingClient) Calendar ¶
func (c *TradingClient) Calendar(Market string, params url.Values) (*PublicCalendarResp, error)
Calendar — Get Market Calendar
func (*TradingClient) Clock ¶
func (c *TradingClient) Clock(params url.Values) (*ClockResp, error)
Clock — Get Market Clock
func (*TradingClient) CreateCryptoPerpTransferForAccount ¶
func (c *TradingClient) CreateCryptoPerpTransferForAccount(body *CreateCryptoTransferRequest) (*CryptoTransfer, error)
CreateCryptoPerpTransferForAccount — Request a New Withdrawal
func (*TradingClient) CreateCryptoTransferForAccount ¶
func (c *TradingClient) CreateCryptoTransferForAccount(body *CreateCryptoTransferRequest) (*CryptoTransfer, error)
CreateCryptoTransferForAccount — Request a New Withdrawal
func (*TradingClient) CreateWhitelistedAddress ¶
func (c *TradingClient) CreateWhitelistedAddress(body *CreateWhitelistedAddressRequest) (*WhitelistedAddress, error)
CreateWhitelistedAddress — Request a new whitelisted address
func (*TradingClient) CreateWhitelistedPerpAddress ¶
func (c *TradingClient) CreateWhitelistedPerpAddress(body *CreateWhitelistedPerpAddressRequest) (*WhitelistedAddress, error)
CreateWhitelistedPerpAddress — Request a new whitelisted address
func (*TradingClient) DeleteAllOpenPositions ¶
func (c *TradingClient) DeleteAllOpenPositions(params url.Values) ([]PositionClosedReponse, error)
DeleteAllOpenPositions — Close All Positions
func (*TradingClient) DeleteAllOrders ¶
func (c *TradingClient) DeleteAllOrders() ([]CanceledOrderResponse, error)
DeleteAllOrders — Delete All Orders
func (*TradingClient) DeleteOpenPosition ¶
func (c *TradingClient) DeleteOpenPosition(SymbolOrAssetID string, params url.Values) (*Order, error)
DeleteOpenPosition — Close a Position
func (*TradingClient) DeleteOrderByOrderID ¶
func (c *TradingClient) DeleteOrderByOrderID(OrderID string) (json.RawMessage, error)
DeleteOrderByOrderID — Delete Order by ID
func (*TradingClient) DeleteWatchlistByID ¶
func (c *TradingClient) DeleteWatchlistByID(WatchlistID string) (json.RawMessage, error)
DeleteWatchlistByID — Delete Watchlist By Id
func (*TradingClient) DeleteWatchlistByName ¶
func (c *TradingClient) DeleteWatchlistByName(params url.Values) (json.RawMessage, error)
DeleteWatchlistByName — Delete Watchlist By Name
func (*TradingClient) DeleteWhitelistedAddress ¶
func (c *TradingClient) DeleteWhitelistedAddress(WhitelistedAddressID string) (json.RawMessage, error)
DeleteWhitelistedAddress — Delete a whitelisted address
func (*TradingClient) DeleteWhitelistedPerpAddress ¶
func (c *TradingClient) DeleteWhitelistedPerpAddress(WhitelistedAddressID string) (json.RawMessage, error)
DeleteWhitelistedPerpAddress — Delete a whitelisted address
func (*TradingClient) GetAccount ¶
func (c *TradingClient) GetAccount() (*Account, error)
GetAccount — Get Account
func (*TradingClient) GetAccountActivities ¶
func (c *TradingClient) GetAccountActivities(params url.Values) (json.RawMessage, error)
GetAccountActivities — Retrieve Account Activities
func (*TradingClient) GetAccountActivitiesByActivityType ¶
func (c *TradingClient) GetAccountActivitiesByActivityType(ActivityType string, params url.Values) (json.RawMessage, error)
GetAccountActivitiesByActivityType — Retrieve Account Activities of Specific Type
func (*TradingClient) GetAccountConfig ¶
func (c *TradingClient) GetAccountConfig() (*AccountConfigurations, error)
GetAccountConfig — Get Account Configurations
func (*TradingClient) GetAccountPortfolioHistory ¶
func (c *TradingClient) GetAccountPortfolioHistory(params url.Values) (*PortfolioHistory, error)
GetAccountPortfolioHistory — Get Account Portfolio History
func (*TradingClient) GetAllOpenPositions ¶
func (c *TradingClient) GetAllOpenPositions() ([]Position, error)
GetAllOpenPositions — All Open Positions
func (*TradingClient) GetAllOrders ¶
func (c *TradingClient) GetAllOrders(params url.Values) ([]Order, error)
GetAllOrders — Get All Orders
func (*TradingClient) GetCryptoFundingTransfer ¶
func (c *TradingClient) GetCryptoFundingTransfer(TransferID string) (*CryptoTransfer, error)
GetCryptoFundingTransfer — Retrieve a Crypto Funding Transfer
func (*TradingClient) GetCryptoPerpAccountLeverage ¶
func (c *TradingClient) GetCryptoPerpAccountLeverage(params url.Values) (json.RawMessage, error)
GetCryptoPerpAccountLeverage — Get Account Leverage for an Asset
func (*TradingClient) GetCryptoPerpAccountVitals ¶
func (c *TradingClient) GetCryptoPerpAccountVitals() (json.RawMessage, error)
GetCryptoPerpAccountVitals — Retrieve Account Vitals
func (*TradingClient) GetCryptoPerpFundingTransfer ¶
func (c *TradingClient) GetCryptoPerpFundingTransfer(TransferID string) (*CryptoTransfer, error)
GetCryptoPerpFundingTransfer — Retrieve a Crypto Funding Transfer
func (*TradingClient) GetCryptoPerpTransferEstimate ¶
func (c *TradingClient) GetCryptoPerpTransferEstimate(params url.Values) (json.RawMessage, error)
GetCryptoPerpTransferEstimate — Returns the estimated gas fee for a proposed transaction
func (*TradingClient) GetCryptoTransferEstimate ¶
func (c *TradingClient) GetCryptoTransferEstimate(params url.Values) (json.RawMessage, error)
GetCryptoTransferEstimate — Returns the estimated gas fee for a proposed transaction.
func (*TradingClient) GetOpenPosition ¶
func (c *TradingClient) GetOpenPosition(SymbolOrAssetID string) (*Position, error)
GetOpenPosition — Get an Open Position
func (*TradingClient) GetOptionContractSymbolOrID ¶
func (c *TradingClient) GetOptionContractSymbolOrID(SymbolOrID string) (*OptionContract, error)
GetOptionContractSymbolOrID — Get an option contract by ID or Symbol
func (*TradingClient) GetOptionsContracts ¶
func (c *TradingClient) GetOptionsContracts(params url.Values) (json.RawMessage, error)
GetOptionsContracts — Get Option Contracts
func (*TradingClient) GetOrderByClientOrderID ¶
func (c *TradingClient) GetOrderByClientOrderID(params url.Values) (*Order, error)
GetOrderByClientOrderID — Get Order by Client Order ID
func (*TradingClient) GetOrderByOrderID ¶
GetOrderByOrderID — Get Order by ID
func (*TradingClient) GetV2Assets ¶
func (c *TradingClient) GetV2Assets(params url.Values) ([]Assets, error)
GetV2Assets — Get Assets
func (*TradingClient) GetV2AssetsSymbolOrAssetID ¶
func (c *TradingClient) GetV2AssetsSymbolOrAssetID(SymbolOrAssetID string) (*Assets, error)
GetV2AssetsSymbolOrAssetID — Get an Asset by ID or Symbol
func (*TradingClient) GetV2CorporateActionsAnnouncements ¶
func (c *TradingClient) GetV2CorporateActionsAnnouncements(params url.Values) (json.RawMessage, error)
GetV2CorporateActionsAnnouncements — Retrieve Announcements
func (*TradingClient) GetV2CorporateActionsAnnouncementsID ¶
func (c *TradingClient) GetV2CorporateActionsAnnouncementsID(ID string) (json.RawMessage, error)
GetV2CorporateActionsAnnouncementsID — Retrieve a Specific Announcement
func (*TradingClient) GetWatchlistByID ¶
func (c *TradingClient) GetWatchlistByID(WatchlistID string) (*Watchlist, error)
GetWatchlistByID — Get Watchlist by ID
func (*TradingClient) GetWatchlistByName ¶
func (c *TradingClient) GetWatchlistByName(params url.Values) (*Watchlist, error)
GetWatchlistByName — Get Watchlist by Name
func (*TradingClient) GetWatchlists ¶
func (c *TradingClient) GetWatchlists() ([]WatchlistWithoutAsset, error)
GetWatchlists — Get All Watchlists
func (*TradingClient) LegacyCalendar ¶
func (c *TradingClient) LegacyCalendar(params url.Values) (json.RawMessage, error)
LegacyCalendar — Get US Market Calendar
func (*TradingClient) LegacyClock ¶
func (c *TradingClient) LegacyClock() (*LegacyClock, error)
LegacyClock — Get US Market Clock
func (*TradingClient) ListCryptoFundingTransfers ¶
func (c *TradingClient) ListCryptoFundingTransfers() (*CryptoTransfer, error)
ListCryptoFundingTransfers — Retrieve Crypto Funding Transfers
func (*TradingClient) ListCryptoFundingWallets ¶
func (c *TradingClient) ListCryptoFundingWallets(params url.Values) (*CryptoWallet, error)
ListCryptoFundingWallets — Retrieve Crypto Funding Wallets
func (*TradingClient) ListCryptoPerpFundingTransfers ¶
func (c *TradingClient) ListCryptoPerpFundingTransfers() (*CryptoTransfer, error)
ListCryptoPerpFundingTransfers — Retrieve Crypto Funding Transfers
func (*TradingClient) ListCryptoPerpFundingWallets ¶
func (c *TradingClient) ListCryptoPerpFundingWallets(params url.Values) (*CryptoWallet, error)
ListCryptoPerpFundingWallets — Retrieve Crypto Funding Wallets
func (*TradingClient) ListWhitelistedAddress ¶
func (c *TradingClient) ListWhitelistedAddress() (*WhitelistedAddress, error)
ListWhitelistedAddress — An array of whitelisted addresses
func (*TradingClient) ListWhitelistedPerpAddress ¶
func (c *TradingClient) ListWhitelistedPerpAddress() (*WhitelistedAddress, error)
ListWhitelistedPerpAddress — An array of whitelisted addresses
func (*TradingClient) OptionDoNotExercise ¶
func (c *TradingClient) OptionDoNotExercise(SymbolOrContractID string) (json.RawMessage, error)
OptionDoNotExercise — Do Not Exercise an Options Position
func (*TradingClient) OptionExercise ¶
func (c *TradingClient) OptionExercise(SymbolOrContractID string) (json.RawMessage, error)
OptionExercise — Exercise an Options Position
func (*TradingClient) PatchAccountConfig ¶
func (c *TradingClient) PatchAccountConfig(body *AccountConfigurations) (*AccountConfigurations, error)
PatchAccountConfig — Account Configurations
func (*TradingClient) PatchOrderByOrderID ¶
func (c *TradingClient) PatchOrderByOrderID(OrderID string, body *PatchOrderRequest) (*Order, error)
PatchOrderByOrderID — Replace Order by ID
func (*TradingClient) PostOrder ¶
func (c *TradingClient) PostOrder(body *PostOrderRequest) (*Order, error)
PostOrder — Create an Order
func (*TradingClient) PostWatchlist ¶
func (c *TradingClient) PostWatchlist(body *UpdateWatchlistRequest) (*Watchlist, error)
PostWatchlist — Create Watchlist
func (*TradingClient) RemoveAssetFromWatchlist ¶
func (c *TradingClient) RemoveAssetFromWatchlist(WatchlistID string, Symbol string) (*Watchlist, error)
RemoveAssetFromWatchlist — Delete Symbol from Watchlist
func (*TradingClient) SetCryptoPerpAccountLeverage ¶
func (c *TradingClient) SetCryptoPerpAccountLeverage(params url.Values) (json.RawMessage, error)
SetCryptoPerpAccountLeverage — Set Account Leverage for an Asset
func (*TradingClient) UpdateWatchlistByID ¶
func (c *TradingClient) UpdateWatchlistByID(WatchlistID string, body *UpdateWatchlistRequest) (*Watchlist, error)
UpdateWatchlistByID — Update Watchlist By Id
func (*TradingClient) UpdateWatchlistByName ¶
func (c *TradingClient) UpdateWatchlistByName(params url.Values, body *UpdateWatchlistRequest) (*Watchlist, error)
UpdateWatchlistByName — Update Watchlist By Name
func (*TradingClient) UsCorporates ¶
func (c *TradingClient) UsCorporates(params url.Values) (*UsCorporatesResp, error)
UsCorporates — Get US corporates
func (*TradingClient) UsTreasuries ¶
func (c *TradingClient) UsTreasuries(params url.Values) (*UsTreasuriesResp, error)
UsTreasuries — Get US treasuries
type TransferDirection ¶
type TransferDirection string
type TreasurySubtype ¶
type TreasurySubtype string
type UnitSplit ¶
type UnitSplit struct {
AlternateCusip string `json:"alternate_cusip"`
AlternateRate float64 `json:"alternate_rate"`
AlternateSymbol string `json:"alternate_symbol"`
EffectiveDate string `json:"effective_date"`
ID string `json:"id"`
NewCusip string `json:"new_cusip"`
NewRate float64 `json:"new_rate"`
NewSymbol string `json:"new_symbol"`
OldCusip string `json:"old_cusip"`
OldRate float64 `json:"old_rate"`
OldSymbol string `json:"old_symbol"`
PayableDate string `json:"payable_date,omitempty"`
ProcessDate string `json:"process_date"`
}
type UpdateWatchlistRequest ¶
type UpdateWatchlistRequest struct {
Name string `json:"name"`
Symbols []string `json:"symbols,omitempty"`
}
func (*UpdateWatchlistRequest) Validate ¶
func (r *UpdateWatchlistRequest) Validate() error
type UsCorporate ¶
type UsCorporate struct {
AccruedInterest float64 `json:"accrued_interest,omitempty"`
BondStatus BondStatus `json:"bond_status"`
CallType CallType `json:"call_type,omitempty"`
Callable bool `json:"callable"`
ClosePrice float64 `json:"close_price,omitempty"`
ClosePriceDate string `json:"close_price_date,omitempty"`
CloseYieldToMaturity float64 `json:"close_yield_to_maturity,omitempty"`
CloseYieldToWorst float64 `json:"close_yield_to_worst,omitempty"`
Convertible bool `json:"convertible"`
CountryDomicile string `json:"country_domicile"`
Coupon float64 `json:"coupon"`
CouponFrequency CouponFrequency `json:"coupon_frequency"`
CouponType CouponType `json:"coupon_type"`
Cusip string `json:"cusip"`
DatedDate string `json:"dated_date"`
DayCount DayCount `json:"day_count"`
Description string `json:"description"`
DescriptionShort string `json:"description_short"`
FirstCouponDate string `json:"first_coupon_date,omitempty"`
Isin string `json:"isin"`
IssueDate string `json:"issue_date"`
IssueMinimumDenomination float64 `json:"issue_minimum_denomination"`
IssuePrice float64 `json:"issue_price"`
IssueSize float64 `json:"issue_size"`
Issuer string `json:"issuer"`
LastCouponDate string `json:"last_coupon_date,omitempty"`
LiquidityInstitutionalAggregate float64 `json:"liquidity_institutional_aggregate,omitempty"`
LiquidityInstitutionalBuy float64 `json:"liquidity_institutional_buy,omitempty"`
LiquidityInstitutionalSell float64 `json:"liquidity_institutional_sell,omitempty"`
LiquidityMicroAggregate float64 `json:"liquidity_micro_aggregate,omitempty"`
LiquidityMicroBuy float64 `json:"liquidity_micro_buy,omitempty"`
LiquidityMicroSell float64 `json:"liquidity_micro_sell,omitempty"`
LiquidityRetailAggregate float64 `json:"liquidity_retail_aggregate,omitempty"`
LiquidityRetailBuy float64 `json:"liquidity_retail_buy,omitempty"`
LiquidityRetailSell float64 `json:"liquidity_retail_sell,omitempty"`
Marginable bool `json:"marginable"`
MaturityDate string `json:"maturity_date,omitempty"`
NextCallDate string `json:"next_call_date,omitempty"`
NextCallPrice float64 `json:"next_call_price,omitempty"`
NextCouponDate string `json:"next_coupon_date,omitempty"`
ParValue float64 `json:"par_value"`
Perpetual bool `json:"perpetual"`
Puttable bool `json:"puttable"`
RegS bool `json:"reg_s"`
ReissueDate string `json:"reissue_date,omitempty"`
ReissuePrice float64 `json:"reissue_price,omitempty"`
ReissueSize float64 `json:"reissue_size,omitempty"`
Sector string `json:"sector"`
Seniority string `json:"seniority"`
SpCreditwatch string `json:"sp_creditwatch,omitempty"`
SpCreditwatchDate string `json:"sp_creditwatch_date,omitempty"`
SpOutlook SpOutlook `json:"sp_outlook,omitempty"`
SpOutlookDate string `json:"sp_outlook_date,omitempty"`
SpRating string `json:"sp_rating,omitempty"`
SpRatingDate string `json:"sp_rating_date,omitempty"`
Ticker string `json:"ticker"`
Tradable bool `json:"tradable"`
}
type UsCorporatesResp ¶
type UsCorporatesResp struct {
UsCorporates []UsCorporate `json:"us_corporates"`
}
type UsTreasuriesResp ¶
type UsTreasuriesResp struct {
UsTreasuries []UsTreasury `json:"us_treasuries"`
}
type UsTreasury ¶
type UsTreasury struct {
BondStatus BondStatus `json:"bond_status"`
ClosePrice float64 `json:"close_price,omitempty"`
ClosePriceDate string `json:"close_price_date,omitempty"`
CloseYieldToMaturity float64 `json:"close_yield_to_maturity,omitempty"`
CloseYieldToWorst float64 `json:"close_yield_to_worst,omitempty"`
Coupon float64 `json:"coupon"`
CouponFrequency CouponFrequency `json:"coupon_frequency"`
CouponType CouponType `json:"coupon_type"`
Cusip string `json:"cusip"`
Description string `json:"description"`
DescriptionShort string `json:"description_short"`
FirstCouponDate string `json:"first_coupon_date,omitempty"`
Isin string `json:"isin"`
IssueDate string `json:"issue_date"`
LastCouponDate string `json:"last_coupon_date,omitempty"`
MaturityDate string `json:"maturity_date"`
NextCouponDate string `json:"next_coupon_date,omitempty"`
Subtype TreasurySubtype `json:"subtype"`
Tradable bool `json:"tradable"`
}