account

package
v0.0.0-...-51ae4f4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MyBalance

func MyBalance() (api.IRequest, api.IResponse)

func NewGetAccountPositionRisk

func NewGetAccountPositionRisk(param *GetAccountPositionRiskParam) (api.IRequest, api.IResponse)

func NewGetBalance

func NewGetBalance(param *GetBalanceParam) (api.IRequest, api.IResponse)

func NewGetBills

func NewGetBills(param *GetBillsParam) (api.IRequest, api.IResponse)

func NewGetBillsArchive

func NewGetBillsArchive(param *GetBillsParam) (api.IRequest, api.IResponse)

func NewGetConfig

func NewGetConfig() (api.IRequest, api.IResponse)

func NewGetInterestRate

func NewGetInterestRate(param *GetInterestRateParam) (api.IRequest, api.IResponse)

func NewGetLeverageInfo

func NewGetLeverageInfo(param *GetLeverageInfoParam) (api.IRequest, api.IResponse)

func NewGetMaxAvailSize

func NewGetMaxAvailSize(param *GetMaxAvailSizeParam) (api.IRequest, api.IResponse)

func NewGetMaxLoan

func NewGetMaxLoan(param *GetMaxLoanParam) (api.IRequest, api.IResponse)

func NewGetMaxSize

func NewGetMaxSize(param *GetMaxSizeParam) (api.IRequest, api.IResponse)

func NewGetPositions

func NewGetPositions(param *GetPositionsParam) (api.IRequest, api.IResponse)

func NewGetTradeFee

func NewGetTradeFee(param *GetTradeFeeParam) (api.IRequest, api.IResponse)

func NewPostPositionMarginBalance

func NewPostPositionMarginBalance(param *PostPositionMarginBalanceParam) (api.IRequest, api.IResponse)

func NewPostSetLeverage

func NewPostSetLeverage(param *PostSetLeverageParam) (api.IRequest, api.IResponse)

func NewPostSetPositionMode

func NewPostSetPositionMode(param *PostSetPositionModeParam) (api.IRequest, api.IResponse)

Types

type AccountPositionRisk

type AccountPositionRisk struct {
	Ts      int64     `json:"ts,string"`
	AdjEq   string    `json:"adjEq"`
	BalData []BalData `json:"balData"`
	PosData []PosData `json:"posData"`
}

type BalData

type BalData struct {
	Ccy   string `json:"ccy"`
	Eq    string `json:"eq"`
	DisEq string `json:"disEq"`
}

type Balance

type Balance struct {
	AdjEq       string          `json:"adjEq"`
	Imr         string          `json:"imr"`
	IsoEq       string          `json:"isoEq"`
	MgnRatio    string          `json:"mgnRatio"`
	Mmr         string          `json:"mmr"`
	NotionalUsd string          `json:"notionalUsd"`
	OrdFroz     string          `json:"ordFroz"`
	TotalEq     string          `json:"totalEq"`
	UTime       int64           `json:"uTime,string"`
	Details     []BalanceDetail `json:"details"`
}

type BalanceDetail

type BalanceDetail struct {
	AvailBal      string `json:"availBal"`
	AvailEq       string `json:"availEq"`
	CashBal       string `json:"cashBal"`
	Ccy           string `json:"ccy"`
	CrossLiab     string `json:"crossLiab"`
	DisEq         string `json:"disEq"`
	Eq            string `json:"eq"`
	EqUsd         string `json:"eqUsd"`
	FrozenBal     string `json:"FrozenBal"`
	Interest      string `json:"interest"`
	IsoEq         string `json:"isoEq"`
	IsoLiab       string `json:"isoLiab"`
	IsoUpl        string `json:"isoUpl"`
	Liab          string `json:"liab"`
	MaxLoan       string `json:"maxLoan"`
	MgnRatio      string `json:"mgnRatio"`
	NotionalLever string `json:"notionalLever"`
	OrdFrozen     string `json:"ordFrozen"`
	StgyEq        string `json:"stgyEq"`
	Twap          string `json:"twap"`
	UTime         int64  `json:"uTime,string"`
	Upl           string `json:"upl"`
	UplLiab       string `json:"uplLiab"`
}

type Bills

type Bills struct {
	InstType  string `json:"instType"`
	BillId    string `json:"billId"`
	Type      string `json:"type"`
	SubType   string `json:"subType"`
	Ts        int64  `json:"ts,string"`
	BalChg    string `json:"balChg"`
	PosBalChg string `json:"posBalChg"`
	Bal       string `json:"bal"`
	PosBal    string `json:"posBal"`
	Sz        string `json:"sz"`
	Ccy       string `json:"ccy"`
	Pnl       string `json:"pnl"`
	Fee       string `json:"fee"`
	MgnMode   string `json:"mgnMode"`
	InstId    string `json:"instId"`
	OrdId     string `json:"ordId"`
	ExecType  string `json:"execType"`
	From      string `json:"from"`
	To        string `json:"to"`
	Notes     string `json:"notes"`
}

type Config

