package structure import ( "github.com/shopspring/decimal" "time" ) // StopOrder // @Description: type StopOrder struct { OrderId string `json:"order_id"` // 订单ID StopType int64 `json:"stop_type"` // 止盈止损 StopLossPrice string `json:"stop_loss_price"` // 止损 StopWinPrice string `json:"stop_win_price"` // 止盈 Type int64 `json:"type"` // 市场 } // ShareOrder // @Description: type ShareOrder struct { StockId string `json:"trading_pair"` // 股票类型 TradeType int64 `json:"direction"` // 交易类型:1买入,2卖出 DealType int64 `json:"order_price"` // 委托方式:1限价,2市价 LimitPrice string `json:"order_quantity"` // 限价 MarketPrice string `json:"transaction_fee"` // 市价 MarketMoney string `json:"market_money"` // 订单金额 OrderNumber string `json:"order_number"` // 订单数量 ServiceCost string `json:"service_cost"` // 手续费 StopType int64 `json:"stop_type"` // 止损止盈设置 StopLossPrice string `json:"stop_loss_price"` // 止损 StopWinPrice string `json:"stop_win_price"` // 止盈 UserId int `json:"user_id"` // 用户ID PryNum string `json:"pry_num"` // 杠杆 System *ShareSystem `json:"system"` // 系统设置 Type int64 `json:"type"` // 大宗交易标识 StockCode string `json:"stock_code"` // 期权订单标识(stockId+到期时间+行权价+(CALLS-CE|PUTS-PE)) TradingType int64 `json:"trading_type"` // 交易方式: 1-BUY,2-SELLS StopTime string `json:"stop_time"` // 到期时间 StrikePrice string `json:"strike_price"` // 期权-行权价 Multiplier string `json:"multiplier"` // 期权乘数 Ratio string `json:"ratio"` // 保证金比率 Bid string `json:"bid"` // 期权买一价 Ask string `json:"ask"` // 期权卖一价 OrderNo string `json:"order_no"` // IPO订单ID } // ShareSystem // @Description: type ShareSystem struct { StrongFlatRatio string // 股票强平设置 Status decimal.Decimal // 杠杠状态 StockMin decimal.Decimal // 触发杠杆最小值 LevelMin decimal.Decimal // 最小杠杆值 LevelMax decimal.Decimal // 最大杠杆值 UserStatus string // 用户是否开启杠杆权限 } // SpotsOrder // @Description: type SpotsOrder struct { DigitalId string `json:"digital_id"` //交易对 TradeType int64 `json:"trade_type"` //交易类型:1买入,2卖出 DealType int64 `json:"deal_type"` //委托方式:1限价,2市价 DealPrice string `json:"deal_price"` //订单价格 LimitPrice string `json:"limit_price"` //限价 MarketPrice string `json:"market_price"` //市价 OrderNumber string `json:"order_number"` //订单数量 OrderMoney string `json:"order_money"` //订单金额 ServiceCost string `json:"service_cost"` //手续费 } // ContractOrder // @Description: type ContractOrder struct { ContractId string `json:"contract_id"` // 交易对 TradeType int64 `json:"trade_type"` // 交易类型:1买入,2卖出 DealType int64 `json:"deal_type"` // 委托方式:1限价,2市价 LimitPrice string `json:"limit_price"` // 限价 MarketPrice string `json:"market_price"` // 市价 OrderAmount string `json:"order_amount"` // 订单价格 OrderNumber string `json:"order_number"` // 订单数量 EarnestMoney string `json:"earnest_money"` // 保证金 ServiceCost string `json:"service_cost"` // 手续费 StopType int64 `json:"stop_type"` // 止损止盈设置:0无设置,1止损止盈 StopLossPrice string `json:"stop_loss_price"` // 止损 StopWinPrice string `json:"stop_win_price"` // 止盈 PryNum string `json:"pry_num"` // 杠杆 System *ContractSystem `json:"system"` // 合约下单设置 Proportion map[int64]ProportionSystem `json:"proportion"` // 秒合约比例值 Time int64 `json:"time"` // 秒合约 StopTime time.Time `json:"stop_time"` // 秒合约-平仓时间 } // ProportionSystem // @Description: type ProportionSystem struct { Value string // 比例值 } // ContractTimeSetting // @Description: type ContractTimeSetting struct { TimeStep int64 `json:"time_step"` // 秒合约-时间设置 EarningsNum int64 `json:"earnings_num"` // 秒合约-比例配置 } // ForexOrder // @Description: type ForexOrder struct { ForexId string `json:"forex_id"` // 交易对 TradeType int64 `json:"trade_type"` // 交易类型:1买入,2卖出 DealType int64 `json:"deal_type"` // 委托方式:1限价,2市价 LimitPrice string `json:"limit_price"` // 限价 MarketPrice string `json:"market_price"` // 市价 OrderAmount string `json:"order_amount"` // 订单价格 OrderNumber string `json:"order_number"` // 订单数量 EarnestMoney string `json:"earnest_money"` // 保证金 ServiceCost string `json:"service_cost"` // 手续费 StopType int64 `json:"stop_type"` // 止损止盈设置:0无设置,1止损止盈 StopLossPrice string `json:"stop_loss_price"` // 止损 StopWinPrice string `json:"stop_win_price"` // 止盈 PryNum string `json:"pry_num"` // 杠杆 System *ForexSystem `json:"system"` // 合约下单设置 Proportion map[int64]ProportionSystem `json:"proportion"` // 秒合约比例值 Time int64 `json:"time"` // 秒合约 StopTime time.Time `json:"stop_time"` // 秒合约-平仓时间 } // ForexOrder // @Description: type MoneyOrder struct { StockId string `json:"stock_id"` // 交易对 TradeType int64 `json:"trade_type"` // 交易类型:1买入,2卖出 DealType int64 `json:"deal_type"` // 委托方式:1限价,2市价 LimitPrice string `json:"limit_price"` // 限价 MarketPrice string `json:"market_price"` // 市价 OrderAmount string `json:"order_amount"` // 订单价格 OrderNumber string `json:"order_number"` // 订单数量 EarnestMoney string `json:"earnest_money"` // 保证金 ServiceCost string `json:"service_cost"` // 手续费 StopType int64 `json:"stop_type"` // 止损止盈设置:0无设置,1止损止盈 StopLossPrice string `json:"stop_loss_price"` // 止损 StopWinPrice string `json:"stop_win_price"` // 止盈 PryNum string `json:"pry_num"` // 杠杆 System *ForexSystem `json:"system"` // 合约下单设置 Proportion map[int64]ProportionSystem `json:"proportion"` // 秒合约比例值 Time int64 `json:"time"` // 秒合约 StopTime time.Time `json:"stop_time"` // 秒合约-平仓时间 Type int64 `json:"type"` // 市场标识 } // ContractSystem // @Description: 合约系统设置 type ContractSystem struct { FaceValue decimal.Decimal // 合约面值 CompelNum decimal.Decimal // 强平阈值 MaxPry decimal.Decimal // 最大杠杆 MinPry decimal.Decimal // 最小杠杆 } // ForexSystem // @Description: 外汇系统设置 type ForexSystem struct { FaceValue decimal.Decimal // 合约面值 CompelNum decimal.Decimal // 强平阈值 MaxPry decimal.Decimal // 最大杠杆 MinPry decimal.Decimal // 最小杠杆 } // MoneySystem // @Description: 综合(现货|合约|外汇)系统设置 type MoneySystem struct { FaceValue decimal.Decimal // 合约面值 CompelNum decimal.Decimal // 强平阈值 MaxPry decimal.Decimal // 最大杠杆 MinPry decimal.Decimal // 最小杠杆 }