Added Market new flow
This commit is contained in:
parent
fa218436a6
commit
d822e8bfa7
@ -35,7 +35,8 @@ message CalcMarketReq {
|
|||||||
double amount = 4;
|
double amount = 4;
|
||||||
double unit_price = 5;
|
double unit_price = 5;
|
||||||
MarketParticipantType type = 6;
|
MarketParticipantType type = 6;
|
||||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
wallet.v1.BuyAssetSide req_side =
|
||||||
|
7; // For Calculation : can be from asset or irt
|
||||||
}
|
}
|
||||||
|
|
||||||
message CalcMarketRes {
|
message CalcMarketRes {
|
||||||
@ -43,7 +44,8 @@ message CalcMarketRes {
|
|||||||
double calculated_asset_amount = 2;
|
double calculated_asset_amount = 2;
|
||||||
wallet.v1.EffectiveCommission commission = 3;
|
wallet.v1.EffectiveCommission commission = 3;
|
||||||
MarketParticipantType type = 4;
|
MarketParticipantType type = 4;
|
||||||
wallet.v1.BuyAssetSide req_side = 5; // For Calculation : can be from asset or irt
|
wallet.v1.BuyAssetSide req_side =
|
||||||
|
5; // For Calculation : can be from asset or irt
|
||||||
}
|
}
|
||||||
|
|
||||||
message MPHistoryFilter {}
|
message MPHistoryFilter {}
|
||||||
@ -76,7 +78,8 @@ message MarketOrder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message MarketAssetListReq {
|
message MarketAssetListReq {
|
||||||
optional auth.v1.InternalIAM iam = 1; // If not set, will returns only public orders which are limited by a
|
optional auth.v1.InternalIAM iam =
|
||||||
|
1; // If not set, will returns only public orders which are limited by a
|
||||||
optional uint32 page_no = 2;
|
optional uint32 page_no = 2;
|
||||||
optional uint32 page_size = 3;
|
optional uint32 page_size = 3;
|
||||||
}
|
}
|
||||||
@ -92,7 +95,8 @@ message PurchaseReq {
|
|||||||
auth.v1.InternalIAM iam = 1;
|
auth.v1.InternalIAM iam = 1;
|
||||||
uint64 order_id = 2;
|
uint64 order_id = 2;
|
||||||
double amount = 3;
|
double amount = 3;
|
||||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
wallet.v1.BuyAssetSide req_side =
|
||||||
|
7; // For Calculation : can be from asset or irt
|
||||||
optional bool accepted_contract = 4;
|
optional bool accepted_contract = 4;
|
||||||
optional auth.v1.TFA tfa = 5;
|
optional auth.v1.TFA tfa = 5;
|
||||||
}
|
}
|
||||||
@ -118,11 +122,13 @@ message NewMarketReq {
|
|||||||
int64 counter_asset_id = 3;
|
int64 counter_asset_id = 3;
|
||||||
double amount = 4;
|
double amount = 4;
|
||||||
double unit_price = 5;
|
double unit_price = 5;
|
||||||
|
// TODO: Change name
|
||||||
MarketParticipantType type = 6;
|
MarketParticipantType type = 6;
|
||||||
wallet.v1.BuyAssetSide req_side = 7; // For Calculation : can be from asset or irt
|
// For Calculation : can be from asset or irt
|
||||||
|
wallet.v1.BuyAssetSide req_side = 7;
|
||||||
MarketOrderSide side = 8;
|
MarketOrderSide side = 8;
|
||||||
optional auth.v1.TFA tfa = 9;
|
// TODO: maker market order as optional
|
||||||
optional bool accepted_contract = 10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
enum MarketOrdersSortBy {
|
enum MarketOrdersSortBy {
|
||||||
@ -174,10 +180,16 @@ message DeclineMarketContractReq {
|
|||||||
uint64 agreement_id = 2;
|
uint64 agreement_id = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ConfirmMarketContractReq{
|
||||||
|
auth.v1.InternalIAM iam = 1;
|
||||||
|
uint64 agreement_id = 2;
|
||||||
|
optional auth.v1.TFA tfa = 3;
|
||||||
|
}
|
||||||
|
|
||||||
message MarketContractReq {
|
message MarketContractReq {
|
||||||
auth.v1.InternalIAM iam = 1;
|
auth.v1.InternalIAM iam = 1;
|
||||||
uint64 asset_id = 2;
|
// uint64 asset_id = 2;
|
||||||
uint64 order_id = 3; // Maker OrderID
|
uint64 order_id = 2; // Maker OrderID
|
||||||
double amount = 4;
|
// double amount = 4;
|
||||||
wallet.v1.BuyAssetSide req_side = 5;
|
// wallet.v1.BuyAssetSide req_side = 5;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,24 +7,20 @@ import "base/v1/msg.proto";
|
|||||||
import "market/v1/msg.proto";
|
import "market/v1/msg.proto";
|
||||||
|
|
||||||
service MarketplaceSrv {
|
service MarketplaceSrv {
|
||||||
rpc CalcMarketOrder(CalcMarketReq) returns (CalcMarketRes);
|
|
||||||
|
|
||||||
rpc MarketplaceSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
rpc MarketplaceSrvHealth(base.v1.Empty) returns (base.v1.StatusRes);
|
||||||
|
|
||||||
|
rpc GetMarketPubHistory(OrderListFilter) returns (MarketOrderList); // This is for public market
|
||||||
|
rpc GetUserMarketHistory(OrderListFilter) returns (MarketOrderList); // list of order + purchase related to buying an asset
|
||||||
rpc GetMarketOrderDet(auth.v1.IdReqWithIAM) returns (MarketOrder); // details of an order by id
|
rpc GetMarketOrderDet(auth.v1.IdReqWithIAM) returns (MarketOrder); // details of an order by id
|
||||||
rpc GetAllOrderList(OrderListFilter) returns (MarketOrderList); // list of all orders (seller and buyer combined)
|
rpc GetAllOrderList(OrderListFilter) returns (MarketOrderList); // list of all orders (seller and buyer combined)
|
||||||
|
|
||||||
rpc GetMarketAssetList(MarketAssetListReq) returns (MarketAssetList); // assets that can be listed in marketplace
|
rpc GetMarketAssetList(MarketAssetListReq) returns (MarketAssetList); // assets that can be listed in marketplace
|
||||||
|
|
||||||
rpc NewMarketOrder(NewMarketReq) returns (MarketOrder); // insert new buy order to market
|
rpc CalcMarketOrder(CalcMarketReq) returns (CalcMarketRes);
|
||||||
|
|
||||||
rpc NewTakerOrder(PurchaseReq) returns (PurchaseRes); // purchase from an order
|
|
||||||
|
|
||||||
rpc CancelOrder(auth.v1.IdReqWithIAMAndTFA) returns (base.v1.StatusRes); // cancel an order
|
rpc CancelOrder(auth.v1.IdReqWithIAMAndTFA) returns (base.v1.StatusRes); // cancel an order
|
||||||
|
|
||||||
rpc GetMarketPubHistory(OrderListFilter) returns (MarketOrderList); // This is for public market
|
rpc NewMarketOrder(NewMarketReq) returns (MarketOrder); // insert new buy order to market
|
||||||
rpc GetUserMarketHistory(OrderListFilter) returns (MarketOrderList); // list of order + purchase related to buying an asset
|
|
||||||
|
|
||||||
// Contract
|
|
||||||
rpc GenerateMarketContract(MarketContractReq) returns (ContractMarketRes);
|
rpc GenerateMarketContract(MarketContractReq) returns (ContractMarketRes);
|
||||||
|
rpc ConfirmMarketContract(ConfirmMarketContractReq) returns (base.v1.StatusRes);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user