From a9a07384f85c7e36d017d5411dbe20ab2b335727 Mon Sep 17 00:00:00 2001 From: Nathan Hack Date: Mon, 11 Nov 2024 14:04:33 -0500 Subject: [PATCH] Adding package-level functions --- alpaca/rest.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/alpaca/rest.go b/alpaca/rest.go index d1fe12b..5747c99 100644 --- a/alpaca/rest.go +++ b/alpaca/rest.go @@ -1197,6 +1197,16 @@ func GetAsset(symbol string) (*Asset, error) { return DefaultClient.GetAsset(symbol) } +// GetOptionContracts returns the list of Option Contracts. +func GetOptionContracts(req GetOptionContractsRequest) ([]OptionContract, error) { + return DefaultClient.GetOptionContracts(req) +} + +// GetOptionContract returns an option contract by symbol or contract ID. +func GetOptionContract(symbolOrID string) (*OptionContract, error) { + return DefaultClient.GetOptionContract(symbolOrID) +} + // GetAnnouncements returns a list of announcements // with the default Alpaca client. func GetAnnouncements(req GetAnnouncementsRequest) ([]Announcement, error) {