new endpoint support on Earn
This commit is contained in:
parent
92103d0f65
commit
d29355d021
4
todo.txt
4
todo.txt
|
|
@ -10,8 +10,8 @@ Mandatory:
|
||||||
7. Optimize database code.
|
7. Optimize database code.
|
||||||
8. Things that should be objects (it's not 1994):
|
8. Things that should be objects (it's not 1994):
|
||||||
* Orders.
|
* Orders.
|
||||||
* Sredro.
|
* Config object (instead of a config dictionary).
|
||||||
* A lot more.
|
* Status object (instead of a status dictionary).
|
||||||
9. In statistics_server, cache daily_and_monthly_totals result if there are no changes in the last deals (and if the day did not change)
|
9. In statistics_server, cache daily_and_monthly_totals result if there are no changes in the last deals (and if the day did not change)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ EARN
|
||||||
39) set_time_between_redemptions 40) get_minimum_amount_in_trading_account
|
39) set_time_between_redemptions 40) get_minimum_amount_in_trading_account
|
||||||
41) set_minimum_amount_in_trading_account 42) get_last_subscription
|
41) set_minimum_amount_in_trading_account 42) get_last_subscription
|
||||||
43) get_last_redemption 44) get_total_balance
|
43) get_last_redemption 44) get_total_balance
|
||||||
|
45) get_global_status
|
||||||
|
|
||||||
TRADERS
|
TRADERS
|
||||||
51) worker_status 52) get_all_worker_status
|
51) worker_status 52) get_all_worker_status
|
||||||
|
|
@ -446,7 +447,12 @@ if __name__=="__main__":
|
||||||
url = f"{base_url}/earn/get_total_balance?broker={earn_broker}"
|
url = f"{base_url}/earn/get_total_balance?broker={earn_broker}"
|
||||||
print(json.loads(requests.get(url,headers=earn_headers).content))
|
print(json.loads(requests.get(url,headers=earn_headers).content))
|
||||||
input("Press ENTER to continue ")
|
input("Press ENTER to continue ")
|
||||||
|
|
||||||
|
elif command==45:
|
||||||
|
print("get_global_status returns the status of all the earners.")
|
||||||
|
url = f"{base_url}/earn/get_global_status"
|
||||||
|
print(json.loads(requests.get(url,headers=earn_headers).content))
|
||||||
|
input("Press ENTER to continue ")
|
||||||
|
|
||||||
######################
|
######################
|
||||||
####### TRADER #######
|
####### TRADER #######
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue