You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

160 lines
4.5 KiB

syntax = "proto3";
package matchmaking.v1;
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
option go_package = "matchmaking-system/api/matchmaking/v1;v1";
service Money {
// GetBotMoneyTrade 综合列表查询
rpc GetBotMoneyTrade(GetBotMoneyTradeRequest)returns(GetBotMoneyTradeReply){
option (google.api.http) = {
post:"/order_money/money_list",
body:"*",
};
}
// MoneyPlaceOrder 综合下单
rpc MoneyPlaceOrder(MoneyRequest)returns(MoneyReply){
option (google.api.http) = {
post: "/order_money/money_place_order",
body: "*",
};
}
// MoneyUpdatePlaceOrder 综合设置止盈止损
rpc MoneyUpdatePlaceOrder(UpdateMoneyRequest)returns(MoneyReply){
option (google.api.http) = {
post: "/order_money/money_update_order",
body: "*",
};
}
// MoneyPosition 综合平仓
rpc MoneyPosition(CancelMoneyRequest)returns(MoneyReply){
option (google.api.http) = {
post:"/order_money/money_position",
body:"*",
};
}
// MoneyAllPosition 综合一键平仓
rpc MoneyAllPosition(AllMoneyRequest)returns(AllMoneyReply){
option (google.api.http) = {
post:"/order_money/money_all_position",
body:"*",
};
}
// MoneyCancel 综合撤单
rpc MoneyCancel(CancelMoneyRequest)returns(MoneyReply){
option (google.api.http) = {
post:"/order_money/money_cancel",
body:"*",
};
}
// MoneyOneClickRedemption 现货一键兑换
rpc MoneyOneClickRedemption(MoneyRequest)returns(MoneyReply){
option (google.api.http) = {
post: "/order_money/money_one_click_redemption",
body: "*",
};
}
}
message GetBotMoneyTradeRequest{
int64 status =1;// 状态码
int64 pageSize =2; // 每页显示条数
int64 pageCount =3;// 开始的位置
int64 state = 4;// 订单类型
int64 type = 5;// 订单市场
}
message GetBotMoneyTradeReply{
int64 code =1;// 状态码
BotMoneyTradeData data =2;// 返回结果
string message =3;// 返回消息提示
}
message BotMoneyTradeData{
int64 pageSize =1; // 每页显示条数
int64 pageCount =2;// 开始的位置
repeated BotMoneyTrade data =3;// 返回结果
int64 totalCount =4;// 总数据
}
message BotMoneyTrade{
string orderId =1;// 订单ID
string StockId =2;// 综合ID
int64 tradeType =3;// 交易类型
int64 dealType =4;// 交易方式
string limitPrice =5;// 限价
string marketPrice =6;// 市价
string dealPrice =7;// 开仓价
string closingPrice =8;// 平仓价
string orderNumber =9;// 订单数量
int64 stopType =10;// 止盈止损状态
string stopLossPrice =11;// 止损
string stopWinPrice =12;// 止盈
string serviceCost =13;// 开仓手续费
string earnestMoney =14;// 保证金
string orderMoney =15;// 订单总额
int64 status =16;// 订单状态
google.protobuf.Timestamp createTime =17;// 订单创建时间
google.protobuf.Timestamp updateTime =18;// 订单更新时间
google.protobuf.Timestamp openTime =19;// 订单开仓时间
google.protobuf.Timestamp closingTime =20;// 订单平仓时间
string closingCost =21;// 平仓手续费
string faceValue =22;// 面值
string overnightCost =23;// 过夜手续费
string pryNum =24;// 杠杆值
string keepDecimal =25;// 保留小数位
string secondTime = 26;// 秒综合时间
int64 state = 27;// 订单类型
}
message MoneyRequest{
string stockId =1;// 交易对
int64 tradeType =2;// 交易类型:1买入,2卖出
int64 dealType =3;// 委托方式:1限价,2市价
string limitPrice =4;// 限价
string marketPrice =5;// 市价
string orderAmount =6;// 订单金额
string orderNumber =7;// 订单数量
string earnestMoney =8;// 保证金
string serviceCost =9;// 手续费
int64 stopType =10;// 止损止盈设置:0无设置,1止损止盈
string stopLossPrice =11;// 止损
string stopWinPrice =12;// 止盈
string pryNum =13;//杠杆
int64 time = 14;// 秒综合时间
int64 type = 15;// 交易市场
}
message MoneyReply{
int64 code =1;// 状态码
MoneyResult data =2;// 返回结果
string message =3;// 返回消息提示
}
message MoneyResult {
string orderId =1;// 订单Id
}
message UpdateMoneyRequest{
string orderId =1;// 订单Id
int64 stopType =2;// 止盈止损
string stopLossPrice =3;// 止损
string stopWinPrice =4;// 止盈
}
message CancelMoneyRequest{
string orderId =1;// 订单ID
}
message AllMoneyRequest{
}
message AllMoneyReply{
int64 code =1;// 状态码
string data =2;// 返回结果
string message =3;// 返回消息提示
}