models

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountAsset

type AccountAsset struct {
	Coin           string          `json:"coin"`
	Available      decimal.Decimal `json:"available"`
	Frozen         decimal.Decimal `json:"frozen"`
	Locked         decimal.Decimal `json:"locked"`
	LimitAvailable decimal.Decimal `json:"limitAvailable"`
	UTime          string          `json:"uTime"`
}

type AccountBalance

type AccountBalance struct {
	AccountType string `json:"accountType"`
	BalanceUSDT string `json:"usdtBalance"`
}

type CoinChainInformation

type CoinChainInformation struct {
	Chain             string          `json:"chain"`
	NeedTag           bool            `json:"needTag,string"`
	Withdrawable      bool            `json:"withdrawable,string"`
	Rechargeable      bool            `json:"rechargeable,string"`
	WithdrawFee       decimal.Decimal `json:"withdrawFee"`
	ExtraWithdrawFee  decimal.Decimal `json:"extraWithdrawFee"`
	DepositConfirm    decimal.Decimal `json:"depositConfirm"`
	WithdrawConfirm   decimal.Decimal `json:"withdrawConfirm"`
	MinDepositAmount  decimal.Decimal `json:"minDepositAmount"`
	MinWithdrawAmount decimal.Decimal `json:"minWithdrawAmount"`
	BrowserURL        string          `json:"browserUrl"`
	ContractAddress   string          `json:"contractAddress"`
	WithdrawStep      decimal.Decimal `json:"withdrawStep"`
	WithdrawMinScale  decimal.Decimal `json:"withdrawMinScale"`
	Congestion        string          `json:"congestion"`
}

type CoinInformation

type CoinInformation struct {
	CoinID   string                 `json:"coinId"`
	Coin     string                 `json:"coin"`
	Transfer bool                   `json:"transfer,string"`
	Chains   []CoinChainInformation `json:"chains"`
}

type DepositAddress

type DepositAddress struct {
	Address string `json:"address"`
	Chain   string `json:"chain"`
	Coin    string `json:"coin"`
	Tag     string `json:"tag,omitempty"`
	URL     string `json:"url,omitempty"`
}

type DepositRecord

type DepositRecord struct {
	OrderID  string  `json:"orderId"`
	TradeID  string  `json:"tradeId"`
	Coin     string  `json:"coin"`
	Type     string  `json:"type"`
	Size     float64 `json:"size,string"`
	Status   string  `json:"status"`
	ToAddr   string  `json:"toAddress"`
	Dest     string  `json:"dest"`
	Chain    string  `json:"chain"`
	FromAddr string  `json:"fromAddress"`
	CTime    int64   `json:"cTime,string"`
	UTime    int64   `json:"uTime,string"`
}

type OrderInformation

type OrderInformation struct {
	UserID           string          `json:"userId"`
	Symbol           string          `json:"symbol"`
	OrderID          string          `json:"orderId"`
	ClientOID        string          `json:"clientOid"`
	Price            decimal.Decimal `json:"price"`
	Size             decimal.Decimal `json:"size"`
	OrderType        OrderType       `json:"orderType"`
	Side             string          `json:"side"`
	Status           OrderStatus     `json:"status"`
	PriceAvg         decimal.Decimal `json:"priceAvg"`
	BaseVolume       decimal.Decimal `json:"baseVolume"`
	QuoteVolume      decimal.Decimal `json:"quoteVolume"`
	EnterPointSource string          `json:"enterPointSource"`
	FeeDetail        string          `json:"feeDetail"`
	OrderSource      string          `json:"orderSource"`
	CancelReason     string          `json:"cancelReason,omitempty"`
	CTime            int             `json:"cTime,string"`
	UTime            int             `json:"uTime,string"`
}

type OrderSide

type OrderSide string
const (
	OrderSideBuy  OrderSide = "buy"
	OrderSideSell OrderSide = "sell"
)

func (OrderSide) String

func (o OrderSide) String() string

type OrderStatus

type OrderStatus string
const (
	OrderStatusLive            OrderStatus = "live"
	OrderStatusPartiallyFilled OrderStatus = "partially_filled"
	OrderStatusFilled          OrderStatus = "filled"
	OrderStatusCanceled        OrderStatus = "canceled"
)

func (OrderStatus) String

func (o OrderStatus) String() string

