-
Notifications
You must be signed in to change notification settings - Fork 4
/
testcase.py
61 lines (53 loc) · 927 Bytes
/
testcase.py
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
from datamodel import Listing, OrderDepth, Trade, TradingState
timestamp = 1000
listings = {
"PRODUCT1": Listing(
symbol="PRODUCT1",
product="PRODUCT1",
denomination="SEASHELLS"
),
"PRODUCT2": Listing(
symbol="PRODUCT2",
product="PRODUCT2",
denomination="SEASHELLS"
),
}
order_depths = {
"PRODUCT1": OrderDepth(
buy_orders={10: 7, 9: 5},
sell_orders={11: -4, 12: -8}
),
"PRODUCT2": OrderDepth(
buy_orders={142: 3, 141: 5},
sell_orders={144: -5, 145: -8}
),
}
own_trades = {
"PRODUCT1": [],
"PRODUCT2": []
}
market_trades = {
"PRODUCT1": [
Trade(
symbol="PRODUCT1",
price=11,
quantity=4,
buyer="",
seller="",
timestamp=900
)
],
"PRODUCT2": []
}
position = {
"PRODUCT1": 3,
"PRODUCT2": -5
}
observations = {}
state = TradingState(
timestamp=timestamp,
listings=listings,
order_depths=order_depths,
own_trades=own_trades,
market_trades=market_trades
)