hidden

package
v0.0.0-...-df7f5f2 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
}

func New

func New() *Client

func (*Client) OHLCv

func (p *Client) OHLCv(req *RequestOHLCv) ([]OHLCv, error)

OHLCv descending-order byte timestamp UTC0:00 renew, count max: 720

func (*Client) Ranking

func (p *Client) Ranking(req *RequestRanking) (*Rankers, error)

type OHLCv

type OHLCv struct {
	O float64
	H float64
	L float64
	C float64
	V float64
	// Volume day
	Volume float64

	// for use your target
	// ex) y_target, profit...
	Y float64

	Timestamp time.Time
}

type Rankers

type Rankers struct {
	Volume []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"VOLUME"`
	DailyVolume []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"DAILY_VOLUME"`
	YesterdayVolume []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"YESTERDAY_VOLUME"`
	Spot []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"SPOT"`
	Fx []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"FX"`
	DailySpot []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"DAILY_SPOT"`
	DailyFx []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"DAILY_FX"`
	YesterdaySpot []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"YESTERDAY_SPOT"`
	YesterdayFx []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"YESTERDAY_FX"`
	NewMmPoint []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"NEW_MM_POINT"`
	NewMtPoint []struct {
		Nickname       string  `json:"nickname"`
		Volume         float64 `json:"volume"`
		NumberOfTrades int     `json:"number_of_trades"`
		CalculatedDate string  `json:"calculated_date"`
	} `json:"NEW_MT_POINT"`
}

type RequestOHLCv

type RequestOHLCv struct {
	Symbol string `url:"symbol,omitempty"`
	Period string `url:"period,omitempty"`
	// Count  int    `url:"count,omitempty"`
	// UnixMillisecond
	Before int64 `url:"before,omitempty"`
}

type RequestRanking

type RequestRanking struct {
	ContractRegion string `url:"contractRegion,omitempty"`
	Lang           string `url:"lang,omitempty"` // ja
	V              int    `url:"v,omitempty"`
}

Jump to

Keyboard shortcuts

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