products

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 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 GranularityType

type GranularityType string
const (
	UNKNOWN_GRANULARITY_TYPE GranularityType = "UNKNOWN_GRANULARITY"
	ONE_MINUTE_TYPE          GranularityType = "ONE_MINUTE"
	FIVE_MINUTE_TYPE         GranularityType = "FIVE_MINUTE"
	FIFTEEN_MINUTE_TYPE      GranularityType = "FIFTEEN_MINUTE"
	THIRTY_MINUTE_TYPE       GranularityType = "THIRTY_MINUTE"
	ONE_HOUR_TYPE            GranularityType = "ONE_HOUR"
	TWO_HOUR_TYPE            GranularityType = "TWO_HOUR"
	SIX_HOUR_TYPE            GranularityType = "SIX_HOUR"
	ONE_DAY_TYPE             GranularityType = "ONE_DAY"
)

type Product

type Product struct {
	ProductID                 string `json:"product_id"`
	Price                     string `json:"price"`
	PricePercentageChange24H  string `json:"price_percentage_change_24h"`
	Volume24H                 string `json:"volume_24h"`
	VolumePercentageChange24H string `json:"volume_percentage_change_24h"`
	BaseIncrement             string `json:"base_increment"`
	QuoteIncrement            string `json:"quote_increment"`
	QuoteMinSize              string `json:"quote_min_size"`
	QuoteMaxSize              string `json:"quote_max_size"`
	BaseMinSize               string `json:"base_min_size"`
	BaseMaxSize               string `json:"base_max_size"`
	BaseName                  string `json:"base_name"`
	QuoteName                 string `json:"quote_name"`
	Watched                   bool   `json:"watched"`
	Isdisabled                bool   `json:"is_disabled"`
	New                       bool   `json:"new"`
	Status                    string `json:"status"`
	CancelOnly                bool   `json:"cancel_only"`
	LimitOnly                 bool   `json:"limit_only"`
	PostOnly                  bool   `json:"post_only"`
	TradingDisabled           bool   `json:"trading_disabled"`
	AuctionMode               bool   `json:"auction_mode"`
	ProductType               string `json:"product_type"`
	QuoteCurrencyID           string `json:"quote_currency_id"`
	BaseCurrencyID            string `json:"base_currency_id"`
	MidMarketPrice            string `json:"mid_market_price"`
}

type ProductCandles

type ProductCandles struct {
	Start  string `json:"start"`
	Low    string `json:"low"`
	High   string `json:"high"`
	Open   string `json:"open"`
	Close  string `json:"close"`
	Volume string `json:"volume"`
}

type ProductTicker

type ProductTicker struct {
	TradeID   string          `json:"trade_id"`
	ProductID string          `json:"product_id"`
	Price     string          `json:"price"`
	Size      string          `json:"size"`
	Time      time.Time       `json:"time"`
	Volume    string          `json:"volume"`
	Side      order.OrderSide `json:"side"`
	Bid       string          `json:"bid"`
	Ask       string          `json:"ask"`
}

type ProductType

type ProductType string
const (
	SPOT_TYPE ProductType = "SPOT"
)

type RequestForGetMarketTrades

type RequestForGetMarketTrades struct {
	ProductID string `url:"-"`
	Limit     int32  `url:"limit"`
}

func (*RequestForGetMarketTrades) Method

func (req *RequestForGetMarketTrades) Method() string

func (*RequestForGetMarketTrades) Path

func (req *RequestForGetMarketTrades) Path() string

func (*RequestForGetMarketTrades) Payload

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

func (*RequestForGetMarketTrades) Query

func (req *RequestForGetMarketTrades) Query() string

type RequestForGetProduct

type RequestForGetProduct struct {
	ProductID string
}

func (*RequestForGetProduct) Method

func (req *RequestForGetProduct) Method() string

func (*RequestForGetProduct) Path

func (req *RequestForGetProduct) Path() string

func (*RequestForGetProduct) Payload

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

func (*RequestForGetProduct) Query

func (req *RequestForGetProduct) Query() string

type RequestForGetProductCandles

type RequestForGetProductCandles struct {
	ProductID   string          `url:"-"`
	Start       string          `url:"start"`
	End         string          `url:"end"`
	Granularity GranularityType `url:"granularity"`
}

func (*RequestForGetProductCandles) Method

func (req *RequestForGetProductCandles) Method() string

func (*RequestForGetProductCandles) Path

func (req *RequestForGetProductCandles) Path() string

func (*RequestForGetProductCandles) Payload

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

func (*RequestForGetProductCandles) Query

func (req *RequestForGetProductCandles) Query() string

type RequestForListProducts

type RequestForListProducts struct {
	Limit       int32       `url:"limit,omitempty"`
	Offset      int32       `url:"offset,omitempty"`
	ProductType ProductType `url:"product_type,omitempty"`
}

func (*RequestForListProducts) Method

func (req *RequestForListProducts) Method() string

func (*RequestForListProducts) Path

func (req *RequestForListProducts) Path() string

func (*RequestForListProducts) Payload

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

func (*RequestForListProducts) Query

func (req *RequestForListProducts) Query() string

type ResponseForGetMarketTrades

type ResponseForGetMarketTrades struct {
	Trades []ProductTicker `json:"trades"`
}

type ResponseForGetProduct

type ResponseForGetProduct struct {
	Product
}

type ResponseForGetProductCandles

type ResponseForGetProductCandles struct {
	Candles []ProductCandles `json:"candles"`
}

type ResponseForListProducts

type ResponseForListProducts struct {
	Products    []Product `json:"products"`
	NumProducts int32     `json:"num_products"`
}

Jump to

Keyboard shortcuts

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