type Config struct {
	Uid        string `json:"uid"`
	AcctLv     string `json:"acctLv"`
	PosMode    string `json:"posMode"`
	AutoLoan   bool   `json:"autoLoan"`
	GreeksType string `json:"greeksType"`
	Level      string `json:"level"`
	LevelTmp   string `json:"levelTmp"`
	CtIsoMode  string `json:"ctIsoMode"`
	MgnIsoMode string `json:"mgnIsoMode"`
}

type GetAccountPositionRiskParam

type GetAccountPositionRiskParam struct {
	InstType string `url:"instType,omitempty"`
}

type GetAccountPositionRiskResponse

type GetAccountPositionRiskResponse struct {
	api.Response
	Data []AccountPositionRisk `json:"data"`
}

type GetBalanceParam

type GetBalanceParam struct {
	Ccy string `url:"ccy,omitempty"`
}

type GetBalanceResponse

type GetBalanceResponse struct {
	api.Response
	Data []Balance `json:"data"`
}

type GetBillsParam

type GetBillsParam struct {
	api.PagingParam
	InstType string `url:"instType,omitempty"`
	Ccy      string `url:"ccy,omitempty"`
	MgnMode  string `url:"mgnMode,omitempty"`
	CtType   string `url:"ctType,omitempty"`
	Type     string `url:"type,omitempty"`
	SubType  string `url:"subType,omitempty"`
}

type GetBillsResponse

type GetBillsResponse struct {
	api.Response
	Data []Bills `json:"data"`
}

type GetConfigResponse

type GetConfigResponse struct {
	api.Response
	Data []Config `json:"data"`
}

type GetInterestRateParam

type GetInterestRateParam struct {
	Ccy string `url:"ccy,omitempty"`
}

type GetInterestRateResponse

type GetInterestRateResponse struct {
	api.Response
	Data []InterestRate `json:"data"`
}

type GetLeverageInfoParam

type GetLeverageInfoParam struct {
	InstId  string `url:"instId"`
	MgnMode string `url:"mgnMode"`
}

type GetLeverageInfoResponse

type GetLeverageInfoResponse struct {
	api.Response
	Data []LeverageInfo `json:"data"`
}

type GetMaxAvailSizeParam

type GetMaxAvailSizeParam struct {
	InstId     string `url:"instId"`
	TdMode     string `url:"tdMode"`
	Ccy        string `url:"ccy,omitempty"`
	Px         string `url:"px,omitempty"`
	ReduceOnly string `url:"reduceOnly,omitempty"`
}

type GetMaxAvailSizeResponse

type GetMaxAvailSizeResponse struct {
	api.Response
	Data []MaxSize `json:"data"`
}

type GetMaxLoanParam

type GetMaxLoanParam struct {
	InstId  string `url:"instId"`
	MgnMode string `url:"mgnMode"`
	MgnCcy  string `url:"mgnCcy,omitempty"`
}

type GetMaxLoanResponse

type GetMaxLoanResponse struct {
	api.Response
	Data []MaxLoan `json:"data"`
}

type GetMaxSizeParam

type GetMaxSizeParam struct {
	InstId   string `url:"instId"`
	TdMode   string `url:"tdMode"`
	Ccy      string `url:"ccy,omitempty"`
	Px       string `url:"px,omitempty"`
	Leverage string `url:"leverage,omitempty"`
}

type GetMaxSizeResponse

type GetMaxSizeResponse struct {
	api.Response
	Data []MaxSize `json:"data"`
}

type GetPositionsParam

type GetPositionsParam struct {
	InstId   string `url:"instId,omitempty"`
	InstType string `url:"instType,omitempty"`
	PosId    string `url:"posId,omitempty"`
}

type GetPositionsResponse

type GetPositionsResponse struct {
	api.Response
	Data []Position `json:"data"`
}

type GetTradeFeeParam

type GetTradeFeeParam struct {
	InstType string `url:"instType"`
	InstId   string `url:"instId,omitempty"`
	Uly      string `url:"uly,omitempty"`
	Category string `url:"category,omitempty"`
}

type GetTradeFeeResponse

type GetTradeFeeResponse struct {
	api.Response
	Data []TradeFee `json:"data"`
}

type InterestRate

type InterestRate struct {
	InterestRate string `json:"interestRate"`
	Ccy          string `json:"ccy"`
}

type LeverageInfo

type LeverageInfo struct {
	InstId  string `json:"instId"`
	MgnMode string `json:"mgnMode"`
	PosSide string `json:"posSide"`
	Lever   string `json:"lever"`
}

type MaxAvailSize

type MaxAvailSize struct {
	InstId    string `json:"instId"`
	AvailBuy  string `json:"availBuy"`
	AvailSell string `json:"availSell"`
}

type MaxLoan

type MaxLoan struct {
	InstId  string `json:"instId"`
	MgnMode string `json:"mgnMode"`
	MgnCcy  string `json:"mgnCcy"`
	MaxLoan string `json:"maxLoan"`
	Ccy     string `json:"ccy"`
	Side    string `json:"side"`
}

