-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
46 lines (33 loc) · 1.29 KB
/
main.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
from deribit import DeribitAPI
import pandas as pd
from deribit import DeribitDraw
from monitoring import InvestmentManager
def main():
"""
deribit = DeribitAPI()
option_instruments = deribit.fetch_option_instruments()
# print("Option Instruments:", option_instruments)
btc_ticker = deribit.fetch_ticker('BTC-PERPETUAL')
# print("BTC Ticker:", btc_ticker)
eth_order_book = deribit.fetch_order_book('ETH-PERPETUAL')
# print("ETH Order Book:", eth_order_book)
# Convertir el resultado JSON en una tabla (DataFrame)
df_op = pd.DataFrame(option_instruments['result'])
df_btc = pd.DataFrame(btc_ticker['result'])
print("Option Instruments Table:")
print(df_btc)
"""
deribit = DeribitDraw()
# Obtener y visualizar precios de opciones
option_prices = deribit.fetch_option_prices('BTC-PERPETUAL')
deribit.plot_option_prices(option_prices)
if __name__ == "__main__":
# Create instances of classes and execute strategies
# ...
investment_manager = InvestmentManager(strategy, data_processor, algorithm)
try:
investment_manager.start_monitoring()
input("Press Enter to stop monitoring...")
except KeyboardInterrupt:
investment_manager.stop_monitoring()
print("Monitoring stopped.")