@@ -46,59 +46,100 @@ def cli() -> None:
4646
4747@cli .command ()
4848@click .option ("--url" , required = True , type = str )
49- @click .option ("--key " , required = True , type = str )
49+ @click .option ("--auth_key " , required = True , type = str )
5050@click .option ("--delivery-start" , default = None , type = iso )
5151@click .option ("--start" , default = None , type = iso )
5252@click .option ("--end" , default = None , type = iso )
53- def receive_public_trades (
54- url : str , key : str , * , start : datetime , end : datetime , delivery_start : datetime
53+ @click .option ("--sign_secret" , default = None , type = str )
54+ def receive_public_trades ( # pylint: disable=too-many-arguments
55+ url : str ,
56+ auth_key : str ,
57+ * ,
58+ start : datetime ,
59+ end : datetime ,
60+ delivery_start : datetime ,
61+ sign_secret : str | None = None ,
5562) -> None :
5663 """List and/or stream public trades."""
5764 asyncio .run (
5865 run_receive_public_trades (
59- url = url , key = key , delivery_start = delivery_start , start = start , end = end
66+ url = url ,
67+ auth_key = auth_key ,
68+ delivery_start = delivery_start ,
69+ start = start ,
70+ end = end ,
71+ sign_secret = sign_secret ,
6072 )
6173 )
6274
6375
6476@cli .command ()
6577@click .option ("--url" , required = True , type = str )
66- @click .option ("--key " , required = True , type = str )
78+ @click .option ("--auth_key " , required = True , type = str )
6779@click .option ("--gid" , required = True , type = int )
6880@click .option ("--start" , default = None , type = iso )
69- def receive_gridpool_trades (url : str , key : str , gid : int , * , start : datetime ) -> None :
81+ @click .option ("--sign_secret" , default = None , type = str )
82+ def receive_gridpool_trades (
83+ url : str ,
84+ auth_key : str ,
85+ gid : int ,
86+ * ,
87+ start : datetime ,
88+ sign_secret : str | None = None ,
89+ ) -> None :
7090 """List and/or stream gridpool trades."""
7191 asyncio .run (
72- run_list_gridpool_trades (url = url , key = key , gid = gid , delivery_start = start )
92+ run_list_gridpool_trades (
93+ url = url ,
94+ auth_key = auth_key ,
95+ gid = gid ,
96+ delivery_start = start ,
97+ sign_secret = sign_secret ,
98+ )
7399 )
74100
75101
76102@cli .command ()
77103@click .option ("--url" , required = True , type = str )
78- @click .option ("--key " , required = True , type = str )
104+ @click .option ("--auth_key " , required = True , type = str )
79105@click .option ("--start" , default = None , type = iso )
80106@click .option ("--gid" , required = True , type = int )
81- def receive_gridpool_orders (url : str , key : str , * , start : datetime , gid : int ) -> None :
107+ @click .option ("--sign_secret" , default = None , type = str )
108+ def receive_gridpool_orders (
109+ url : str ,
110+ auth_key : str ,
111+ * ,
112+ start : datetime ,
113+ gid : int ,
114+ sign_secret : str | None = None ,
115+ ) -> None :
82116 """List and/or stream gridpool orders."""
83117 asyncio .run (
84- run_list_gridpool_orders (url = url , key = key , delivery_start = start , gid = gid )
118+ run_list_gridpool_orders (
119+ url = url ,
120+ auth_key = auth_key ,
121+ delivery_start = start ,
122+ gid = gid ,
123+ sign_secret = sign_secret ,
124+ )
85125 )
86126
87127
88128@cli .command ()
89129@click .option ("--url" , required = True , type = str )
90- @click .option ("--key " , required = True , type = str )
130+ @click .option ("--auth_key " , required = True , type = str )
91131@click .option ("--start" , required = True , type = iso )
92132@click .option ("--gid" , required = True , type = int )
93133@click .option ("--quantity" , required = True , type = str )
94134@click .option ("--price" , required = True , type = str )
95135@click .option ("--area" , required = True , type = str )
96136@click .option ("--currency" , default = "EUR" , type = str )
97137@click .option ("--duration" , default = 900 , type = int )
138+ @click .option ("--sign_secret" , default = None , type = str )
98139def create_order (
99140 # pylint: disable=too-many-arguments
100141 url : str ,
101- key : str ,
142+ auth_key : str ,
102143 * ,
103144 start : datetime ,
104145 gid : int ,
@@ -107,6 +148,7 @@ def create_order(
107148 area : str ,
108149 currency : str ,
109150 duration : int ,
151+ sign_secret : str | None = None ,
110152) -> None :
111153 """Create an order.
112154
@@ -118,35 +160,58 @@ def create_order(
118160 asyncio .run (
119161 run_create_order (
120162 url = url ,
121- key = key ,
163+ auth_key = auth_key ,
122164 delivery_start = start ,
123165 gid = gid ,
124166 quantity_mw = quantity ,
125167 price = price ,
126168 delivery_area = area ,
127169 currency = currency ,
128170 duration = timedelta (seconds = duration ),
171+ sign_secret = sign_secret ,
129172 )
130173 )
131174
132175
133176@cli .command ()
134177@click .option ("--url" , required = True , type = str )
135- @click .option ("--key " , required = True , type = str )
178+ @click .option ("--auth_key " , required = True , type = str )
136179@click .option ("--gid" , required = True , type = int )
137180@click .option ("--order" , required = True , type = int )
138- def cancel_order (url : str , key : str , gid : int , order : int ) -> None :
181+ @click .option ("--sign_secret" , default = None , type = str )
182+ def cancel_order (
183+ url : str , auth_key : str , gid : int , order : int , sign_secret : str | None = None
184+ ) -> None :
139185 """Cancel an order."""
140- asyncio .run (run_cancel_order (url = url , key = key , gridpool_id = gid , order_id = order ))
186+ asyncio .run (
187+ run_cancel_order (
188+ url = url ,
189+ auth_key = auth_key ,
190+ gridpool_id = gid ,
191+ order_id = order ,
192+ sign_secret = sign_secret ,
193+ )
194+ )
141195
142196
143197@cli .command ()
144198@click .option ("--url" , required = True , type = str )
145- @click .option ("--key " , required = True , type = str )
199+ @click .option ("--auth_key " , required = True , type = str )
146200@click .option ("--gid" , required = True , type = int )
147- def cancel_all_orders (url : str , key : str , gid : int ) -> None :
201+ @click .option ("--sign_secret" , default = None , type = str )
202+ def cancel_all_orders (
203+ url : str , auth_key : str , gid : int , sign_secret : str | None = None
204+ ) -> None :
148205 """Cancel all orders for a gridpool ID."""
149- asyncio .run (run_cancel_order (url = url , key = key , gridpool_id = gid , order_id = None ))
206+ asyncio .run (
207+ run_cancel_order (
208+ url = url ,
209+ auth_key = auth_key ,
210+ gridpool_id = gid ,
211+ order_id = None ,
212+ sign_secret = sign_secret ,
213+ )
214+ )
150215
151216
152217@cli .command ()
0 commit comments