Révision | c7509780b13c3129f85826ee6500f7239a9ea542 (tree) |
---|---|
l'heure | 2024-12-16 21:17:26 |
Auteur | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
I modified some paths.
@@ -21,8 +21,8 @@ | ||
21 | 21 | |
22 | 22 | # API key/secret are required for user data endpoints |
23 | 23 | |
24 | -api_key='' | |
25 | -api_secret='' | |
24 | +api_key='insert key' | |
25 | +api_secret='insert secret' | |
26 | 26 | |
27 | 27 | |
28 | 28 | client = Spot(api_key=api_key, api_secret=api_secret) |
@@ -32,7 +32,7 @@ | ||
32 | 32 | |
33 | 33 | account=client.account() |
34 | 34 | |
35 | -with open("account.json", 'w') as f: | |
35 | +with open("../input/account.json", 'w') as f: | |
36 | 36 | # indent=2 is not needed but makes the file human-readable |
37 | 37 | # if the data is nested |
38 | 38 | json.dump(account, f, indent=2) |
@@ -49,11 +49,11 @@ | ||
49 | 49 | |
50 | 50 | df = pd.DataFrame(response_staking) |
51 | 51 | |
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' | |
53 | 53 | ) |
54 | 54 | |
55 | 55 | |
56 | -with open("staking.json", 'w') as f: | |
56 | +with open("../input/staking.json", 'w') as f: | |
57 | 57 | # indent=2 is not needed but makes the file human-readable |
58 | 58 | # if the data is nested |
59 | 59 | json.dump(response_staking, f, indent=2) |
@@ -70,7 +70,7 @@ | ||
70 | 70 | print(flexible_product_position) |
71 | 71 | |
72 | 72 | |
73 | -with open("flexible_position.json", 'w') as f: | |
73 | +with open("../input/flexible_position.json", 'w') as f: | |
74 | 74 | # indent=2 is not needed but makes the file human-readable |
75 | 75 | # if the data is nested |
76 | 76 | json.dump(flexible_product_position, f, indent=2) |
@@ -90,7 +90,7 @@ | ||
90 | 90 | |
91 | 91 | print(df) |
92 | 92 | |
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' | |
94 | 94 | ) |
95 | 95 | |
96 | 96 |
@@ -101,7 +101,7 @@ | ||
101 | 101 | |
102 | 102 | df = pd.DataFrame(response_locked) |
103 | 103 | |
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' | |
105 | 105 | ) |
106 | 106 | |
107 | 107 | response_simple_earn_flexible = client.get_simple_earn_flexible_product_list( |
@@ -113,14 +113,14 @@ | ||
113 | 113 | |
114 | 114 | df = pd.DataFrame(response_simple_earn_flexible) |
115 | 115 | |
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' | |
117 | 117 | ) |
118 | 118 | |
119 | 119 | |
120 | 120 | |
121 | 121 | |
122 | 122 | |
123 | -with open("earn_flexible.json", 'w') as f: | |
123 | +with open("../input/earn_flexible.json", 'w') as f: | |
124 | 124 | # indent=2 is not needed but makes the file human-readable |
125 | 125 | # if the data is nested |
126 | 126 | json.dump(response_simple_earn_flexible, f, indent=2) |
@@ -137,10 +137,10 @@ | ||
137 | 137 | |
138 | 138 | df = pd.DataFrame(response_simple_earn_locked) |
139 | 139 | |
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' | |
141 | 141 | ) |
142 | 142 | |
143 | -with open("earn_simple.json", 'w') as f: | |
143 | +with open("../input/earn_simple.json", 'w') as f: | |
144 | 144 | # indent=2 is not needed but makes the file human-readable |
145 | 145 | # if the data is nested |
146 | 146 | json.dump(response_simple_earn_locked, f, indent=2) |
@@ -151,7 +151,7 @@ | ||
151 | 151 | ) |
152 | 152 | |
153 | 153 | |
154 | -with open("flex_subscription.json", 'w') as f: | |
154 | +with open("../input/flex_subscription.json", 'w') as f: | |
155 | 155 | # indent=2 is not needed but makes the file human-readable |
156 | 156 | # if the data is nested |
157 | 157 | json.dump(flex_subscription, f, indent=2) |
@@ -159,7 +159,7 @@ | ||
159 | 159 | |
160 | 160 | locked_products = client.get_locked_product_position(current=1, size=100, recvWindow=5000) |
161 | 161 | |
162 | -with open("locked_products.json", 'w') as f: | |
162 | +with open("../input/locked_products.json", 'w') as f: | |
163 | 163 | # indent=2 is not needed but makes the file human-readable |
164 | 164 | # if the data is nested |
165 | 165 | json.dump(locked_products, f, indent=2) |
@@ -170,7 +170,7 @@ | ||
170 | 170 | |
171 | 171 | locked_products2 = client.get_locked_product_position(current=2, size=100, recvWindow=5000) |
172 | 172 | |
173 | -with open("locked_products2.json", 'w') as f: | |
173 | +with open("../input/locked_products2.json", 'w') as f: | |
174 | 174 | # indent=2 is not needed but makes the file human-readable |
175 | 175 | # if the data is nested |
176 | 176 | json.dump(locked_products2, f, indent=2) |
@@ -184,7 +184,7 @@ | ||
184 | 184 | |
185 | 185 | print("Here I am") |
186 | 186 | |
187 | -with open("snapshot.json", 'w') as f: | |
187 | +with open("../input/snapshot.json", 'w') as f: | |
188 | 188 | # indent=2 is not needed but makes the file human-readable |
189 | 189 | # if the data is nested |
190 | 190 | json.dump(snapshot, f, indent=2) |
@@ -200,7 +200,7 @@ | ||
200 | 200 | client_balance=spot_client.balance() |
201 | 201 | |
202 | 202 | |
203 | -with open("client_balance.json", 'w') as f: | |
203 | +with open("../input/client_balance.json", 'w') as f: | |
204 | 204 | # indent=2 is not needed but makes the file human-readable |
205 | 205 | # if the data is nested |
206 | 206 | json.dump(client_balance, f, indent=2) |
@@ -216,7 +216,7 @@ | ||
216 | 216 | |
217 | 217 | print(response_spot) |
218 | 218 | |
219 | -with open("spot_balance_improved.json", 'w') as f: | |
219 | +with open("../input/spot_balance_improved.json", 'w') as f: | |
220 | 220 | # indent=2 is not needed but makes the file human-readable |
221 | 221 | # if the data is nested |
222 | 222 | json.dump(response_spot, f, indent=2) |