• R/O
  • SSH

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisionc7509780b13c3129f85826ee6500f7239a9ea542 (tree)
l'heure2024-12-16 21:17:26
AuteurLorenzo Isella <lorenzo.isella@gmai...>
CommiterLorenzo Isella

Message de Log

I modified some paths.

Change Summary

Modification

diff -r e41d2ec3c831 -r c7509780b13c Python-codes/binance_connector_example.py
--- a/Python-codes/binance_connector_example.py Mon Dec 16 13:16:21 2024 +0100
+++ b/Python-codes/binance_connector_example.py Mon Dec 16 13:17:26 2024 +0100
@@ -21,8 +21,8 @@
2121
2222 # API key/secret are required for user data endpoints
2323
24-api_key=''
25-api_secret=''
24+api_key='insert key'
25+api_secret='insert secret'
2626
2727
2828 client = Spot(api_key=api_key, api_secret=api_secret)
@@ -32,7 +32,7 @@
3232
3333 account=client.account()
3434
35-with open("account.json", 'w') as f:
35+with open("../input/account.json", 'w') as f:
3636 # indent=2 is not needed but makes the file human-readable
3737 # if the data is nested
3838 json.dump(account, f, indent=2)
@@ -49,11 +49,11 @@
4949
5050 df = pd.DataFrame(response_staking)
5151
52-df.to_csv(r'./data_staking.csv', header=True, index=None# , sep=',', mode='a'
52+df.to_csv(r'../input/data_staking.csv', header=True, index=None# , sep=',', mode='a'
5353 )
5454
5555
56-with open("staking.json", 'w') as f:
56+with open("../input/staking.json", 'w') as f:
5757 # indent=2 is not needed but makes the file human-readable
5858 # if the data is nested
5959 json.dump(response_staking, f, indent=2)
@@ -70,7 +70,7 @@
7070 print(flexible_product_position)
7171
7272
73-with open("flexible_position.json", 'w') as f:
73+with open("../input/flexible_position.json", 'w') as f:
7474 # indent=2 is not needed but makes the file human-readable
7575 # if the data is nested
7676 json.dump(flexible_product_position, f, indent=2)
@@ -90,7 +90,7 @@
9090
9191 print(df)
9292
93-df.to_csv(r'./data_flexible.csv', header=True, index=None# , sep=',', mode='a'
93+df.to_csv(r'../input/data_flexible.csv', header=True, index=None# , sep=',', mode='a'
9494 )
9595
9696
@@ -101,7 +101,7 @@
101101
102102 df = pd.DataFrame(response_locked)
103103
104-df.to_csv(r'./data_locked.csv', header=True, index=None# , sep=',', mode='a'
104+df.to_csv(r'../input/data_locked.csv', header=True, index=None# , sep=',', mode='a'
105105 )
106106
107107 response_simple_earn_flexible = client.get_simple_earn_flexible_product_list(
@@ -113,14 +113,14 @@
113113
114114 df = pd.DataFrame(response_simple_earn_flexible)
115115
116-df.to_csv(r'./data_simple_earn_flexible.csv', header=True, index=None# , sep=',', mode='a'
116+df.to_csv(r'../input/data_simple_earn_flexible.csv', header=True, index=None# , sep=',', mode='a'
117117 )
118118
119119
120120
121121
122122
123-with open("earn_flexible.json", 'w') as f:
123+with open("../input/earn_flexible.json", 'w') as f:
124124 # indent=2 is not needed but makes the file human-readable
125125 # if the data is nested
126126 json.dump(response_simple_earn_flexible, f, indent=2)
@@ -137,10 +137,10 @@
137137
138138 df = pd.DataFrame(response_simple_earn_locked)
139139
140-df.to_csv(r'./data_simple_earn_locked.csv', header=True, index=None# , sep=',', mode='a'
140+df.to_csv(r'../input/data_simple_earn_locked.csv', header=True, index=None# , sep=',', mode='a'
141141 )
142142
143-with open("earn_simple.json", 'w') as f:
143+with open("../input/earn_simple.json", 'w') as f:
144144 # indent=2 is not needed but makes the file human-readable
145145 # if the data is nested
146146 json.dump(response_simple_earn_locked, f, indent=2)
@@ -151,7 +151,7 @@
151151 )
152152
153153
154-with open("flex_subscription.json", 'w') as f:
154+with open("../input/flex_subscription.json", 'w') as f:
155155 # indent=2 is not needed but makes the file human-readable
156156 # if the data is nested
157157 json.dump(flex_subscription, f, indent=2)
@@ -159,7 +159,7 @@
159159
160160 locked_products = client.get_locked_product_position(current=1, size=100, recvWindow=5000)
161161
162-with open("locked_products.json", 'w') as f:
162+with open("../input/locked_products.json", 'w') as f:
163163 # indent=2 is not needed but makes the file human-readable
164164 # if the data is nested
165165 json.dump(locked_products, f, indent=2)
@@ -170,7 +170,7 @@
170170
171171 locked_products2 = client.get_locked_product_position(current=2, size=100, recvWindow=5000)
172172
173-with open("locked_products2.json", 'w') as f:
173+with open("../input/locked_products2.json", 'w') as f:
174174 # indent=2 is not needed but makes the file human-readable
175175 # if the data is nested
176176 json.dump(locked_products2, f, indent=2)
@@ -184,7 +184,7 @@
184184
185185 print("Here I am")
186186
187-with open("snapshot.json", 'w') as f:
187+with open("../input/snapshot.json", 'w') as f:
188188 # indent=2 is not needed but makes the file human-readable
189189 # if the data is nested
190190 json.dump(snapshot, f, indent=2)
@@ -200,7 +200,7 @@
200200 client_balance=spot_client.balance()
201201
202202
203-with open("client_balance.json", 'w') as f:
203+with open("../input/client_balance.json", 'w') as f:
204204 # indent=2 is not needed but makes the file human-readable
205205 # if the data is nested
206206 json.dump(client_balance, f, indent=2)
@@ -216,7 +216,7 @@
216216
217217 print(response_spot)
218218
219-with open("spot_balance_improved.json", 'w') as f:
219+with open("../input/spot_balance_improved.json", 'w') as f:
220220 # indent=2 is not needed but makes the file human-readable
221221 # if the data is nested
222222 json.dump(response_spot, f, indent=2)