new endpoint support on Earn

This commit is contained in:
Nicolás Sánchez 2025-01-29 09:48:53 -03:00
parent 92103d0f65
commit d29355d021
2 changed files with 9 additions and 3 deletions

View File

@ -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)

View File

@ -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
@ -447,6 +448,11 @@ if __name__=="__main__":
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 #######