-
Notifications
You must be signed in to change notification settings - Fork 0
/
Order.cs
41 lines (34 loc) · 851 Bytes
/
Order.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
namespace StockFighter
{
public enum OrderType
{
Limit,
Market,
FillOrKill,
ImmediateOrCancel
}
public enum Direction
{
Buy,
Sell
}
public class Order
{
public OrderType OrderType { get; set; }
[JsonProperty(PropertyName = "qty")]
public int Quantity { get; set; }
public Direction Direction { get; set; }
public string Account { get; set; }
public Order(OrderType orderType, int quantity, Direction direction, string account)
{
this.OrderType = orderType;
this.Quantity = quantity;
this.Direction = direction;
this.Account = account;
}
}
}