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.
106 lines
3.0 KiB
106 lines
3.0 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 Spots {
|
|
// GetBotDigitalTrade 现货列表查询
|
|
rpc GetBotDigitalTrade(GetBotDigitalTradeRequest)returns(GetBotDigitalTradeReply){
|
|
option (google.api.http) = {
|
|
post:"/order_spots/spots_list",
|
|
body:"*",
|
|
};
|
|
}
|
|
// SpotsPlaceOrder 现货下单
|
|
rpc SpotsPlaceOrder(SpotsOrderRequest)returns(SpotsOrderReply) {
|
|
option (google.api.http) = {
|
|
post: "/order_spots/spots_place_order",
|
|
body: "*",
|
|
};
|
|
}
|
|
// SpotsCancel 现货撤单
|
|
rpc SpotsCancel(CancelSpotsOrderRequest)returns(SpotsOrderReply) {
|
|
option (google.api.http) = {
|
|
post: "/order_spots/spots_cancel",
|
|
body: "*",
|
|
};
|
|
}
|
|
// SpotsOneClickRedemption 现货一键兑换
|
|
rpc SpotsOneClickRedemption(SpotsOrderRequest)returns(SpotsOrderReply){
|
|
option (google.api.http) = {
|
|
post: "/order_spots/spots_one_click_redemption",
|
|
body: "*",
|
|
};
|
|
}
|
|
}
|
|
|
|
message GetBotDigitalTradeRequest{
|
|
int64 status =1;// 状态码
|
|
int64 pageSize =2; // 每页显示条数
|
|
int64 pageCount =3;// 开始的位置
|
|
}
|
|
|
|
message GetBotDigitalTradeReply{
|
|
int64 code =1;// 状态码
|
|
BotDigitalTradeData data =2;// 返回结果
|
|
string message =3;// 返回消息提示
|
|
}
|
|
|
|
message BotDigitalTradeData{
|
|
int64 pageSize =1; // 每页显示条数
|
|
int64 pageCount =2;// 开始的位置
|
|
repeated BotDigitalTrade data =3;// 返回结果
|
|
int64 totalCount =4;// 总数据
|
|
}
|
|
|
|
message BotDigitalTrade{
|
|
string orderId =1;// 订单ID
|
|
string digitalId =2;// 现货交易对
|
|
int64 tradeType =3;// 交易类型
|
|
int64 dealType =4;// 交易方式
|
|
string dealPrice =7;// 开仓价
|
|
string closingPrice =8;// 平仓价格
|
|
string limitPrice =5;// 限价
|
|
string marketPrice =6;// 市价
|
|
string orderNumber =9;// 订单数量
|
|
string serviceCost =10;// 开仓手续费
|
|
string orderMoney =11;// 订单金额
|
|
string totalMoney =12;// 订单总金额
|
|
int64 status =13;// 订单状态
|
|
google.protobuf.Timestamp createTime =14;// 订单创建时间
|
|
google.protobuf.Timestamp updateTime =15;// 订单更新时间
|
|
google.protobuf.Timestamp openTime =16;// 订单开仓时间
|
|
google.protobuf.Timestamp closingTime =17;// 订单平仓时间
|
|
string closingCost =18;// 平仓手续费
|
|
string keepDecimal =19;// 保留小数位
|
|
}
|
|
|
|
message SpotsOrderRequest{
|
|
string digitalId =1;// 交易对
|
|
int64 tradeType =2;// 交易类型:1买入,2卖出
|
|
int64 dealType =3;// 委托方式:1限价,2市价
|
|
string limitPrice =4;// 限价
|
|
string marketPrice =5;// 市价
|
|
string dealPrice =6;// 订单价格
|
|
string orderNumber =7;// 订单数量
|
|
string orderMoney =8;// 订单金额
|
|
string serviceCost =9;// 手续费
|
|
}
|
|
|
|
message CancelSpotsOrderRequest{
|
|
string orderId =1;// 订单ID
|
|
}
|
|
|
|
message SpotsOrderReply{
|
|
int64 code =1;// 状态码
|
|
SpotsOrderResult data =2;// 返回结果
|
|
string message =3;// 返回消息提示
|
|
}
|
|
|
|
message SpotsOrderResult {
|
|
string orderId =1;// 订单Id
|
|
}
|