reference

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	client.Client
}

Client defines a REST client for the Polygon reference API.

func (*Client) GetExchanges

func (c *Client) GetExchanges(ctx context.Context, params *models.GetExchangesParams, options ...models.RequestOption) (*models.GetExchangesResponse, error)

GetExchanges lists all exchanges that Polygon.io knows about.

func (*Client) GetMarketHolidays

func (c *Client) GetMarketHolidays(ctx context.Context, options ...models.RequestOption) (*models.GetMarketHolidaysResponse, error)

GetMarketHolidays retrieves upcoming market holidays and their open/close times. For more details see https://polygon.io/docs/stocks/get_v1_marketstatus_upcoming.

func (*Client) GetMarketStatus

func (c *Client) GetMarketStatus(ctx context.Context, options ...models.RequestOption) (*models.GetMarketStatusResponse, error)

GetMarketStatus retrieves the current trading status of the exchanges and overall financial markets. For more details see https://polygon.io/docs/stocks/get_v1_marketstatus_now.

func (*Client) GetTickerDetails

func (c *Client) GetTickerDetails(ctx context.Context, params *models.GetTickerDetailsParams, options ...models.RequestOption) (*models.GetTickerDetailsResponse, error)

GetTickerDetails retrieves details for a specified ticker. For more details see https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker.

func (*Client) GetTickerTypes

func (c *Client) GetTickerTypes(ctx context.Context, params *models.GetTickerTypesParams, options ...models.RequestOption) (*models.GetTickerTypesResponse, error)

GetTickerTypes retrieves all the possible ticker types that can be queried. For more details see https://polygon.io/docs/stocks/get_v3_reference_tickers_types.

func (*Client) ListConditions

func (c *Client) ListConditions(ctx context.Context, params *models.ListConditionsParams, options ...models.RequestOption) *ListConditionsIter

ListConditions retrieves reference conditions. For more details see https://polygon.io/docs/stocks/get_v3_reference_conditions. This method returns an iterator that should be used to access the results via this pattern:

iter, err := c.ListConditions(context.TODO(), params, opts...)
for iter.Next() {
    // do something with the current value
    log.Print(iter.Condition())
}
if iter.Err() != nil {
    return err
}

func (*Client) ListDividends

func (c *Client) ListDividends(ctx context.Context, params *models.ListDividendsParams, options ...models.RequestOption) *ListDividendsIter

ListDividends retrieves reference dividends. For more details see https://polygon.io/docs/stocks/get_v3_reference_dividends. This method returns an iterator that should be used to access the results via this pattern:

iter, err := c.ListDividends(context.TODO(), params, opts...)
for iter.Next() {
    // do something with the current value
    log.Print(iter.Dividend())
}
if iter.Err() != nil {
    return err
}

func (*Client) ListSplits

func (c *Client) ListSplits(ctx context.Context, params *models.ListSplitsParams, options ...models.RequestOption) *ListSplitsIter

ListSplits retrieves reference splits. For more details see https://polygon.io/docs/stocks/get_v3_reference_splits. This method returns an iterator that should be used to access the results via this pattern:

iter, err := c.ListSplits(context.TODO(), params, opts...)
for iter.Next() {
    // do something with the current value
    log.Print(iter.Split())
}
if iter.Err() != nil {
    return err
}

func (*Client) ListTickers

func (c *Client) ListTickers(ctx context.Context, params *models.ListTickersParams, options ...models.RequestOption) *ListTickersIter

ListTickers retrieves reference tickers. For more details see https://polygon.io/docs/stocks/get_v3_reference_tickers__ticker. This method returns an iterator that should be used to access the results via this pattern:

iter, err := c.ListTickers(context.TODO(), params, opts...)
for iter.Next() {
    // do something with the current value
    log.Print(iter.Ticker())
}
if iter.Err() != nil {
    return err
}

type ListConditionsIter

type ListConditionsIter struct {
	models.Iter
}

ListConditionsIter is an iterator for the ListConditions method.

func (*ListConditionsIter) Condition

func (it *ListConditionsIter) Condition() models.Condition

Condition returns the current result that the iterator points to.

type ListDividendsIter

type ListDividendsIter struct {
	models.Iter
}

ListDividendsIter is an iterator for the ListDividends method.

func (*ListDividendsIter) Dividend

func (it *ListDividendsIter) Dividend() models.Dividend

Dividend returns the current result that the iterator points to.

type ListSplitsIter

type ListSplitsIter struct {
	models.Iter
}

ListSplitsIter is an iterator for the ListSplits method.

func (*ListSplitsIter) Split

func (it *ListSplitsIter) Split() models.Split

Split returns the current result that the iterator points to.

type ListTickersIter

type ListTickersIter struct {
	models.Iter
}

ListTickersIter is an iterator for the ListTickers method.

func (*ListTickersIter) Ticker

func (it *ListTickersIter) Ticker() models.Ticker

Ticker returns the current result that the iterator points to.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL