syntax = "proto3";

package exchain.nebula.v1;

import "google/protobuf/descriptor.proto";
import "nebula/ext/options.proto";
import "nebula/v1/coin.proto";

option csharp_namespace = "ExChain.Nebula.V1";
option go_package = "github.com/exchain/go-exchain/exchain/protocol/nebula/v1";
option java_multiple_files = true;
option java_outer_classname = "PairProto";
option java_package = "org.exchain.nebula.v1";
option php_namespace = "ExChain\\Nebula\\v1";

message PairParam {
  string pair_name = 1; // pair name
  uint64 min_order_amount = 2; // min order amount
  uint64 max_order_amount = 3; // max order amount
  uint32 take_fee_rate = 4; // take fee rate * 10000, eg. 0.1% => 10
  uint32 make_fee_rate = 5; // make fee rate * 10000, eg. 0.1% => 10
  bytes price = 6; // latest price
}


message Pair {
  Coin base_coin = 1; // base coin
  Coin quote_coin = 2; // quote coin
  string pair_name = 3; // pair name
  uint64 min_order_amount = 4; // min order amount
  uint64 max_order_amount = 5; // max order amount
  uint32 take_fee_rate = 6; // take fee rate * 10000, eg. 0.1% => 10
  uint32 make_fee_rate = 7; // make fee rate * 10000, eg. 0.1% => 10
  bytes price = 8; // latest price
  bool enabled = 9; // whether enabled
}
