-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathmarkets_v2_fixtures.py
More file actions
121 lines (101 loc) · 3.43 KB
/
markets_v2_fixtures.py
File metadata and controls
121 lines (101 loc) · 3.43 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
from decimal import Decimal
import pytest
from pyinjective.core.market_v2 import BinaryOptionMarket, DerivativeMarket, SpotMarket
from pyinjective.core.token import Token
@pytest.fixture
def inj_token():
token = Token(
name="Injective Protocol",
symbol="INJ",
denom="inj",
address="0xe28b3B32B6c345A34Ff64674606124Dd5Aceca30",
decimals=18,
logo="https://static.alchemyapi.io/images/assets/7226.png",
updated=1681739137644,
unique_symbol="INJ",
)
return token
@pytest.fixture
def usdt_token():
token = Token(
name="USDT",
symbol="USDT",
denom="peggy0x87aB3B4C8661e07D6372361211B96ed4Dc36B1B5",
address="0x0000000000000000000000000000000000000000",
decimals=6,
logo="https://static.alchemyapi.io/images/assets/825.png",
updated=1681739137645,
unique_symbol="USDT",
)
return token
@pytest.fixture
def usdt_perp_token():
token = Token(
name="USDT PERP",
symbol="USDT",
denom="peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
address="0xdAC17F958D2ee523a2206206994597C13D831ec7",
decimals=6,
logo="https://static.alchemyapi.io/images/assets/825.png",
updated=1681739137645,
unique_symbol="peggy0xdAC17F958D2ee523a2206206994597C13D831ec7",
)
return token
@pytest.fixture
def inj_usdt_spot_market(inj_token, usdt_token):
market = SpotMarket(
id="0x7a57e705bb4e09c88aecfc295569481dbf2fe1d5efe364651fbe72385938e9b0",
status="active",
ticker="INJ/USDT",
base_token=inj_token,
quote_token=usdt_token,
maker_fee_rate=Decimal("-0.0001"),
taker_fee_rate=Decimal("0.001"),
service_provider_fee=Decimal("0.4"),
min_price_tick_size=Decimal("0.01"),
min_quantity_tick_size=Decimal("0.001"),
min_notional=Decimal("1"),
)
return market
@pytest.fixture
def btc_usdt_perp_market(usdt_perp_token):
market = DerivativeMarket(
id="0x4ca0f92fc28be0c9761326016b5a1a2177dd6375558365116b5bdda9abc229ce",
status="active",
ticker="BTC/USDT PERP",
oracle_base="BTC",
oracle_quote=usdt_perp_token.symbol,
oracle_type="bandibc",
oracle_scale_factor=6,
initial_margin_ratio=Decimal("0.095"),
maintenance_margin_ratio=Decimal("0.025"),
quote_token=usdt_perp_token,
maker_fee_rate=Decimal("-0.0001"),
taker_fee_rate=Decimal("0.001"),
service_provider_fee=Decimal("0.4"),
min_price_tick_size=Decimal("0.01"),
min_quantity_tick_size=Decimal("0.0001"),
min_notional=Decimal("1"),
)
return market
@pytest.fixture
def first_match_bet_market(usdt_token):
market = BinaryOptionMarket(
id="0x230dcce315364ff6360097838701b14713e2f4007d704df20ed3d81d09eec957",
status="active",
ticker="5fdbe0b1-1707800399-WAS",
oracle_symbol="Frontrunner",
oracle_provider="Frontrunner",
oracle_type="provider",
oracle_scale_factor=6,
expiration_timestamp=1707800399,
settlement_timestamp=1707843599,
quote_token=usdt_token,
maker_fee_rate=Decimal("0"),
taker_fee_rate=Decimal("0"),
service_provider_fee=Decimal("0.4"),
min_price_tick_size=Decimal("0.01"),
min_quantity_tick_size=Decimal("1"),
min_notional=Decimal("0.000001"),
)
return market