rename for consistency
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
d20fd7a968
commit
984d9409e7
|
@ -322,7 +322,7 @@
|
|||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "order - delete by client_id",
|
||||
"name": "order - cancel by client_id",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [],
|
||||
|
@ -341,7 +341,7 @@
|
|||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "order - delete by order_id",
|
||||
"name": "order - cancel by order_id",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [],
|
||||
|
@ -359,7 +359,7 @@
|
|||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "order - delete all",
|
||||
"name": "order - cancel all",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [],
|
||||
|
|
|
@ -50,11 +50,11 @@ if __name__ == "__main__":
|
|||
)
|
||||
print(exchange.get_orders())
|
||||
|
||||
exchange.delete_order_by_order_id("3689367261485984031001846")
|
||||
exchange.cancel_order_by_order_id("3689367261485984031001846")
|
||||
print(exchange.get_orders())
|
||||
|
||||
exchange.delete_order_by_client_id("3689367261485984031001846")
|
||||
exchange.cancel_order_by_client_id("3689367261485984031001846")
|
||||
print(exchange.get_orders())
|
||||
|
||||
exchange.delete_all_orders()
|
||||
exchange.cancel_all_orders()
|
||||
print(exchange.get_orders())
|
||||
|
|
|
@ -13,7 +13,7 @@ def fibonacci_of(n):
|
|||
if __name__ == "__main__":
|
||||
exchange = Exchange()
|
||||
|
||||
exchange.delete_all_orders()
|
||||
exchange.cancel_all_orders()
|
||||
|
||||
balances = exchange.get_balances()
|
||||
total_usd_balance = sum([balance.usd_value for balance in balances])
|
||||
|
|
|
@ -145,7 +145,7 @@ class MM:
|
|||
)
|
||||
for order in to_cancel:
|
||||
try:
|
||||
self.exchange.delete_order_by_order_id(order.id)
|
||||
self.exchange.cancel_order_by_order_id(order.id)
|
||||
except:
|
||||
pass
|
||||
logger.info("")
|
||||
|
@ -248,7 +248,7 @@ if __name__ == "__main__":
|
|||
logger.info("deleting all orders...")
|
||||
|
||||
try:
|
||||
mm.exchange.delete_all_orders()
|
||||
mm.exchange.cancel_all_orders()
|
||||
except Exception as e:
|
||||
logger.error(f"Exception: {e}")
|
||||
|
||||
|
|
|
@ -90,14 +90,14 @@ class Exchange:
|
|||
# List[BadRequestError], json.loads(response.text)["errors"]
|
||||
# )
|
||||
|
||||
def delete_order_by_client_id(self, client_id):
|
||||
def cancel_order_by_client_id(self, client_id):
|
||||
response = httpx.delete(f"{self.BASE_URL}/orders/by_client_id/{client_id}")
|
||||
timeout_error_msg_customizer(response)
|
||||
|
||||
def delete_order_by_order_id(self, order_id):
|
||||
def cancel_order_by_order_id(self, order_id):
|
||||
response = httpx.delete(f"{self.BASE_URL}/orders/{order_id}")
|
||||
timeout_error_msg_customizer(response)
|
||||
|
||||
def delete_all_orders(self):
|
||||
def cancel_all_orders(self):
|
||||
response = httpx.delete(f"{self.BASE_URL}/orders")
|
||||
timeout_error_msg_customizer(response)
|
||||
|
|
Loading…
Reference in New Issue