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.
144 lines
4.0 KiB
144 lines
4.0 KiB
syntax = "proto3";
|
|
|
|
package matchmaking.v1;
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
option go_package = "matchmaking-system/api/matchmaking/v1;v1";
|
|
|
|
service ShareIdn {
|
|
// GetBotStockIdnTrade 印尼股列表查询
|
|
rpc GetBotStockIdnTrade(GetIdnBotStockTradeRequest)returns(GetBotStockIdnTradeReply){
|
|
option (google.api.http) = {
|
|
post:"/order_shareidn/share_list",
|
|
body:"*",
|
|
};
|
|
}
|
|
// ShareIdnPlaceOrder 印尼股下单
|
|
rpc ShareIdnPlaceOrder(ShareIdnOrderRequest)returns(IdnOrderReply) {
|
|
option (google.api.http) = {
|
|
post: "/order_shareidn/share_place_order",
|
|
body: "*",
|
|
};
|
|
}
|
|
// ShareIdnUpdateOrder 印尼股设置止盈止损
|
|
rpc ShareIdnUpdateOrder(UpdateIdnOrderRequest)returns(IdnOrderReply){
|
|
option (google.api.http) = {
|
|
post:"/order_shareidn/share_update_order",
|
|
body:"*",
|
|
};
|
|
}
|
|
// ShareIdnPosition 印尼股平仓
|
|
rpc ShareIdnPosition(CancelIdnOrderRequest)returns(IdnOrderReply){
|
|
option (google.api.http) = {
|
|
post:"/order_shareidn/share_position",
|
|
body:"*",
|
|
};
|
|
}
|
|
// ShareIdnAllPosition 印尼股一键平仓
|
|
rpc ShareIdnAllPosition(AllIdnOrderRequest)returns(AllIdnOrderReply){
|
|
option (google.api.http) = {
|
|
post:"/order_shareidn/share_all_position",
|
|
body:"*",
|
|
};
|
|
}
|
|
// ShareIdnCancel 印尼股撤单
|
|
rpc ShareIdnCancel(CancelIdnOrderRequest)returns(IdnOrderReply){
|
|
option (google.api.http) = {
|
|
post:"/order_shareidn/share_cancel",
|
|
body:"*",
|
|
};
|
|
}
|
|
}
|
|
|
|
message GetIdnBotStockTradeRequest{
|
|
int64 status =1;// 状态码
|
|
int64 pageSize =2; // 每页显示条数
|
|
int64 pageCount =3;// 开始的位置
|
|
}
|
|
message GetBotStockIdnTradeReply{
|
|
int64 code =1;// 状态码
|
|
BotStockIdnTradeData data =2;// 返回结果
|
|
string message =3;// 返回消息提示
|
|
}
|
|
|
|
message BotStockIdnTradeData{
|
|
int64 pageSize =1; // 每页显示条数
|
|
int64 pageCount =2;// 开始的位置
|
|
repeated BotStockIdnTrade data =3;// 返回结果
|
|
int64 totalCount =4;// 总数据
|
|
}
|
|
|
|
message BotStockIdnTrade{
|
|
string orderId =1;// 订单ID
|
|
string stockId =2;// 股票代码
|
|
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 marketMoney =14;// 订单金额
|
|
string orderMoney =15;// 订单总金额
|
|
int64 status =16;// 订单状态
|
|
string createTime =17;// 订单创建时间
|
|
string updateTime =18;// 订单更新时间
|
|
string openTime =19;// 订单开仓时间
|
|
string closingTime =20;// 订单平仓时间
|
|
string closingCost =21;// 平仓手续费
|
|
string faceValue =22;// 面值
|
|
string pryNum =23;// 杠杆
|
|
string keepDecimal =24;// 保留小数位
|
|
string stockName =25;// 股票名称
|
|
}
|
|
|
|
message ShareIdnOrderRequest{
|
|
string stockId =1;// 股票Code
|
|
int64 tradeType =2;// 交易类型:1买入,2卖出
|
|
int64 dealType =3;// 委托方式:1限价,2市价
|
|
string limitPrice =4;// 限价
|
|
string marketPrice =5;// 市价
|
|
string marketMoney =6;// 订单金额
|
|
string orderNumber =7;// 订单数量
|
|
string serviceCost =8;// 手续费
|
|
int64 stopType =9;// 止损止盈设置:1无设置,2止损止盈
|
|
string stopLossPrice =10;// 止损
|
|
string stopWinPrice =11;// 止损
|
|
string pryNum =12;// 杠杆
|
|
}
|
|
|
|
message UpdateIdnOrderRequest{
|
|
string orderId =1;// 订单Id
|
|
int64 stopType =2;// 止盈止损
|
|
string stopLossPrice =3;// 止损
|
|
string stopWinPrice =4;// 止盈
|
|
}
|
|
|
|
message IdnOrderReply{
|
|
int64 code =1;// 状态码
|
|
IdnOrderResult data =2;// 返回结果
|
|
string message =3;// 返回消息提示
|
|
}
|
|
|
|
message IdnOrderResult {
|
|
string orderId =1;// 订单Id
|
|
}
|
|
|
|
message AllIdnOrderRequest{
|
|
|
|
}
|
|
|
|
message AllIdnOrderReply{
|
|
int64 code =1;// 状态码
|
|
string data =2;// 返回结果
|
|
string message =3;// 返回消息提示
|
|
}
|
|
|
|
message CancelIdnOrderRequest{
|
|
string orderId =1;// 订单ID
|
|
}
|