types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountInfo

type AccountInfo struct {
	Id      int64  `json:"id"`
	Type    string `json:"type"`
	Subtype string `json:"subtype"`
	State   string `json:"state"`
}

type AccountValue

type AccountValue struct {
	Updated                  Updated                    `json:"updated,omitempty"`
	TodayProfitRate          string                     `json:"todayProfitRate,omitempty"`
	TotalBalance             string                     `json:"totalBalance,omitempty"`
	TodayProfit              string                     `json:"todayProfit,omitempty"`
	ProfitAccountBalanceList []ProfitAccountBalanceList `json:"profitAccountBalanceList,omitempty"`
}

type GetAccountInfoResponse

type GetAccountInfoResponse struct {
	Status string        `json:"status"`
	Data   []AccountInfo `json:"data"`
}

type GetAccountValuationParam

type GetAccountValuationParam struct {
	AccountType       string `url:"accountType,omitempty" validate:"omitempty"`
	ValuationCurrency string `url:"valuationCurrency,omitempty" validate:"omitempty"`
}

type GetAccountValuationParams

type GetAccountValuationParams struct {
	GetAccountValuationParam
	htxutils.DefaultAuthParam
}

type GetAccountValuationResp

type GetAccountValuationResp struct {
	htxutils.V2Response
	Data AccountValue `json:"data"`
}

type GetMergedMarketTickerParam

type GetMergedMarketTickerParam struct {
	Symbol string `url:"symbol" validate:"required"`
}

type GetMergedMarketTickerResp

type GetMergedMarketTickerResp struct {
	htxutils.V1Response
	Ts   int64 `json:"ts"`
	Tick Tick  `json:"tick,omitempty"`
}

type GetSymbolsParam

type GetSymbolsParam struct {
	Ts int64 `url:"ts,omitempty" validate:"omitempty"`
}

type GetSymbolsResp

type GetSymbolsResp struct {
	htxutils.V1Response
	Ts   string   `json:"ts"`
	Data []Symbol `json:"data,omitempty"`
}

type KlineInterval

type KlineInterval string
var (
	Minute1  KlineInterval = "1min"
	Minute5  KlineInterval = "5min"
	Minute15 KlineInterval = "15min"
	Minute30 KlineInterval = "30min"
	Minute60 KlineInterval = "60min"
	Hour4    KlineInterval = "4hour"
	Day1     KlineInterval = "1day"
	Month1   KlineInterval = "1mon"
	Week1    KlineInterval = "1week"
	Year1    KlineInterval = "1year"
)

type NewOrderParam

type NewOrderParam struct {
	AccountID        string `json:"account-id" validate:"required"`
	Symbol           string `json:"symbol" validate:"required"`
	Type             string `json:"type" validate:"required"`
	Amount           string `json:"amount" validate:"required"`
	Price            string `json:"price,omitempty" validate:"omitempty"`
	Source           string `json:"source,omitempty" validate:"omitempty"`
	ClientOrderID    string `json:"client-order-id,omitempty" validate:"omitempty"`
	SelfMatchPrevent int    `json:"self-match-prevent,omitempty" validate:"omitempty"`
	StopPrice        string `json:"stop-price,omitempty" validate:"omitempty"`
	Operator         string `json:"operator,omitempty" validate:"omitempty"`
}

type NewOrderResp

type NewOrderResp struct {
	htxutils.V1Response
	Data string `json:"data,omitempty"`
}

type ProfitAccountBalanceList

type ProfitAccountBalanceList struct {
	DistributionType string  `json:"distributionType,omitempty"`
	Balance          float64 `json:"balance,omitempty"`
	Success          bool    `json:"success,omitempty"`
	AccountBalance   string  `json:"accountBalance,omitempty"`
}

type Symbol

type Symbol struct {
	Sc          string `json:"sc,omitempty"`
	Dn          string `json:"dn,omitempty"`
	Bc          string `json:"bc,omitempty"`
	Bcdn        string `json:"bcdn,omitempty"`
	Qc          string `json:"qc,omitempty"`
	Qcdn        string `json:"qcdn,omitempty"`
	State       string `json:"state,omitempty"`
	Whe         bool   `json:"whe,omitempty"`
	Cd          bool   `json:"cd,omitempty"`
	Te          bool   `json:"te,omitempty"`
	Toa         int64  `json:"toa,omitempty"`
	Sp          string `json:"sp,omitempty"`
	W           int    `json:"w,omitempty"`
	Tpp         int    `json:"tpp,omitempty"`
	Tap         int    `json:"tap,omitempty"`
	Ttp         int    `json:"ttp,omitempty"`
	Fp          int    `json:"fp,omitempty"`
	SuspendDesc string `json:"suspend_desc,omitempty"`
	Tags        string `json:"tags,omitempty"`
	Lr          any    `json:"lr,omitempty"`
	Smlr        any    `json:"smlr,omitempty"`
	Flr         any    `json:"flr,omitempty"`
	Wr          string `json:"wr,omitempty"`
	D           any    `json:"d,omitempty"`
	Elr         any    `json:"elr,omitempty"`
	P           any    `json:"p,omitempty"`
}

type Tick

type Tick struct {
	ID      int64     `json:"id,omitempty"`
	Version int64     `json:"version,omitempty"`
	Open    float64   `json:"open,omitempty"`
	Close   float64   `json:"close,omitempty"`
	Low     float64   `json:"low,omitempty"`
	High    float64   `json:"high,omitempty"`
	Amount  float64   `json:"amount,omitempty"`
	Vol     float64   `json:"vol,omitempty"`
	Count   int       `json:"count,omitempty"`
	Bid     []float64 `json:"bid,omitempty"`
	Ask     []float64 `json:"ask,omitempty"`
}

type Updated

type Updated struct {
	Success bool  `json:"success,omitempty"`
	Time    int64 `json:"time,omitempty"`
}

Jump to

Keyboard shortcuts

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