commander update
This commit is contained in:
parent
edce99c431
commit
e5faaaacad
|
|
@ -45,7 +45,7 @@ EARN
|
|||
39) set_time_between_redemptions 40) get_minimum_amount_in_trading_account
|
||||
41) set_minimum_amount_in_trading_account 42) get_last_subscription
|
||||
43) get_last_redemption 44) get_total_balance
|
||||
45) get_global_status
|
||||
45) get_global_status 46) subscribe 47) redeem
|
||||
|
||||
TRADERS
|
||||
51) worker_status 52) get_all_worker_status
|
||||
|
|
@ -446,6 +446,36 @@ if __name__=="__main__":
|
|||
print(json.loads(requests.get(url,headers=earn_headers).content))
|
||||
input("Press ENTER to continue ")
|
||||
|
||||
elif command==46:
|
||||
print("subscribe forces funds subscription")
|
||||
amount_to_subscribe = input("Enter the amount to subscribe: ")
|
||||
if not validate_float_or_int(amount_to_subscribe):
|
||||
print("The input is invalid")
|
||||
break
|
||||
if input("Proceed? (Y/n) ") in ["Y","y",""]:
|
||||
url = f"{base_url}/earn/subscribe"
|
||||
parameters = {
|
||||
"broker": earn_broker,
|
||||
"amount": amount_to_subscribe}
|
||||
print(json.loads(requests.post(url,headers=earn_headers, json=parameters).content))
|
||||
input("Press ENTER to continue ")
|
||||
|
||||
elif command==47:
|
||||
print("redeem forces funds redemption")
|
||||
amount_to_redeem = input("Enter the amount to redeem: ")
|
||||
if not validate_float_or_int(amount_to_redeem):
|
||||
print("The input is invalid")
|
||||
break
|
||||
if input("Proceed? (Y/n) ") in ["Y","y",""]:
|
||||
url = f"{base_url}/earn/redeem"
|
||||
parameters = {
|
||||
"broker": earn_broker,
|
||||
"amount": amount_to_redeem}
|
||||
print(json.loads(requests.post(url,headers=earn_headers, json=parameters).content))
|
||||
input("Press ENTER to continue ")
|
||||
|
||||
|
||||
|
||||
######################
|
||||
####### TRADER #######
|
||||
######################
|
||||
|
|
|
|||
Loading…
Reference in New Issue