Documentation ¶
Index ¶
- type Board
- type Book
- type Chat
- type Client
- type Comment
- type Execution
- type Executions
- type Fr
- type Helth
- type LeverageC
- type Market
- type Markets
- type ResponseForBoard
- type ResponseForChat
- type ResponseForExecutions
- type ResponseForFr
- type ResponseForHelth
- type ResponseForLeverageC
- type ResponseForMarkets
- type ResponseForStatus
- type ResponseForTicker
- type SortedBook
- type SortedBooks
- type Status
- type Ticker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 (*Execution) ToDate ¶
ToDate changed time from order_id Values that appear to be milliseconds below seconds are likely to be random numbers.
func (*Execution) ToUniqueID ¶
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 ResponseForBoard ¶
type ResponseForChat ¶
type ResponseForChat []Comment
type ResponseForExecutions ¶
type ResponseForExecutions []Execution
type ResponseForFr ¶
type ResponseForFr struct { CurrentFundingRate float64 `json:"current_funding_rate"` NextFundingRateSettledate time.Time `json:"next_funding_rate_settledate"` }
func (*ResponseForFr) UnmarshalJSON ¶
func (res *ResponseForFr) UnmarshalJSON(b []byte) error
custom perse to time.Time "next_funding_rate_settledate": "2024-04-15T13:00:00" parsing time "2024-03-30T13:00:00" as "2006-01-02T15:04:05Z07:00": cannot parse "" as "Z07:00"
type ResponseForHelth ¶
type ResponseForHelth struct {
Status string `json:"status"`
}
type ResponseForLeverageC ¶
type ResponseForLeverageC struct { CurrentMax float64 `json:"current_max"` CurrentStartdate time.Time `json:"current_startdate"` NextMax float64 `json:"next_max"` NextStartdate time.Time `json:"next_startdate"` }
func (*ResponseForLeverageC) UnmarshalJSON ¶
func (res *ResponseForLeverageC) UnmarshalJSON(b []byte) error
type ResponseForMarkets ¶
type ResponseForMarkets []Market
type ResponseForStatus ¶
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
Click to show internal directories.
Click to hide internal directories.