futures

package
v0.0.0-...-8b5824e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 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 ByDate

type ByDate []Rate

func (ByDate) Len

func (a ByDate) Len() int

func (ByDate) Less

func (a ByDate) Less(i, j int) bool

func (ByDate) Swap

func (a ByDate) Swap(i, j int)

type Future

type Future struct {
	Type       string `json:"type"`
	Name       string `json:"name"`
	Underlying string `json:"underlying"`

	Index     float64 `json:"index"`
	Last      float64 `json:"last"`
	Mark      float64 `json:"mark"`
	Ask       float64 `json:"ask"`
	Bid       float64 `json:"bid"`
	Change1H  float64 `json:"change1h"`
	Change24H float64 `json:"change24h"`

	PriceIncrement float64 `json:"priceIncrement"`
	SizeIncrement  float64 `json:"sizeIncrement"`

	UpperBound float64 `json:"upperBound"`
	LowerBound float64 `json:"lowerBound"`

	Description string    `json:"description"`
	Expiry      time.Time `json:"expiry"`
	Enabled     bool      `json:"enabled"`
	Expired     bool      `json:"expired"`
	Perpetual   bool      `json:"perpetual"`
	PostOnly    bool      `json:"postOnly"`
}

type FutureForList

type FutureForList struct {
	Type       string `json:"type"`
	Name       string `json:"name"`
	Underlying string `json:"underlying"`

	Index        float64 `json:"index"`
	Mark         float64 `json:"mark"`
	Last         float64 `json:"last"`
	Ask          float64 `json:"ask"`
	Bid          float64 `json:"bid"`
	Change1H     float64 `json:"change1h"`
	Change24H    float64 `json:"change24h"`
	ChangeBod    float64 `json:"changeBod"`
	Volume       float64 `json:"volume"`
	VolumeUsd24H float64 `json:"volumeUsd24h"`

	PriceIncrement float64 `json:"priceIncrement"`
	SizeIncrement  float64 `json:"sizeIncrement"`

	UpperBound float64 `json:"upperBound"`
	LowerBound float64 `json:"lowerBound"`

	Description string    `json:"description"`
	Expiry      time.Time `json:"expiry"`
	Enabled     bool      `json:"enabled"`
	Expired     bool      `json:"expired"`
	Perpetual   bool      `json:"perpetual"`
	PostOnly    bool      `json:"postOnly"`
}

type Rate

type Rate struct {
	Future string    `json:"future"`
	Rate   float64   `json:"rate"`
	Time   time.Time `json:"time"`
}

type RequestForFuture

type RequestForFuture struct {
	ProductCode string `url:"-"`
}

func (*RequestForFuture) Method

func (req *RequestForFuture) Method() string

func (*RequestForFuture) Path

func (req *RequestForFuture) Path() string

func (*RequestForFuture) Payload

func (req *RequestForFuture) Payload() []byte

func (*RequestForFuture) Query

func (req *RequestForFuture) Query() string

type RequestForFutures

type RequestForFutures struct {
}

func (*RequestForFutures) Method

func (req *RequestForFutures) Method() string

func (*RequestForFutures) Path

func (req *RequestForFutures) Path() string

func (*RequestForFutures) Payload

func (req *RequestForFutures) Payload() []byte

func (*RequestForFutures) Query

func (req *RequestForFutures) Query() string

type RequestForRates

type RequestForRates struct {
	ProductCode string `url:"future,omitempty"`
	Start       int64  `url:"start_time,omitempty"`
	End         int64  `url:"end,_time omitempty"`
}

func (*RequestForRates) Method

func (req *RequestForRates) Method() string

func (*RequestForRates) Payload

func (req *RequestForRates) Payload() []byte

func (*RequestForRates) Query

func (req *RequestForRates) Query() string

type RequestForStats

type RequestForStats struct {
	ProductCode string `url:"-"`
}

func (*RequestForStats) Method

func (req *RequestForStats) Method() string

func (*RequestForStats) Path

func (req *RequestForStats) Path() string

func (*RequestForStats) Payload

func (req *RequestForStats) Payload() []byte

func (*RequestForStats) Query

func (req *RequestForStats) Query() string

type ResponseForFuture

type ResponseForFuture Future

type ResponseForFutures

type ResponseForFutures []FutureForList

func (ResponseForFutures) Len

func (a ResponseForFutures) Len() int

Sort by alphabetical order (by Name)

func (ResponseForFutures) Less

func (a ResponseForFutures) Less(i, j int) bool

func (ResponseForFutures) Products

func (futures ResponseForFutures) Products() []string

func (ResponseForFutures) Swap

func (a ResponseForFutures) Swap(i, j int)

type ResponseForRates

type ResponseForRates []Rate

func (ResponseForRates) Len

func (a ResponseForRates) Len() int

func (ResponseForRates) Less

func (a ResponseForRates) Less(i, j int) bool

func (ResponseForRates) Swap

func (a ResponseForRates) Swap(i, j int)

type ResponseForStats

type ResponseForStats Stats

type Stats

type Stats struct {
	Name                     string  `json:"name,omitempty"`
	Volume                   float64 `json:"volume"`
	NextFundingRate          float64 `json:"nextFundingRate"`
	ExpirationPrice          float64 `json:"expirationPrice"`
	PredictedExpirationPrice float64 `json:"predictedExpirationPrice"`
	StrikePrice              float64 `json:"strikePrice"`
	OpenInterest             float64 `json:"openInterest"`

	NextFundingTime time.Time `json:"nextFundingTime"`
}

type StatsList

type StatsList []Stats

func (StatsList) Len

func (a StatsList) Len() int

func (StatsList) Less

func (a StatsList) Less(i, j int) bool

func (StatsList) Swap

func (a StatsList) Swap(i, j int)

Jump to

Keyboard shortcuts

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