type MaxSize

type MaxSize struct {
	InstId  string `json:"instId"`
	Ccy     string `json:"ccy"`
	MaxBuy  string `json:"maxBuy"`
	MaxSell string `json:"maxSell"`
}

type PosData

type PosData struct {
	InstType    string `json:"instType"`
	MgnMode     string `json:"mgnMode"`
	PosId       string `json:"posId"`
	InstId      string `json:"instId"`
	Pos         string `json:"pos"`
	BaseBal     string `json:"baseBal"`
	QuoteBal    string `json:"quoteBal"`
	PosSide     string `json:"posSide"`
	PosCcy      string `json:"posCcy"`
	Ccy         string `json:"ccy"`
	NotionalCcy string `json:"notionalCcy"`
	NotionalUsd string `json:"notionalUsd"`
}

type Position

type Position struct {
	InstType    string `json:"instType"`
	MgnMode     string `json:"mgnMode"`
	PosId       string `json:"posId"`
	PosSide     string `json:"posSide"`
	Pos         string `json:"pos"`
	BaseBal     string `json:"baseBal"`
	QuoteBal    string `json:"quoteBal"`
	PosCcy      string `json:"posCcy"`
	AvailPos    string `json:"availPos"`
	AvgPx       string `json:"avgPx"`
	Upl         string `json:"upl"`
	UplRatio    string `json:"uplRatio"`
	InstId      string `json:"instId"`
	Lever       string `json:"lever"`
	LiqPx       string `json:"liqPx"`
	MarkPx      string `json:"markPx"`
	Imr         string `json:"imr"`
	Margin      string `json:"margin"`
	MgnRatio    string `json:"mgnRatio"`
	Mmr         string `json:"mmr"`
	Liab        string `json:"liab"`
	LiabCcy     string `json:"liabCcy"`
	Interest    string `json:"interest"`
	TradeId     string `json:"tradeId"`
	OptVal      string `json:"optVal"`
	NotionalUsd string `json:"notionalUsd"`
	Adl         string `json:"adl"`
	Ccy         string `json:"ccy"`
	Last        string `json:"last"`
	UsdPx       string `json:"usdPx"`
	DeltaBS     string `json:"deltaBS"`
	DeltaPA     string `json:"deltaPA"`
	GammaBS     string `json:"gammaBS"`
	GammaPA     string `json:"gammaPA"`
	ThetaBS     string `json:"thetaBS"`
	ThetaPA     string `json:"thetaPA"`
	VegaBS      string `json:"vegaBS"`
	VegaPA      string `json:"vegaPA"`
	CTime       string `json:"cTime"`
	UTime       int64  `json:"uTime,string"`
}

type PositionMarginBalance

type PositionMarginBalance struct {
	InstId   string `json:"instId"`
	PosSide  string `json:"posSide"`
	Amt      string `json:"amt"`
	Type     string `json:"type"`
	Leverage string `json:"leverage"`
	Ccy      string `json:"ccy"`
}

type PostPositionMarginBalanceParam

type PostPositionMarginBalanceParam struct {
	InstId    string `json:"instId"`
	PosSide   string `json:"posSide"`
	Type      string `json:"type"`
	Amt       string `json:"amt"`
	Ccy       string `json:"ccy,omitempty"`
	Auto      bool   `json:"auto,omitempty"`
	LoanTrans bool   `json:"loanTrans,omitempty"`
}

type PostPositionMarginBalanceResponse

type PostPositionMarginBalanceResponse struct {
	api.Response
	Data []PositionMarginBalance `json:"data"`
}

type PostSetLeverageParam

type PostSetLeverageParam struct {
	InstId  string `json:"instId,omitempty"`
	Ccy     string `json:"ccy,omitempty"`
	Lever   string `json:"lever"`
	MgnMode string `json:"mgnMode"`
	PosSide string `json:"posSide,omitempty"`
}

type PostSetLeverageResponse

type PostSetLeverageResponse struct {
	api.Response
	Data []SetLeverage `json:"data"`
}

type PostSetPositionModeParam

type PostSetPositionModeParam struct {
	PosMode string `json:"posMode"`
}

type PostSetPositionModeResponse

type PostSetPositionModeResponse struct {
	api.Response
	Data []SetPositionMode `json:"data"`
}

type SetLeverage

type SetLeverage struct {
	Lever   string `json:"lever"`
	MgnMode string `json:"mgnMode"`
	InstId  string `json:"instId"`
	PosSide string `json:"posSide"`
}

type SetPositionMode

type SetPositionMode struct {
	PosMode string `json:"posMode"`
}

type TradeFee

type TradeFee struct {
	Category string `json:"category"`
	Taker    string `json:"taker"`
	Maker    string `json:"maker"`
	Delivery string `json:"delivery"`
	Exercise string `json:"exercise"`
	Level    string `json:"level"`
	InstType string `json:"instType"`
	Ts       int64  `json:"ts,string"`
}

Jump to

Keyboard shortcuts

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