Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContractAsset ¶
type ContractAsset struct { Currency string `json:"currency"` PositionMargin float64 `json:"positionMargin"` AvailableBalance float64 `json:"availableBalance"` CashBalance float64 `json:"cachBalance"` FrozenBalance float64 `json:"frozenBalance"` Equity float64 `json:"equity"` Unrealized float64 `json:"unrealized"` Bonus float64 `json:"bonus"` }
type GetAccountAsset ¶
type GetAccountAsset struct { Response Data *ContractAsset `json:"data"` }
type GetAccountAssets ¶
type GetAccountAssets struct { Response Data []*ContractAsset `json:"data"` }
type GetLeverageParams ¶
type GetLeverageParams struct {
Symbol string `url:"symbol,omitempty" validate:"required"`
}
type GetLeverageResp ¶
type GetOpenPositions ¶
type GetOpenPositions struct { Response Data []*OpenPosition `json:"data"` }
type GetOpenPositionsParams ¶
type GetOpenPositionsParams struct {
Symbol string `url:"symbol,omitempty" validate:"omitempty"`
}
type NewOrderParam ¶
type NewOrderParam struct { Symbol string `url:"symbol" validate:"required"` Price float64 `url:"price,omitempty" validate:"omitempty"` Vol float64 `url:"vol,omitempty" validate:"required"` Leverage int `url:"leverage,omitempty" validate:"omitempty"` Side OrderSide `url:"side" validate:"required,oneof=1 2 3 4"` Type OrderType `url:"type" validate:"required,oneof=1 2 3 4 5 6"` OpenType OpenType `url:"openType" validate:"required,oneof=1 2"` PositionId int64 `url:"positionId,omitempty" validate:"omitempty"` StopLossPrice float64 `url:"stopLossPrice,omitempty" validate:"omitempty"` TakeProfitPrice float64 `url:"takeProfitPrice,omitempty" validate:"omitempty"` PositionMode int `url:"positionMode,omitempty" validate:"omitempty"` }
type OpenPosition ¶
type OpenPosition struct { PositionID int64 `json:"positionId"` Symbol string `json:"symbol"` PositionType int `json:"positionType"` OpenType int `json:"openType"` State int `json:"state"` FrozenVol float64 `json:"frozenVol"` CloseVol float64 `json:"closeVol"` HoldAvgPrice float64 `json:"holdAvgPrice"` CloseAvgPrice float64 `json:"closeAvgPrice"` OpenAvgPrice float64 `json:"openAvgPrice"` LiquidatePrice float64 `json:"liquidatePrice"` Oim float64 `json:"oim"` Im float64 `json:"im"` HoldFee float64 `json:"holdFee"` Realised float64 `json:"realised"` HoldVol float64 `json:"holdVol"` Leverage int `json:"leverage"` CreateTime int64 `json:"createTime"` UpdateTime int64 `json:"updateTime"` AutoAddIm bool `json:"autoAddIm"` }
type SetLeverageParams ¶
type SetLeverageParams struct { PositionId int64 `url:"positionId,omitempty" validate:"omitempty"` Leverage int `url:"positionId,omitempty" validate:"required"` OpenType int `url:"openType,omitempty" validate:"omitempty"` Symbol string `url:"symbol,omitempty" validate:"omitempty"` PositionType int `url:"positionType,omitempty" validate:"omitempty"` }
Click to show internal directories.
Click to hide internal directories.