type OrderType

type OrderType string
const (
	OrderTypeLimit  OrderType = "limit"
	OrderTypeMarket OrderType = "market"
)

func (OrderType) String

func (o OrderType) String() string

type PlacedOrder

type PlacedOrder struct {
	OrderID   string `json:"orderId,omitempty"`
	ClientOID string `json:"clientOid,omitempty"`
}

type ServerTime

type ServerTime struct {
	ServerTime int64 `json:"server_time,string"`
}

type SymbolInformation

type SymbolInformation struct {
	Symbol            string          `json:"symbol"`
	BaseCoin          string          `json:"baseCoin"`
	QuoteCoin         string          `json:"quoteCoin"`
	MinTradeAmount    decimal.Decimal `json:"minTradeAmount"`
	MaxTradeAmount    decimal.Decimal `json:"maxTradeAmount"`
	TakerFeeRate      decimal.Decimal `json:"takerFeeRate"`
	MakerFeeRate      decimal.Decimal `json:"makerFeeRate"`
	PricePrecision    int             `json:"pricePrecision,string"`
	QuantityPrecision int             `json:"quantityPrecision,string"`
	QuotePrecision    int             `json:"quotePrecision,string"`
	MinTradeUSDT      decimal.Decimal `json:"minTradeUSDT"`
	Status            SymbolStatus    `json:"status"`
}

type SymbolStatus

type SymbolStatus string
const (
	SymbolStatusOnline  SymbolStatus = "online"
	SymbolStatusOffline SymbolStatus = "offline"
	SymbolStatusHalt    SymbolStatus = "halt"
	SymbolStatusGrey    SymbolStatus = "gray"
)

func (SymbolStatus) String

func (o SymbolStatus) String() string

type TickerInformation

type TickerInformation struct {
	Symbol       string          `json:"symbol"`
	High24h      decimal.Decimal `json:"high24h"`
	Open         decimal.Decimal `json:"open"`
	Low24h       decimal.Decimal `json:"low24h"`
	LastPr       decimal.Decimal `json:"lastPr"`
	QuoteVolume  decimal.Decimal `json:"quoteVolume"`
	BaseVolume   decimal.Decimal `json:"baseVolume"`
	UsdtVolume   decimal.Decimal `json:"usdtVolume"`
	BidPr        decimal.Decimal `json:"bidPr"`
	AskPr        decimal.Decimal `json:"askPr"`
	BidSz        decimal.Decimal `json:"bidSz"`
	AskSz        decimal.Decimal `json:"askSz"`
	OpenUtc      decimal.Decimal `json:"openUtc"`
	TS           int             `json:"ts,string"`
	ChangeUtc24h decimal.Decimal `json:"changeUtc24h"`
	Change24h    decimal.Decimal `json:"change24h"`
}

type TransferType

type TransferType string
const (
	TransferTypeOnChain  TransferType = "on_chain"
	TransferTypeInternal TransferType = "internal_transfer"
)

type Withdrawal

type Withdrawal struct {
	OrderID   string `json:"orderId"`
	ClientOid string `json:"clientOid"`
}

type WithdrawalRecord

type WithdrawalRecord struct {
	OrderID   string           `json:"orderId"`
	TradeID   string           `json:"tradeId"`
	Coin      string           `json:"coin"`
	Dest      string           `json:"dest"`
	ClientOid string           `json:"clientOid"`
	Type      string           `json:"type"`
	Tag       string           `json:"tag,omitempty"`
	Size      decimal.Decimal  `json:"size"`
	Fee       decimal.Decimal  `json:"fee"`
	Status    WithdrawalStatus `json:"status"`
	ToAddress string           `json:"toAddress"`
	FromAddr  string           `json:"fromAddress"`
	Confirm   int64            `json:"confirm,string"`
	Chain     string           `json:"chain"`
	CTime     int64            `json:"cTime,string"`
	UTime     int64            `json:"uTime,string"`
}

type WithdrawalStatus

type WithdrawalStatus string
const (
	WithdrawalStatusFailed  WithdrawalStatus = "failed"
	WithdrawalStatusSuccess WithdrawalStatus = "success"
	WithdrawalStatusPending WithdrawalStatus = "pending"
)

func (WithdrawalStatus) String

func (o WithdrawalStatus) String() string

Jump to

Keyboard shortcuts

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