Documentation
¶
Index ¶
- type AmendBatchOrdersResponse
- type AmendOrderResponse
- type BatchOrderDetailVo
- type BatchOrderVo
- type ClosePositionsResponse
- type EstMarginVo
- type GetEstMarginsResponse
- type GetOpenOrdersResponse
- type GetOrdersResponse
- type GetStopOrdersResponse
- type GetUserTradesResponse
- type NewBatchOrdersResponse
- type NewCancelOrdersResponse
- type NewOrderResponse
- type OrderActionVo
- type OrderCancelVo
- type OrderVo
- type StopOrderVo
- type TradeVo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AmendBatchOrdersResponse ¶
type AmendBatchOrdersResponse struct {
base.RestBaseResponse
Data BatchOrderVo `json:"data"`
}
type AmendOrderResponse ¶
type AmendOrderResponse struct {
base.RestBaseResponse
Data OrderActionVo `json:"data"`
}
type BatchOrderDetailVo ¶
type BatchOrderDetailVo struct {
OrderId string `json:"order_id" example:"1001"`
CreatedAt int64 `json:"created_at" example:"1585296000000"`
UpdatedAt int64 `json:"updated_at" example:"1585296000000"`
UserId string `json:"user_id" example:"801"`
InstrumentId string `json:"instrument_id" example:"BTC-27MAR20-9000-C"`
OrderType string `json:"order_type" example:"limit"`
Side string `json:"side" example:"buy"`
Price string `json:"price" example:"0.03"`
Qty string `json:"qty" example:"1"`
TimeInForce string `json:"time_in_force" example:"gtc"`
AvgPrice string `json:"avg_price" example:"0.029"`
FilledQty string `json:"filled_qty" example:"1"`
Status string `json:"status" example:"filled"`
IsLiquidation bool `json:"is_liquidation" example:"false"`
AutoPrice string `json:"auto_price" example:"7000"`
AutoPriceType string `json:"auto_price_type" example:"usd"`
TakerFeeRate string `json:"taker_fee_rate" example:"0.00005"`
MakerFeeRate string `json:"maker_fee_rate" example:"0.00002"`
Label string `json:"label" example:"strategy-A"`
//StopPrice string `json:"stop_price"`
ReduceOnly bool `json:"reduce_only"`
PostOnly bool `json:"post_only"`
RejectPostOnly bool `json:"reject_post_only"`
ErrorCode int `json:"error_code"`
ErrorMsg string `json:"error_msg"`
Mmp bool `json:"mmp"`
Source string `json:"source"`
Hidden bool `json:"hidden"`
}
type BatchOrderVo ¶
type BatchOrderVo struct {
Orders []BatchOrderDetailVo `json:"Orders"`
}
type ClosePositionsResponse ¶
type ClosePositionsResponse struct {
base.RestBaseResponse
Data OrderActionVo `json:"data"`
}
type EstMarginVo ¶
type GetEstMarginsResponse ¶
type GetEstMarginsResponse struct {
base.RestBaseResponse
Data EstMarginVo `json:"data"`
}
type GetOpenOrdersResponse ¶
type GetOpenOrdersResponse struct {
base.RestBaseResponse
Data []OrderVo `json:"data"`
}
type GetOrdersResponse ¶
type GetOrdersResponse struct {
base.RestBaseResponse
PageInfo base.NewPaging `json:"page_info"`
Data []OrderVo `json:"data"`
}
type GetStopOrdersResponse ¶
type GetStopOrdersResponse struct {
base.RestBaseResponse
Data []StopOrderVo `json:"data"`
}
type GetUserTradesResponse ¶
type GetUserTradesResponse struct {
base.RestBaseResponse
Data []TradeVo `json:"data"`
}
type NewBatchOrdersResponse ¶
type NewBatchOrdersResponse struct {
base.RestBaseResponse
Data BatchOrderVo `json:"data"`
}
type NewCancelOrdersResponse ¶
type NewCancelOrdersResponse struct {
base.RestBaseResponse
Data OrderCancelVo `json:"data"`
}
type NewOrderResponse ¶
type NewOrderResponse struct {
base.RestBaseResponse
Data OrderActionVo `json:"data"`
}
type OrderActionVo ¶
type OrderActionVo struct {
// OrderActionVo: for stop order, OrderId is proto.Order.StopOrderId
OrderId string `json:"order_id" example:"1001"`
CreatedAt int64 `json:"created_at" example:"1585296000000"`
UpdatedAt int64 `json:"updated_at" example:"1585296000000"`
UserId string `json:"user_id" example:"801"`
InstrumentId string `json:"instrument_id" example:"BTC-27MAR20-9000-C"`
OrderType string `json:"order_type" example:"limit"`
Side string `json:"side" example:"buy"`
Price string `json:"price" example:"0.03"`
Qty string `json:"qty" example:"1"`
TimeInForce string `json:"time_in_force" example:"gtc"`
AvgPrice string `json:"avg_price" example:"0.029"`
FilledQty string `json:"filled_qty" example:"1"`
Status string `json:"status" example:"filled"`
//Fee string `json:"fee" example:"0.00002"`
IsLiquidation bool `json:"is_liquidation" example:"false"`
AutoPrice string `json:"auto_price" example:"7000"`
AutoPriceType string `json:"auto_price_type" example:"usd"`
//InitialMargin string `json:"initial_margin" example:"0.04"`
TakerFeeRate string `json:"taker_fee_rate" example:"0.00005"`
MakerFeeRate string `json:"maker_fee_rate" example:"0.00002"`
Label string `json:"label" example:"strategy-A"`
StopPrice string `json:"stop_price"`
ReduceOnly bool `json:"reduce_only"`
PostOnly bool `json:"post_only"`
RejectPostOnly bool `json:"reject_post_only"`
Mmp bool `json:"mmp"`
Source string `json:"source"`
Hidden bool `json:"hidden"`
}
type OrderCancelVo ¶
type OrderCancelVo struct {
NumCancelled int64 `json:"num_cancelled"`
}
type OrderVo ¶
type OrderVo struct {
OrderId string `json:"order_id" example:"1001"`
CreatedAt int64 `json:"created_at" example:"1585296000000"`
UpdatedAt int64 `json:"updated_at" example:"1585296000000"`
UserId string `json:"user_id" example:"801"`
InstrumentId string `json:"instrument_id" example:"BTC-27MAR20-9000-C"`
OrderType string `json:"order_type" example:"limit"`
Side string `json:"side" example:"buy"`
Price string `json:"price" example:"0.03"`
Qty string `json:"qty" example:"1"`
TimeInForce string `json:"time_in_force" example:"gtc"`
AvgPrice string `json:"avg_price" example:"0.029"`
FilledQty string `json:"filled_qty" example:"1"`
Status string `json:"status" example:"filled"`
Fee string `json:"fee" example:"0.00002"`
IsLiquidation bool `json:"is_liquidation" example:"false"`
AutoPrice string `json:"auto_price" example:"7000"`
AutoPriceType string `json:"auto_price_type" example:"usd"`
PNL string `json:"pnl" example:"0.031"`
CashFlow string `json:"cash_flow" example:"0.027"`
InitialMargin string `json:"initial_margin" example:"0.04"`
TakerFeeRate string `json:"taker_fee_rate" example:"0.00005"`
MakerFeeRate string `json:"maker_fee_rate" example:"0.00002"`
Label string `json:"label" example:"strategy-A"`
StopOrderId string `json:"stop_order_id" example:"stop-x3gjsdhf3232"`
StopPrice string `json:"stop_price" example:"9800"`
ReduceOnly bool `json:"reduce_only"`
PostOnly bool `json:"post_only"`
RejectPostOnly bool `json:"reject_post_only"`
Mmp bool `json:"mmp"`
Source string `json:"source"`
Hidden bool `json:"hidden"`
}
type StopOrderVo ¶
type StopOrderVo struct {
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
Status string `json:"status"`
StopPrice string `json:"stop_price"`
TriggerType string `json:"trigger_type"`
RejectReason string `json:"reject_reason"`
// fields of order
//OrderId string `json:"order_id"`
StopOrderId string `json:"stop_order_id"`
InstrumentId string `json:"instrument_id"`
UserId string `json:"user_id"`
Qty string `json:"qty"`
Price string `json:"price"`
Side string `json:"side"`
OrderType string `json:"order_type"`
TimeInForce string `json:"time_in_force"`
Source string `json:"source"`
Hidden bool `json:"hidden"`
}
type TradeVo ¶
type TradeVo struct {
TradeId string `json:"trade_id" example:"3826"`
OrderId string `json:"order_id" example:"1001"`
InstrumentId string `json:"instrument_id" example:"BTC-27MAR20-9000-C"`
Qty string `json:"qty" example:"1"`
Price string `json:"price" example:"0.2275"`
Sigma string `json:"sigma" example:"0.0024"`
UnderlyingPrice string `json:"underlying_price" example:"6750"`
IndexPrice string `json:"index_price" example:"6800"`
UsdPrice string `json:"usd_price" example:"1664"`
Fee string `json:"fee" example:"0.003"`
FeeRate string `json:"fee_rate" example:"0.0003"`
Side string `json:"side" example:"buy"`
CreatedAt int64 `json:"created_at" example:"1585296000000"`
IsTaker bool `json:"is_taker" example:"true"`
OrderType string `json:"order_type" example:"limit"`
IsBlockTrade bool `json:"is_block_trade" example:"false"`
Label string `json:"label" example:"hedge"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.