public

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	ProductCode string `url:"product_code,omitempty"`
}

func (*Board) IsPrivate

func (req *Board) IsPrivate() bool

func (*Board) Method

func (req *Board) Method() string

func (*Board) Path

func (req *Board) Path() string

func (*Board) Payload

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

func (*Board) Query

func (req *Board) Query() string

type Book

type Book struct {
	Price float64 `json:"price"`
	Size  float64 `json:"size"`
}

type Chat

type Chat struct {
	FromDate time.Time `url:"from_date,omitempty"`
}

func (*Chat) IsPrivate

func (req *Chat) IsPrivate() bool

func (*Chat) Method

func (req *Chat) Method() string

func (*Chat) Path

func (req *Chat) Path() string

func (*Chat) Payload

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

func (*Chat) Query

func (req *Chat) Query() string

type Client

type Client struct {
}

type Comment

type Comment struct {
	Nickname string `json:"nickname"`
	Message  string `json:"message"`
	Date     string `json:"date"`
}

type Execution

type Execution struct {
	ID                         int64   `json:"id"`
	Side                       string  `json:"side"`
	Price                      float64 `json:"price"`
	Size                       float64 `json:"size"`
	ExecDate                   string  `json:"exec_date"`
	BuyChildOrderAcceptanceID  string  `json:"buy_child_order_acceptance_id"`
	SellChildOrderAcceptanceID string  `json:"sell_child_order_acceptance_id"`
}

func (*Execution) IsLiquidation

func (p *Execution) IsLiquidation() bool

func (*Execution) ToDate

func (p *Execution) ToDate() []time.Time

ToDate changed time from order_id Values that appear to be milliseconds below seconds are likely to be random numbers.

func (*Execution) ToUniqueID

func (p *Execution) ToUniqueID() string

ToUniqueID create uid: `buyXXX_sellXXX` Buy or Sell oneside ID does not make Execition unique id.

type Executions

type Executions struct {
	ProductCode string `url:"product_code,omitempty"`
	// MAX 過去 31 日分
	Count  int   `url:"count,omitempty"`
	Before int64 `url:"before,omitempty"`
	After  int64 `url:"after,omitempty"`
}

func (*Executions) IsPrivate

func (req *Executions) IsPrivate() bool

func (*Executions) Method

func (req *Executions) Method() string

func (*Executions) Path

func (req *Executions) Path() string

func (*Executions) Payload

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

func (*Executions) Query

func (req *Executions) Query() string

type Helth

type Helth struct {
	ProductCode string `url:"product_code,omitempty"`
}

func (*Helth) IsPrivate

func (req *Helth) IsPrivate() bool

func (*Helth) Method

func (req *Helth) Method() string

func (*Helth) Path

func (req *Helth) Path() string

func (*Helth) Payload

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

func (*Helth) Query

func (req *Helth) Query() string

type LeverageC

type LeverageC struct {
}

func (*LeverageC) IsPrivate

func (req *LeverageC) IsPrivate() bool

func (*LeverageC) Method

func (req *LeverageC) Method() string

func (*LeverageC) Path

func (req *LeverageC) Path() string

func (*LeverageC) Payload

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

func (*LeverageC) Query

func (req *LeverageC) Query() string

type Market

type Market struct {
	ProductCode string `json:"product_code"`
	MarketType  string `json:"market_type"`
}

type Markets

type Markets struct {
}

func (*Markets) IsPrivate

func (req *Markets) IsPrivate() bool

func (*Markets) Method

func (req *Markets) Method() string

func (*Markets) Path

func (req *Markets) Path() string

func (*Markets) Payload

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

func (*Markets) Query

func (req *Markets) Query() string

type ResponseForBoard

type ResponseForBoard struct {
	MidPrice float64 `json:"mid_price"`
	Bids     []Book  `json:"bids"`
	Asks     []Book  `json:"asks"`
}

type ResponseForChat

type ResponseForChat []Comment

type ResponseForExecutions

type ResponseForExecutions []Execution

type ResponseForHelth

type ResponseForHelth struct {
	Status string `json:"status"`
}

type ResponseForLeverageC

type ResponseForLeverageC struct {
	CurrentMax       float64 `json:"current_max"`
	CurrentStartdate string  `json:"current_startdate"`
	NextMax          float64 `json:"next_max"`
	NextStartdate    string  `json:"next_startdate"`
}

type ResponseForMarkets

type ResponseForMarkets []Market

type ResponseForStatus

type ResponseForStatus struct {
	Health string `json:"health"`
	State  string `json:"state"`
	Data   struct {
		SpecialQuotation int `json:"special_quotation,omitempty"`
	} `json:"data,omitempty"`
}

type ResponseForTicker

type ResponseForTicker struct {
	ProductCode     string  `json:"product_code"`
	State           string  `json:"state"`
	Timestamp       string  `json:"timestamp"`
	TickID          int64   `json:"tick_id"`
	BestBid         float64 `json:"best_bid"`
	BestAsk         float64 `json:"best_ask"`
	BestBidSize     float64 `json:"best_bid_size"`
	BestAskSize     float64 `json:"best_ask_size"`
	TotalBidDepth   float64 `json:"total_bid_depth"`
	TotalAskDepth   float64 `json:"total_ask_depth"`
	MarketBidSize   float64 `json:"market_bid_size"`
	MarketAskSize   float64 `json:"market_ask_size"`
	Ltp             float64 `json:"ltp"`
	Volume          float64 `json:"volume"`
	VolumeByProduct float64 `json:"volume_by_product"`
	PreopenEnd      string  `json:"preopen_end"`
	CircuitBreakEnd string  `json:"circuit_break_end"`
}

type SortedBook

type SortedBook struct {
	sync.RWMutex

	*treebidimap.Map
}

func (*SortedBook) GetVolume

func (p *SortedBook) GetVolume(price float64) (size float64)

func (*SortedBook) Set

func (p *SortedBook) Set(books []Book)

func (*SortedBook) Sort

func (p *SortedBook) Sort(ascending bool) []Book

Sort : limitdepth is book length

type SortedBooks

type SortedBooks struct {
	MidPrice float64
	Asks     SortedBook
	Bids     SortedBook
}

func NewSortedBooks

func NewSortedBooks() *SortedBooks

type Status

type Status struct {
	ProductCode string `url:"product_code,omitempty"`
}

func (*Status) IsPrivate

func (req *Status) IsPrivate() bool

func (*Status) Method

func (req *Status) Method() string

func (*Status) Path

func (req *Status) Path() string

func (*Status) Payload

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

func (*Status) Query

func (req *Status) Query() string

type Ticker

type Ticker struct {
	ProductCode string `url:"product_code,omitempty"`
}

func (*Ticker) IsPrivate

func (req *Ticker) IsPrivate() bool

func (*Ticker) Method

func (req *Ticker) Method() string

func (*Ticker) Path

func (req *Ticker) Path() string

func (*Ticker) Payload

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

func (*Ticker) Query

func (req *Ticker) Query() string

Jump to

Keyboard shortcuts

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