Skip to content

Commit 2dc067e

Browse files
committed
1 parent 1998be3 commit 2dc067e

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/bitvavo_api_upgraded/bitvavo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ def balance(self, options: Dict) -> Any:
350350

351351
def depositAssets(self, symbol: str) -> Any:
352352
postfix = createPostfix({"symbol": symbol})
353-
return self.privateRequest("/depositAssets", postfix, {}, "GET")
353+
return self.privateRequest("/deposit", postfix, {}, "GET")
354354

355355
# optional body parameters: paymentId, internal, addWithdrawalFee
356356
def withdrawAssets(self, symbol: str, amount: str, address: str, body: Dict) -> Any:

tests/test_bitvavo.py

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,15 +379,15 @@ def test_get_order(self, bitvavo: Bitvavo):
379379
assert len(response) == 2
380380
assert "error" in response
381381
assert "errorCode" in response
382-
assert (
383-
response["error"]
384-
== "No order found. Please be aware that simultaneously updating the same order may return this error."
385-
)
382+
long_str = "No order found. Please be aware that simultaneously updating the same order may return this error."
383+
assert response["error"] == long_str
386384
assert response["errorCode"] == 240
387385

388386
def test_update_order(self, bitvavo: Bitvavo):
389387
response = bitvavo.updateOrder(
390-
market="BTC-EUR", orderId="dd055772-0f02-493c-a049-f4356fa0d221", body={"amount": "0.2"}
388+
market="BTC-EUR",
389+
orderId="dd055772-0f02-493c-a049-f4356fa0d221",
390+
body={"amount": "0.2"},
391391
)
392392
assert len(response) == 2
393393
assert "errorCode" in response
@@ -519,11 +519,8 @@ def test_deposit_assets(self, bitvavo: Bitvavo):
519519
"""
520520
response = bitvavo.depositAssets("BTC")
521521

522-
assert "errorCode" in response
523-
assert "error" in response
524-
525-
assert response["errorCode"] == 110
526-
assert response["error"] == "Invalid endpoint. Please check url and HTTP method."
522+
assert "address" in response
523+
assert type(response["address"]) == str
527524

528525
def test_withdraw_assets(self, bitvavo: Bitvavo):
529526
response = bitvavo.withdrawAssets("BTC", "1", "BitcoinAddress", {})
@@ -736,7 +733,9 @@ def test_update_order(self, caplog, capsys, websocket: Bitvavo.websocket):
736733
@mark.skip(reason="I'm not touching methods where I can accidentally sell all my shit")
737734
def test_cancel_order(self, caplog, capsys, websocket: Bitvavo.websocket):
738735
websocket.cancelOrder(
739-
market="BTC-EUR", orderId="6d0dffa7-07fe-448e-9928-233821e7cdb5", callback=generic_callback
736+
market="BTC-EUR",
737+
orderId="6d0dffa7-07fe-448e-9928-233821e7cdb5",
738+
callback=generic_callback,
740739
)
741740

742741
def test_get_orders(self, caplog, capsys, websocket: Bitvavo.websocket):

0 commit comments

Comments
 (0)