polygon

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2022

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnrichDetail

func EnrichDetail(assets []*common.Asset, max int)

func FetchAssetDetail

func FetchAssetDetail(asset *common.Asset, limit *rate.Limiter) *common.Asset

func FetchAssets

func FetchAssets(maxPages int) ([]*common.Asset, error)

func FetchIcon

func FetchIcon(url string, limit *rate.Limiter) []byte

Types

type PolygonAddress

type PolygonAddress struct {
	Address1   string `json:"address1"`
	City       string `json:"city"`
	State      string `json:"state"`
	PostalCode string `json:"postal_code"`
}

type PolygonAsset

type PolygonAsset struct {
	Active          bool   `json:"active"`
	CIK             string `json:"cik"`
	CompositeFigi   string `json:"composite_figi"`
	CurrencyName    string `json:"currency_name"`
	LastUpdatedUTC  string `json:"last_updated_utc"`
	Locale          string `json:"locale"`
	Market          string `json:"market"`
	Name            string `json:"name"`
	PrimaryExchange string `json:"primary_exchange"`
	ShareClassFigi  string `json:"share_class_figi"`
	Ticker          string `json:"ticker"`
	Type            string `json:"type"`
}

type PolygonAssetDetail

type PolygonAssetDetail struct {
	Ticker                      string          `json:"ticker"`
	Name                        string          `json:"name"`
	Market                      string          `json:"market"`
	Locale                      string          `json:"locale"`
	PrimaryExchange             string          `json:"primary_exchange"`
	Type                        string          `json:"type"`
	Active                      bool            `json:"bool"`
	CurrencyName                string          `json:"currency_name"`
	CIK                         string          `json:"cik"`
	CompositeFigi               string          `json:"composite_figi"`
	ShareClassFigi              string          `json:"share_class_figi"`
	MarketCap                   float64         `json:"market_cap"`
	PhoneNumber                 string          `json:"phone_number"`
	Address                     *PolygonAddress `json:"address"`
	Description                 string          `json:"description"`
	SicCode                     string          `json:"sic_code"`
	SicDescription              string          `json:"sic_description"`
	TickerRoot                  string          `json:"ticker_root"`
	HomepageUrl                 string          `json:"homepage_url"`
	TotalEmployees              int             `json:"total_employees"`
	ListingDate                 string          `json:"list_date"`
	Branding                    PolygonBranding `json:"branding"`
	ShareClassSharesOutstanding int             `json:"share_class_shares_outstanding"`
	WeightedSharesOutstanding   int             `json:"weighted_shares_outstanding"`
}

type PolygonAssetDetailResponse

type PolygonAssetDetailResponse struct {
	Result    *PolygonAssetDetail `json:"results"`
	Status    string              `json:"status"`
	RequestId string              `json:"request_id"`
}

type PolygonAssetsResponse

type PolygonAssetsResponse struct {
	Results   []*PolygonAsset `json:"results"`
	Status    string          `json:"status"`
	RequestId string          `json:"request_id"`
	Count     int             `json:"count"`
	NextUrl   string          `json:"next_url"`
}

type PolygonBranding

type PolygonBranding struct {
	LogoUrl string `json:"logo_url"`
	IconUrl string `json:"icon_url"`
}

Jump to

Keyboard shortcuts

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