api

package
v4.1.23 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TradePrefix = "IT."
	BookPrefix  = "ID."
)

Variables

View Source
var (
	NY, _ = time.LoadLocation("America/New_York")
)

Functions

func SetAPIKey

func SetAPIKey(key string)

func SetBaseURL

func SetBaseURL(url string)

func Stream

func Stream(handler func(m []byte), prefix string, symbols []string) (err error)

Stream from the polygon websocket server.

Types

type IEXL2

type IEXL2 struct {
	Event       string      `json:"ev"`
	Symbol      string      `json:"S"`
	Bids        [][]float64 `json:"b"`
	Asks        [][]float64 `json:"a"`
	Exchange    uint8       `json:"x"`
	Timestamp   int64       `json:"t"`
	Nanoseconds int64       `json:"T"`
}

type IEXTrade

type IEXTrade struct {
	Event       string  `json:"ev"`
	Symbol      string  `json:"S"`
	ID          int64   `json:"i"`
	Exchange    uint8   `json:"x"`
	Size        uint32  `json:"s"`
	Conditions  []int   `json:"c"`
	Price       float64 `json:"p"`
	Timestamp   int64   `json:"t"`
	Nanoseconds int64   `json:"T"`
}

Jump to

Keyboard shortcuts

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