syntax = "proto3";

package exchain.nebula.v1;

import "google/protobuf/descriptor.proto";
import "nebula/ext/options.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 = "OrderProto";
option java_package = "org.exchain.nebula.v1";
option php_namespace = "ExChain\\Nebula\\v1";

enum OrderSide {
  BUY = 0;
  SELL = 1;
}

enum OrderStatus {
  OPEN = 0;
  FILLED = 1;
  CANCELLED = 2;
}

enum OrderType {
  LIMIT = 0;
  MARKET = 1;
}

message Order {
  string id = 1;
  string user = 2;
  OrderSide side = 3;
  uint64 quality = 4;
  uint64 price = 5;
  OrderType order_type = 6;
  uint64 filled_quality = 7;
  OrderStatus status = 8;
}
