-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotc.cto
75 lines (63 loc) · 1.22 KB
/
otc.cto
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* derivatives-settlement model file
*/
namespace org.acme.otc
event NettedDebts {
o DateTime date
o String[] debts
}
participant Trader identified by traderId {
o String traderId
o Double margin
}
participant Administrator identified by adminId {
o String adminId
o Boolean tradingOpen
}
/**enum Product {
o OPTION
o FUTURE
o FORWARD
}*/
concept OrderDetails {
o String productType
o String asset // commodity? underlying? - may later need typing
o Double notionalAmount
o DateTime expiry // only needs to specify date
}
concept Order {
o String traderId
o String otherTraderId
o Boolean buy
o OrderDetails details
}
concept Contract {
o String buyerId // buyer/seller vs maker/taker?
o String sellerId
o OrderDetails details
o Double value
}
asset OpenOrder identified by ISINcode {
o String ISINcode
o Order order
o Boolean valid
}
asset LiveContract identified by ISINcode {
o String ISINcode
o Contract contract
o Boolean valid
}
asset Underlying identified by Ticker{
o String Ticker
o Double price
}
transaction SetupDemo {}
transaction PlaceOrder {
o Order order
}
transaction SOD {
o String adminId
}
transaction EOD {
o String adminId
}