Documentation ¶
Index ¶
- type CancelOrderResp
- type Client
- func (c Client) CancelOrder(instrumentID, orderID string) (resp *CancelOrderResp, err error)
- func (c Client) GetAllPositions() (resp *GetAllPositionsResp, err error)
- func (c Client) GetCrossedAccount(underlying string) (resp *types.CrossedAccount, err error)
- func (c Client) GetDepth(params GetDepthParam) (resp *GetDepthResp, err error)
- func (c Client) GetFixedAccount(underlying string) (resp *types.FixedAccount, err error)
- func (c Client) GetInstruments() (resp []*types.Instrument, err error)
- func (c Client) GetOrder(instrumentID, orderID string) (resp *types.Order, err error)
- func (c Client) GetOrders(params GetOrdersParam) (resp *GetOrdersResp, err error)
- func (c Client) GetPosition(instrumentID string) (resp *GetPositionResp, err error)
- func (c Client) NewOrder(params *NewOrderParam) (resp *NewOrderResp, err error)
- type GetAllPositionsResp
- type GetDepthParam
- type GetDepthResp
- type GetOrdersParam
- type GetOrdersResp
- type GetPositionResp
- type NewOrderParam
- type NewOrderResp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CancelOrderResp ¶
type Client ¶
func (Client) CancelOrder ¶
func (c Client) CancelOrder(instrumentID, orderID string) (resp *CancelOrderResp, err error)
func (Client) GetAllPositions ¶
func (c Client) GetAllPositions() (resp *GetAllPositionsResp, err error)
func (Client) GetCrossedAccount ¶
func (c Client) GetCrossedAccount(underlying string) (resp *types.CrossedAccount, err error)
func (Client) GetDepth ¶
func (c Client) GetDepth(params GetDepthParam) (resp *GetDepthResp, err error)
func (Client) GetFixedAccount ¶
func (c Client) GetFixedAccount(underlying string) (resp *types.FixedAccount, err error)
func (Client) GetInstruments ¶
func (c Client) GetInstruments() (resp []*types.Instrument, err error)
func (Client) GetOrders ¶
func (c Client) GetOrders(params GetOrdersParam) (resp *GetOrdersResp, err error)
func (Client) GetPosition ¶
func (c Client) GetPosition(instrumentID string) (resp *GetPositionResp, err error)
func (Client) NewOrder ¶
func (c Client) NewOrder(params *NewOrderParam) (resp *NewOrderResp, err error)
type GetAllPositionsResp ¶
type GetDepthParam ¶
type GetDepthResp ¶
type GetOrdersParam ¶
type GetOrdersParam struct { InstrumentID string `mapstructure:"instrument_id"` // 合约ID,如BTC-USD-180213 ,BTC-USDT-191227 State int `mapstructure:"state"` // 订单状态-2:失败-1:撤单成功0:等待成交1:部分成交2:完全成交3:下单中4:撤单中6: 未完成(等待成交+部分成交)7:已完成(撤单成功+完全成交) After *string `mapstructure:"after,omitempty"` // 请求此id之前(更旧的数据)的分页内容,传的值为对应接口的order_id; Before *string `mapstructure:"before,omitempty"` // 请求此id之后(更新的数据)的分页内容,传的值为对应接口的order_id; Limit *int `mapstructure:"limit,omitempty"` // 分页返回的结果集数量,最大为100,不填默认返回100条 }
GetOrdersParam 交割合约订单列表请求参数
type GetOrdersResp ¶
type GetPositionResp ¶
type NewOrderParam ¶
type NewOrderParam struct { ClientOid *string `mapstructure:"client_oid,omitempty"` // 由您设置的订单ID来式是字母(区分大小写)+数字 或者 纯字母(区分大小写),1-32位字符 (不能重复) InstrumentID string `mapstructure:"instrument_id"` // 合约ID,如BTC-USD-18021TC-USDT-191227 MatchPrice *float64 `mapstructure:"match_price,omitempty"` // 是否以对手价下单:是),默认为0,当取值为1时,price字段无效。当以对手价下单,order_type只能选择0(普通委托) OrderType *int `mapstructure:"order_type,omitempty"` // 参数填数字0:普通委type不填或填0都是普通委托) 1:只做Maker(Post only) 2:全部成交或立即取消(FOK) 3:立即成交并取消剩余(IOC) 4:市价委托 Price *float64 `mapstructure:"price,omitempty"` // 委托价格 Size int64 `mapstructure:"size"` // 买入或卖出合约的数量(以张计数) Type int `mapstructure:"type"` // 1:开多2:开空3:平多4:平空 }
NewOrderParam 交割合约下单请求参数
Click to show internal directories.
Click to hide internal directories.