Skip to content

Commit

Permalink
Merge branch 'master' into jw-trace-on-err
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpolygon authored Oct 11, 2024
2 parents 4d459e9 + 4518350 commit 7f6e099
Show file tree
Hide file tree
Showing 17 changed files with 735 additions and 367 deletions.
655 changes: 393 additions & 262 deletions .polygon/rest.json

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions .polygon/websocket.json
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@
},
"example": {
"ev": "FMV",
"val": 189.22,
"fmv": 189.22,
"sym": "AAPL",
"t": 1678220098130
}
Expand Down Expand Up @@ -1761,7 +1761,7 @@
},
"example": {
"ev": "FMV",
"val": 7.2,
"fmv": 7.2,
"sym": "O:TSLA210903C00700000",
"t": 1401715883806000000
}
Expand Down Expand Up @@ -2331,7 +2331,7 @@
},
"example": {
"ev": "FMV",
"val": 1.0631,
"fmv": 1.0631,
"sym": "C:EURUSD",
"t": 1678220098130
}
Expand Down Expand Up @@ -2885,7 +2885,10 @@
"name": "realtime",
"description": "Real Time Data"
}
]
],
"x-polygon-deprecation": {
"date": 1719838800000
}
}
},
"/crypto/XA": {
Expand Down Expand Up @@ -3157,7 +3160,7 @@
},
"example": {
"ev": "FMV",
"val": 33021.9,
"fmv": 33021.9,
"sym": "X:BTC-USD",
"t": 1610462007425
}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Polygon Go Client
![Coverage](https://img.shields.io/badge/Coverage-76.6%25-brightgreen)
![Coverage](https://img.shields.io/badge/Coverage-77.4%25-brightgreen)

<!-- todo: add a codecov badge -->
<!-- todo: figure out a way to show all build statuses -->
Expand All @@ -9,6 +9,7 @@

The official Go client library for the [Polygon](https://polygon.io/) REST and WebSocket API. This client makes use of Go generics and thus requires Go 1.18. See the [docs](https://polygon.io/docs/stocks/getting-started) for more details on our API.


## Getting Started

This section guides you through setting up a simple project with polygon-io/client-go.
Expand Down
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/polygon-io/client-go
go 1.21

require (
github.com/cenkalti/backoff/v4 v4.2.1
github.com/cenkalti/backoff/v4 v4.3.0
github.com/go-playground/form/v4 v4.2.1
github.com/go-playground/validator/v10 v10.19.0
github.com/go-resty/resty/v2 v2.12.0
github.com/gorilla/websocket v1.5.1
github.com/go-playground/validator/v10 v10.22.1
github.com/go-resty/resty/v2 v2.13.1
github.com/gorilla/websocket v1.5.3
github.com/jarcoal/httpmock v1.3.1
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.9.0
Expand All @@ -22,9 +22,9 @@ require (
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
33 changes: 17 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM=
github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand All @@ -14,12 +14,12 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.19.0 h1:ol+5Fu+cSq9JD7SoSqe04GMI92cbn0+wvQ3bZ8b/AU4=
github.com/go-playground/validator/v10 v10.19.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-resty/resty/v2 v2.12.0 h1:rsVL8P90LFvkUYq/V5BTVe203WfRIU4gvcf+yfzJzGA=
github.com/go-resty/resty/v2 v2.12.0/go.mod h1:o0yGPrkS3lOe1+eFajk6kBW8ScXzwU3hD69/gt2yB/0=
github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY=
github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY=
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-resty/resty/v2 v2.13.1 h1:x+LHXBI2nMB1vqndymf26quycC4aggYJ7DECYbiz03g=
github.com/go-resty/resty/v2 v2.13.1/go.mod h1:GznXlLxkq6Nh4sU59rPmUw3VtgpO3aS96ORAI6Q7d+0=
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/jarcoal/httpmock v1.3.1 h1:iUx3whfZWVf3jT01hQTO/Eo5sAYtB2/rqaUuOtpInww=
github.com/jarcoal/httpmock v1.3.1/go.mod h1:3yb8rc4BI7TCBhFY8ng0gjuLKJNquuDNiPaZjnENuYg=
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
Expand All @@ -38,8 +38,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd h1:zVFyTKZN/Q7mNRWSs1GOYnHM9NiFSJ54YVRsD0rNWT4=
golang.org/x/exp v0.0.0-20220414153411-bcd21879b8fd/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
Expand All @@ -50,8 +50,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand All @@ -64,21 +64,22 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
Expand Down
13 changes: 8 additions & 5 deletions rest/example/options/snapshots-options-chain/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ func main() {
c := polygon.New(os.Getenv("POLYGON_API_KEY"))

// set params
params := &models.ListOptionsChainParams{
UnderlyingAsset: "AAPL",
}

// make request
params := models.ListOptionsChainParams{
UnderlyingAsset: "SPY",
StrikePriceGTE: new(float64),
StrikePriceLTE: new(float64),
Limit: new(int),
}.WithStrikePrice("gte", 500.00).WithStrikePrice("lte", 600.00).WithLimit(250)

// make the request
iter := c.ListOptionsChainSnapshot(context.Background(), params)

// do something with the result
Expand Down
34 changes: 34 additions & 0 deletions rest/example/stocks/related-companies/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Stocks - Related Companies
// https://polygon.io/docs/stocks/get_v1_related-companies__ticker
// https://github.com/polygon-io/client-go/blob/master/rest/reference.go
package main

import (
"context"
"log"
"os"

polygon "github.com/polygon-io/client-go/rest"
"github.com/polygon-io/client-go/rest/models"
)

func main() {

// init client
c := polygon.New(os.Getenv("POLYGON_API_KEY"))

// set params
params := models.GetTickerRelatedCompaniesParams{
Ticker: "AAPL",
}

// make request
res, err := c.GetTickerRelatedCompanies(context.Background(), &params)
if err != nil {
log.Fatal(err)
}

// do something with the result
log.Print(res)

}
16 changes: 16 additions & 0 deletions rest/models/dividends.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ func (p ListDividendsParams) WithDeclarationDate(c Comparator, q Date) *ListDivi
return &p
}

func (p ListDividendsParams) WithPayDate(c Comparator, q Date) *ListDividendsParams {
switch c {
case EQ:
p.PayDateEQ = &q
case LT:
p.PayDateLT = &q
case LTE:
p.PayDateLTE = &q
case GT:
p.PayDateGT = &q
case GTE:
p.PayDateGTE = &q
}
return &p
}

func (p ListDividendsParams) WithFrequency(q Frequency) *ListDividendsParams {
p.Frequency = &q
return &p
Expand Down
10 changes: 10 additions & 0 deletions rest/models/dividends_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ func TestListDividendsParams(t *testing.T) {
DeclarationDateLTE: &date,
DeclarationDateGT: &date,
DeclarationDateGTE: &date,
PayDateEQ: &date,
PayDateLT: &date,
PayDateLTE: &date,
PayDateGT: &date,
PayDateGTE: &date,
CashAmountEQ: &cash,
CashAmountLT: &cash,
CashAmountLTE: &cash,
Expand Down Expand Up @@ -59,6 +64,11 @@ func TestListDividendsParams(t *testing.T) {
WithDeclarationDate(models.LTE, date).
WithDeclarationDate(models.GT, date).
WithDeclarationDate(models.GTE, date).
WithPayDate(models.EQ, date).
WithPayDate(models.LT, date).
WithPayDate(models.LTE, date).
WithPayDate(models.GT, date).
WithPayDate(models.GTE, date).
WithCashAmount(models.EQ, cash).
WithCashAmount(models.LT, cash).
WithCashAmount(models.LTE, cash).
Expand Down
19 changes: 17 additions & 2 deletions rest/models/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,23 @@ type ListOptionsChainParams struct {
}

// WithStrikePrice sets strike price to params. Strike Price is the price at which a put or call option can be exercised.
func (o ListOptionsChainParams) WithStrikePrice(strikePrice float64) *ListOptionsChainParams {
o.StrikePrice = &strikePrice
// comparator options include EQ, LT, LTE, GT, and GTE.
// expirationDate should be in YYYY-MM-DD format
func (o ListOptionsChainParams) WithStrikePrice(comparator Comparator, strikePrice float64) *ListOptionsChainParams {
switch comparator {
case EQ:
o.StrikePrice = &strikePrice
case LT:
o.StrikePriceLT = &strikePrice
case LTE:
o.StrikePriceLTE = &strikePrice
case GT:
o.StrikePriceGT = &strikePrice
case GTE:
o.StrikePriceGTE = &strikePrice
default:
o.StrikePrice = &strikePrice
}
return &o
}

Expand Down
10 changes: 9 additions & 1 deletion rest/models/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func TestListOptionsChainParams(t *testing.T) {
order := models.Asc
expect := models.ListOptionsChainParams{
StrikePrice: &strikePrice,
StrikePriceLT: &strikePrice,
StrikePriceLTE: &strikePrice,
StrikePriceGT: &strikePrice,
StrikePriceGTE: &strikePrice,
ContractType: &contractType,
ExpirationDateEQ: &date,
ExpirationDateLT: &date,
Expand All @@ -75,7 +79,11 @@ func TestListOptionsChainParams(t *testing.T) {
Order: &order,
}
actual := models.ListOptionsChainParams{}.
WithStrikePrice(strikePrice).
WithStrikePrice(models.EQ, strikePrice).
WithStrikePrice(models.LT, strikePrice).
WithStrikePrice(models.LTE, strikePrice).
WithStrikePrice(models.GT, strikePrice).
WithStrikePrice(models.GTE, strikePrice).
WithContractType(contractType).
WithExpirationDate(models.EQ, date).
WithExpirationDate(models.LT, date).
Expand Down
49 changes: 38 additions & 11 deletions rest/models/tickers.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,20 @@ func (p ListTickerNewsParams) WithLimit(q int) *ListTickerNewsParams {
return &p
}

// GetTickerRelatedCompaniesParams is the set of parameters for the GetTickerRelatedCompanies method.
type GetTickerRelatedCompaniesParams struct {
// The ticker symbol of the asset.
Ticker string `validate:"required" path:"ticker"`
}

// GetTickerDetailsResponse is the response returned by the GetTickerRelatedCompanies method.
type GetTickerRelatedCompaniesResponse struct {
BaseResponse

// List if related tickers.
Results []RelatedCompany `json:"results,omitempty"`
}

// ListTickerNewsResponse is the response returned by the ListTickerNews method.
type ListTickerNewsResponse struct {
BaseResponse
Expand Down Expand Up @@ -322,17 +336,25 @@ type Branding struct {

// TickerNews contains information on a ticker news article.
type TickerNews struct {
AMPURL string `json:"amp_url,omitempty"`
ArticleURL string `json:"article_url,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
ID string `json:"id,omitempty"`
ImageURL string `json:"image_url,omitempty"`
Keywords []string `json:"keywords,omitempty"`
PublishedUTC Time `json:"published_utc,omitempty"`
Publisher Publisher `json:"publisher,omitempty"`
Tickers []string `json:"tickers,omitempty"`
Title string `json:"title,omitempty"`
AMPURL string `json:"amp_url,omitempty"`
ArticleURL string `json:"article_url,omitempty"`
Author string `json:"author,omitempty"`
Description string `json:"description,omitempty"`
ID string `json:"id,omitempty"`
ImageURL string `json:"image_url,omitempty"`
Insights []Insights `json:"insights"`
Keywords []string `json:"keywords,omitempty"`
PublishedUTC Time `json:"published_utc,omitempty"`
Publisher Publisher `json:"publisher,omitempty"`
Tickers []string `json:"tickers,omitempty"`
Title string `json:"title,omitempty"`
}

// Insights contains sentiment, reasoning, and the ticker symbol associated with the insight.
type Insights struct {
Ticker string `json:"ticker"`
Sentiment string `json:"sentiment"`
SentimentReasoning string `json:"sentiment_reasoning"`
}

// Publisher contains information on a new article publisher.
Expand All @@ -343,6 +365,11 @@ type Publisher struct {
Name string `json:"name,omitempty"`
}

// RelatedCompany represents a related ticker based on news or sec filings.
type RelatedCompany struct {
Ticker string `json:"ticker,omitempty"`
}

// TickerType represents a type of ticker with a code that the API understands.
type TickerType struct {
AssetClass string `json:"asset_class,omitempty"`
Expand Down
Loading

0 comments on commit 7f6e099

Please sign in to comment.