bitvavo-api-upgraded 2.3.0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bitvavo-api-upgraded
3
- Version: 2.3.0
3
+ Version: 3.0.0
4
4
  Summary: A unit-tested fork of the Bitvavo API
5
5
  Author: Bitvavo BV (original code), NostraDavid
6
6
  Author-email: NostraDavid <55331731+NostraDavid@users.noreply.github.com>
@@ -21,7 +21,6 @@ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
22
  Classifier: Programming Language :: Python
23
23
  Classifier: Typing :: Typed
24
- Requires-Dist: deprecated>=1.2.18
25
24
  Requires-Dist: pydantic-settings==2.*,>=2.6
26
25
  Requires-Dist: requests==2.*,>=2.26
27
26
  Requires-Dist: structlog>=21.5,==25.*
@@ -6,7 +6,7 @@ build-backend = "uv_build"
6
6
  # https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
7
7
  [project]
8
8
  name = "bitvavo-api-upgraded"
9
- version = "2.3.0"
9
+ version = "3.0.0"
10
10
  description = "A unit-tested fork of the Bitvavo API"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.9"
@@ -37,7 +37,6 @@ classifiers = [
37
37
  "Typing :: Typed",
38
38
  ]
39
39
  dependencies = [
40
- "deprecated>=1.2.18", # for deprecating functions
41
40
  "pydantic-settings==2.*, >=2.6", # to handle settings
42
41
  "requests==2.*, >=2.26", # to make http requests
43
42
  "structlog==25.*, >=21.5", # for logging
@@ -105,7 +104,7 @@ dev-dependencies = [
105
104
  ]
106
105
 
107
106
  [tool.bumpversion]
108
- current_version = "2.3.0"
107
+ current_version = "3.0.0"
109
108
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
110
109
  serialize = ["{major}.{minor}.{patch}"]
111
110
  search = "{current_version}"
@@ -11,7 +11,6 @@ from threading import Thread
11
11
  from typing import Any, Callable
12
12
 
13
13
  import websocket as ws_lib
14
- from deprecated import deprecated
15
14
  from requests import delete, get, post, put
16
15
  from structlog.stdlib import get_logger
17
16
  from websocket import WebSocketApp # missing stubs for WebSocketApp
@@ -26,11 +25,6 @@ configure_loggers()
26
25
  logger = get_logger(__name__)
27
26
 
28
27
 
29
- @deprecated(version="2.2.0", reason="Use create_signature instead")
30
- def createSignature(timestamp: ms, method: str, url: str, body: anydict | None, api_secret: str) -> str:
31
- return create_signature(timestamp, method, url, body, api_secret)
32
-
33
-
34
28
  def create_signature(timestamp: ms, method: str, url: str, body: anydict | None, api_secret: str) -> str:
35
29
  string = f"{timestamp}{method}/v2{url}"
36
30
  if body is not None and len(body.keys()) > 0:
@@ -39,11 +33,6 @@ def create_signature(timestamp: ms, method: str, url: str, body: anydict | None,
39
33
  return signature
40
34
 
41
35
 
42
- @deprecated(version="2.2.0", reason="Use create_postfix instead")
43
- def createPostfix(options: anydict | None) -> str:
44
- return create_postfix(options)
45
-
46
-
47
36
  def create_postfix(options: anydict | None) -> str:
48
37
  """Generate a URL postfix, based on the `options` dict.
49
38
 
@@ -78,33 +67,14 @@ def _epoch_millis(dt: dt.datetime) -> int:
78
67
  return int(dt.timestamp() * 1000)
79
68
 
80
69
 
81
- @deprecated(version="2.2.0", reason="Use asks_compare instead")
82
- def asksCompare(a: float, b: float) -> bool:
83
- return asks_compare(a, b)
84
-
85
-
86
70
  def asks_compare(a: float, b: float) -> bool:
87
71
  return a < b
88
72
 
89
73
 
90
- @deprecated(version="2.2.0", reason="Use bids_compare instead")
91
- def bidsCompare(a: float, b: float) -> bool:
92
- return bids_compare(a, b)
93
-
94
-
95
74
  def bids_compare(a: float, b: float) -> bool:
96
75
  return a > b
97
76
 
98
77
 
99
- @deprecated(version="2.2.0", reason="Use sort_and_insert instead")
100
- def sortAndInsert(
101
- asks_or_bids: list[list[str]],
102
- update: list[list[str]],
103
- compareFunc: Callable[[float, float], bool],
104
- ) -> list[list[str]] | errordict:
105
- return sort_and_insert(asks_or_bids, update, compareFunc)
106
-
107
-
108
78
  def sort_and_insert(
109
79
  asks_or_bids: list[list[str]],
110
80
  update: list[list[str]],
@@ -131,11 +101,6 @@ def sort_and_insert(
131
101
  return asks_or_bids
132
102
 
133
103
 
134
- @deprecated(version="2.2.0", reason="Use process_local_book instead")
135
- def processLocalBook(ws: Bitvavo.WebSocketAppFacade, message: anydict) -> None:
136
- return process_local_book(ws, message)
137
-
138
-
139
104
  def process_local_book(ws: Bitvavo.WebSocketAppFacade, message: anydict) -> None:
140
105
  market: str = ""
141
106
  if "action" in message:
@@ -458,10 +423,6 @@ class Bitvavo:
458
423
  )
459
424
  time.sleep(napTime + 1) # +1 to add a tiny bit of buffer time
460
425
 
461
- @deprecated(version="2.2.0", reason="Use calc_lag instead")
462
- def calcLag(self) -> ms:
463
- return self.calc_lag()
464
-
465
426
  def calc_lag(self) -> ms:
466
427
  """
467
428
  Calculate the time difference between the client and server; use this value with BITVAVO_API_UPGRADED_LAG,
@@ -484,10 +445,6 @@ class Bitvavo:
484
445
 
485
446
  return ms(sum(lag_list) / len(lag_list))
486
447
 
487
- @deprecated(version="2.2.0", reason="Use get_remaining_limit instead")
488
- def getRemainingLimit(self) -> int:
489
- return self.get_remaining_limit()
490
-
491
448
  def get_remaining_limit(self) -> int:
492
449
  """Get the remaining rate limit
493
450
 
@@ -499,10 +456,6 @@ class Bitvavo:
499
456
  """
500
457
  return self.rateLimitRemaining
501
458
 
502
- @deprecated(version="2.2.0", reason="Use get_remaining_limit instead")
503
- def updateRateLimit(self, response: anydict | errordict) -> None:
504
- return self.update_rate_limit(response)
505
-
506
459
  def update_rate_limit(self, response: anydict | errordict) -> None:
507
460
  """
508
461
  Update the rate limited
@@ -535,14 +488,6 @@ class Bitvavo:
535
488
  logger.info("napping-until-ban-lifted")
536
489
  time.sleep(timeToWait + 1) # plus one second to ENSURE we're able to run again.
537
490
 
538
- @deprecated(version="2.2.0", reason="Use public_request instead")
539
- def publicRequest(
540
- self,
541
- url: str,
542
- rateLimitingWeight: int = 1,
543
- ) -> list[anydict] | list[list[str]] | intdict | strdict | anydict | errordict:
544
- return self.public_request(url, rateLimitingWeight)
545
-
546
491
  def public_request(
547
492
  self,
548
493
  url: str,
@@ -618,17 +563,6 @@ class Bitvavo:
618
563
 
619
564
  return r.json() # type:ignore[no-any-return]
620
565
 
621
- @deprecated(version="2.2.0", reason="Use private_request instead")
622
- def privateRequest(
623
- self,
624
- endpoint: str,
625
- postfix: str,
626
- body: anydict | None = None,
627
- method: str = "GET",
628
- rateLimitingWeight: int = 1,
629
- ) -> list[anydict] | list[list[str]] | intdict | strdict | anydict | errordict:
630
- return self.private_request(endpoint, postfix, body, method, rateLimitingWeight)
631
-
632
566
  def private_request(
633
567
  self,
634
568
  endpoint: str,
@@ -956,15 +890,6 @@ class Bitvavo:
956
890
  postfix = create_postfix(options)
957
891
  return self.public_request(f"{self.base}/{market}/book{postfix}") # type: ignore[return-value]
958
892
 
959
- @deprecated(version="2.2.0", reason="Use public_trades instead")
960
- def publicTrades(
961
- self,
962
- market: str,
963
- options: strintdict | None = None,
964
- output_format: OutputFormat = OutputFormat.DICT,
965
- ) -> list[anydict] | errordict | Any:
966
- return self.public_trades(market, options, output_format)
967
-
968
893
  def public_trades(
969
894
  self,
970
895
  market: str,
@@ -1132,14 +1057,6 @@ class Bitvavo:
1132
1057
  result = self.public_request(f"{self.base}/{market}/candles{postfix}") # type: ignore[return-value]
1133
1058
  return convert_candles_to_dataframe(result, output_format)
1134
1059
 
1135
- @deprecated(version="2.2.0", reason="Use ticker_price instead")
1136
- def tickerPrice(
1137
- self,
1138
- options: strdict | None = None,
1139
- output_format: OutputFormat = OutputFormat.DICT,
1140
- ) -> list[strdict] | strdict | Any:
1141
- return self.ticker_price(options, output_format)
1142
-
1143
1060
  def ticker_price(
1144
1061
  self,
1145
1062
  options: strdict | None = None,
@@ -1214,14 +1131,6 @@ class Bitvavo:
1214
1131
  result = self.public_request(f"{self.base}/ticker/price{postfix}") # type: ignore[return-value]
1215
1132
  return convert_to_dataframe(result, output_format)
1216
1133
 
1217
- @deprecated(version="2.2.0", reason="Use ticker_book instead")
1218
- def tickerBook(
1219
- self,
1220
- options: strdict | None = None,
1221
- output_format: OutputFormat = OutputFormat.DICT,
1222
- ) -> list[strdict] | strdict | Any:
1223
- return self.ticker_book(options, output_format)
1224
-
1225
1134
  def ticker_book(
1226
1135
  self,
1227
1136
  options: strdict | None = None,
@@ -1378,15 +1287,6 @@ class Bitvavo:
1378
1287
  result = self.public_request(f"{self.base}/ticker/24h{postfix}", rateLimitingWeight) # type: ignore[return-value]
1379
1288
  return convert_to_dataframe(result, output_format)
1380
1289
 
1381
- @deprecated(version="2.2.0", reason="Use report_trades instead")
1382
- def reportTrades(
1383
- self,
1384
- market: str,
1385
- options: strintdict | None = None,
1386
- output_format: OutputFormat = OutputFormat.DICT,
1387
- ) -> list[anydict] | errordict | Any:
1388
- return self.report_trades(market, options, output_format)
1389
-
1390
1290
  def report_trades(
1391
1291
  self,
1392
1292
  market: str,
@@ -1454,10 +1354,6 @@ class Bitvavo:
1454
1354
  result = self.public_request(f"{self.base}/report/{market}/trades{postfix}", 5) # type: ignore[return-value]
1455
1355
  return convert_to_dataframe(result, output_format)
1456
1356
 
1457
- @deprecated(version="2.2.0", reason="Use report_book instead")
1458
- def reportBook(self, market: str, options: intdict | None = None) -> dict[str, str | int | list[str]] | errordict:
1459
- return self.report_book(market, options)
1460
-
1461
1357
  def report_book(self, market: str, options: intdict | None = None) -> dict[str, str | int | list[str]] | errordict:
1462
1358
  """Get MiCA-compliant order book report for a specific market
1463
1359
 
@@ -1498,10 +1394,6 @@ class Bitvavo:
1498
1394
  postfix = create_postfix(options)
1499
1395
  return self.public_request(f"{self.base}/report/{market}/book{postfix}") # type: ignore[return-value]
1500
1396
 
1501
- @deprecated(version="2.2.0", reason="Use place_order instead")
1502
- def placeOrder(self, market: str, side: str, orderType: str, operatorId: int, body: anydict) -> anydict:
1503
- return self.place_order(market, side, orderType, operatorId, body)
1504
-
1505
1397
  def place_order(self, market: str, side: str, orderType: str, operatorId: int, body: anydict) -> anydict:
1506
1398
  """Place a new order on the exchange
1507
1399
 
@@ -1633,10 +1525,6 @@ class Bitvavo:
1633
1525
  body["operatorId"] = operatorId
1634
1526
  return self.private_request("/order", "", body, "POST") # type: ignore[return-value]
1635
1527
 
1636
- @deprecated(version="2.2.0", reason="Use update_order instead")
1637
- def updateOrder(self, market: str, orderId: str, operatorId: int, body: anydict) -> anydict:
1638
- return self.update_order(market, orderId, operatorId, body)
1639
-
1640
1528
  def update_order(self, market: str, orderId: str, operatorId: int, body: anydict) -> anydict:
1641
1529
  """Update an existing order for a specific market. Make sure that at least one of the optional parameters is set, otherwise nothing will be updated.
1642
1530
 
@@ -1723,16 +1611,6 @@ class Bitvavo:
1723
1611
  body["operatorId"] = operatorId
1724
1612
  return self.private_request("/order", "", body, "PUT") # type: ignore[return-value]
1725
1613
 
1726
- @deprecated(version="2.2.0", reason="Use cancel_order instead")
1727
- def cancelOrder(
1728
- self,
1729
- market: str,
1730
- operatorId: int,
1731
- orderId: str | None = None,
1732
- clientOrderId: str | None = None,
1733
- ) -> strdict:
1734
- return self.cancel_order(market, operatorId, orderId, clientOrderId)
1735
-
1736
1614
  def cancel_order(
1737
1615
  self,
1738
1616
  market: str,
@@ -1782,10 +1660,6 @@ class Bitvavo:
1782
1660
  postfix = create_postfix(params)
1783
1661
  return self.private_request("/order", postfix, {}, "DELETE") # type: ignore[return-value]
1784
1662
 
1785
- @deprecated(version="2.2.0", reason="Use get_order instead")
1786
- def getOrder(self, market: str, orderId: str) -> list[anydict] | errordict:
1787
- return self.get_order(market, orderId)
1788
-
1789
1663
  def get_order(self, market: str, orderId: str) -> list[anydict] | errordict:
1790
1664
  """Get an existing order for a specific market
1791
1665
 
@@ -1851,10 +1725,6 @@ class Bitvavo:
1851
1725
  postfix = create_postfix({"market": market, "orderId": orderId})
1852
1726
  return self.private_request("/order", postfix, {}, "GET") # type: ignore[return-value]
1853
1727
 
1854
- @deprecated(version="2.2.0", reason="Use get_orders instead")
1855
- def getOrders(self, market: str, options: anydict | None = None) -> list[anydict] | errordict:
1856
- return self.get_orders(market, options)
1857
-
1858
1728
  def get_orders(self, market: str, options: anydict | None = None) -> list[anydict] | errordict:
1859
1729
  """Get multiple existing orders for a specific market
1860
1730
 
@@ -1931,10 +1801,6 @@ class Bitvavo:
1931
1801
  postfix = create_postfix(options)
1932
1802
  return self.private_request("/orders", postfix, {}, "GET", 5) # type: ignore[return-value]
1933
1803
 
1934
- @deprecated(version="2.2.0", reason="Use cancel_orders instead")
1935
- def cancelOrders(self, options: anydict | None = None) -> list[strdict] | errordict:
1936
- return self.cancel_orders(options)
1937
-
1938
1804
  def cancel_orders(self, options: anydict | None = None) -> list[strdict] | errordict:
1939
1805
  """Cancel all existing orders for a specific market (or account)
1940
1806
 
@@ -1963,10 +1829,6 @@ class Bitvavo:
1963
1829
  postfix = create_postfix(options)
1964
1830
  return self.private_request("/orders", postfix, {}, "DELETE") # type: ignore[return-value]
1965
1831
 
1966
- @deprecated(version="2.2.0", reason="Use orders_open instead")
1967
- def ordersOpen(self, options: anydict | None = None) -> list[anydict] | errordict:
1968
- return self.orders_open(options)
1969
-
1970
1832
  def orders_open(self, options: anydict | None = None) -> list[anydict] | errordict:
1971
1833
  """Get all open orders, either for all markets, or a single market
1972
1834
 
@@ -2223,10 +2085,6 @@ class Bitvavo:
2223
2085
  result = self.private_request("/balance", postfix, {}, "GET", 5) # type: ignore[return-value]
2224
2086
  return convert_to_dataframe(result, output_format)
2225
2087
 
2226
- @deprecated(version="2.2.0", reason="Use account_history instead")
2227
- def accountHistory(self, options: strintdict | None = None) -> anydict | errordict:
2228
- return self.account_history(options)
2229
-
2230
2088
  def account_history(self, options: strintdict | None = None) -> anydict | errordict:
2231
2089
  """Get all past transactions for your account
2232
2090
 
@@ -2274,10 +2132,6 @@ class Bitvavo:
2274
2132
  postfix = create_postfix(options)
2275
2133
  return self.private_request("/account/history", postfix, {}, "GET") # type: ignore[return-value]
2276
2134
 
2277
- @deprecated(version="2.2.0", reason="Use deposit_assets instead")
2278
- def depositAssets(self, symbol: str) -> strdict:
2279
- return self.deposit_assets(symbol)
2280
-
2281
2135
  def deposit_assets(self, symbol: str) -> strdict:
2282
2136
  """Get the deposit address (with paymentId for some assets) or bank account information to increase your balance
2283
2137
 
@@ -2313,10 +2167,6 @@ class Bitvavo:
2313
2167
  postfix = create_postfix({"symbol": symbol})
2314
2168
  return self.private_request("/deposit", postfix, {}, "GET") # type: ignore[return-value]
2315
2169
 
2316
- @deprecated(version="2.2.0", reason="Use deposit_history instead")
2317
- def depositHistory(self, options: anydict | None = None) -> list[anydict] | errordict:
2318
- return self.deposit_history(options)
2319
-
2320
2170
  def deposit_history(self, options: anydict | None = None) -> list[anydict] | errordict:
2321
2171
  """Get the deposit history of the account
2322
2172
 
@@ -2368,10 +2218,6 @@ class Bitvavo:
2368
2218
  postfix = create_postfix(options)
2369
2219
  return self.private_request("/depositHistory", postfix, {}, "GET", 5) # type: ignore[return-value]
2370
2220
 
2371
- @deprecated(version="2.2.0", reason="Use withdraw_assets instead")
2372
- def withdrawAssets(self, symbol: str, amount: str, address: str, body: anydict) -> anydict:
2373
- return self.withdraw_assets(symbol, amount, address, body)
2374
-
2375
2221
  def withdraw_assets(self, symbol: str, amount: str, address: str, body: anydict) -> anydict:
2376
2222
  """Withdraw a coin/token to an external crypto address or bank account.
2377
2223
 
@@ -2409,14 +2255,6 @@ class Bitvavo:
2409
2255
  body["address"] = address
2410
2256
  return self.private_request("/withdrawal", "", body, "POST") # type: ignore[return-value]
2411
2257
 
2412
- @deprecated(version="2.2.0", reason="Use withdrawal_history instead")
2413
- def withdrawalHistory(
2414
- self,
2415
- options: anydict | None = None,
2416
- output_format: OutputFormat = OutputFormat.DICT,
2417
- ) -> list[anydict] | errordict | Any:
2418
- return self.withdrawal_history(options, output_format)
2419
-
2420
2258
  def withdrawal_history(
2421
2259
  self,
2422
2260
  options: anydict | None = None,
@@ -2590,10 +2428,6 @@ class Bitvavo:
2590
2428
  "rate_limit_reset_at": int(self.rateLimitResetAt),
2591
2429
  }
2592
2430
 
2593
- @deprecated(version="2.2.0", reason="Use new_websocket instead")
2594
- def newWebsocket(self) -> Bitvavo.WebSocketAppFacade:
2595
- return self.new_websocket()
2596
-
2597
2431
  def new_websocket(self) -> Bitvavo.WebSocketAppFacade:
2598
2432
  return Bitvavo.WebSocketAppFacade(self.APIKEY, self.APISECRET, self.ACCESSWINDOW, self.wsUrl, self)
2599
2433
 
@@ -2643,29 +2477,17 @@ class Bitvavo:
2643
2477
  self.keepBookCopy = False
2644
2478
  self.localBook: anydict = {}
2645
2479
 
2646
- @deprecated(version="2.2.0", reason="Use close_socket instead")
2647
- def closeSocket(self) -> None:
2648
- return self.close_socket()
2649
-
2650
2480
  def close_socket(self) -> None:
2651
2481
  self.ws.close()
2652
2482
  self.keepAlive = False
2653
2483
  self.receiveThread.join()
2654
2484
 
2655
- @deprecated(version="2.2.0", reason="Use wait_for_socket instead")
2656
- def waitForSocket(self, ws: WebSocketApp, message: str, private: bool) -> None: # noqa: FBT001
2657
- return self.wait_for_socket(ws, message, private)
2658
-
2659
2485
  def wait_for_socket(self, ws: WebSocketApp, message: str, private: bool) -> None: # noqa: ARG002, FBT001
2660
2486
  while self.keepAlive:
2661
2487
  if (not private and self.open) or (private and self.authenticated and self.open):
2662
2488
  return
2663
2489
  time.sleep(0.1)
2664
2490
 
2665
- @deprecated(version="2.2.0", reason="Use do_send instead")
2666
- def doSend(self, ws: WebSocketApp, message: str, private: bool = False) -> None: # noqa: FBT001, FBT002
2667
- return self.do_send(ws, message, private)
2668
-
2669
2491
  def do_send(self, ws: WebSocketApp, message: str, private: bool = False) -> None: # noqa: FBT001, FBT002
2670
2492
  # TODO(NostraDavid): add nap-time to the websocket, or do it here; I don't know yet.
2671
2493
  if private and self.APIKEY == "":
@@ -2787,10 +2609,6 @@ class Bitvavo:
2787
2609
  if self.bitvavo.debugging:
2788
2610
  logger.debug("websocket-closed")
2789
2611
 
2790
- @deprecated(version="2.2.0", reason="Use check_reconnect instead")
2791
- def checkReconnect(self) -> None:
2792
- return self.check_reconnect()
2793
-
2794
2612
  def check_reconnect(self) -> None: # noqa: C901, PLR0912 (too-complex)
2795
2613
  if "subscriptionTicker" in self.callbacks:
2796
2614
  for market in self.callbacks["subscriptionTicker"]:
@@ -2842,10 +2660,6 @@ class Bitvavo:
2842
2660
  thread = Thread(target=self.check_reconnect)
2843
2661
  thread.start()
2844
2662
 
2845
- @deprecated(version="2.2.0", reason="Use set_error_callback instead")
2846
- def setErrorCallback(self, callback: Callable[[Any], None]) -> None:
2847
- return self.set_error_callback(callback)
2848
-
2849
2663
  def set_error_callback(self, callback: Callable[[Any], None]) -> None:
2850
2664
  self.callbacks["error"] = callback
2851
2665
 
@@ -3139,10 +2953,6 @@ class Bitvavo:
3139
2953
  options["action"] = "getCandles"
3140
2954
  self.do_send(self.ws, json.dumps(options))
3141
2955
 
3142
- @deprecated(version="2.2.0", reason="Use ticker_price instead")
3143
- def tickerPrice(self, options: anydict, callback: Callable[[Any], None]) -> None:
3144
- return self.ticker_price(options, callback)
3145
-
3146
2956
  def ticker_price(self, options: anydict, callback: Callable[[Any], None]) -> None:
3147
2957
  """Get the current price for each market
3148
2958
 
@@ -3193,10 +3003,6 @@ class Bitvavo:
3193
3003
  options["action"] = "getTickerPrice"
3194
3004
  self.do_send(self.ws, json.dumps(options))
3195
3005
 
3196
- @deprecated(version="2.2.0", reason="Use ticker_book instead")
3197
- def tickerBook(self, options: anydict, callback: Callable[[Any], None]) -> None:
3198
- return self.ticker_book(options, callback)
3199
-
3200
3006
  def ticker_book(self, options: anydict, callback: Callable[[Any], None]) -> None:
3201
3007
  """Get current bid/ask, bidsize/asksize per market
3202
3008
 
@@ -3307,18 +3113,6 @@ class Bitvavo:
3307
3113
  options["action"] = "getTicker24h"
3308
3114
  self.do_send(self.ws, json.dumps(options))
3309
3115
 
3310
- @deprecated(version="2.2.0", reason="Use place_order instead")
3311
- def placeOrder(
3312
- self,
3313
- market: str,
3314
- side: str,
3315
- orderType: str,
3316
- operatorId: int,
3317
- body: anydict,
3318
- callback: Callable[[Any], None],
3319
- ) -> None:
3320
- return self.place_order(market, side, orderType, operatorId, body, callback)
3321
-
3322
3116
  def place_order(
3323
3117
  self,
3324
3118
  market: str,
@@ -3461,17 +3255,6 @@ class Bitvavo:
3461
3255
  body["action"] = "privateCreateOrder"
3462
3256
  self.do_send(self.ws, json.dumps(body), True)
3463
3257
 
3464
- @deprecated(version="2.2.0", reason="Use update_order instead")
3465
- def updateOrder(
3466
- self,
3467
- market: str,
3468
- orderId: str,
3469
- operatorId: int,
3470
- body: anydict,
3471
- callback: Callable[[Any], None],
3472
- ) -> None:
3473
- return self.update_order(market, orderId, operatorId, body, callback)
3474
-
3475
3258
  def update_order(
3476
3259
  self,
3477
3260
  market: str,
@@ -3570,17 +3353,6 @@ class Bitvavo:
3570
3353
  body["action"] = "privateUpdateOrder"
3571
3354
  self.do_send(self.ws, json.dumps(body), True)
3572
3355
 
3573
- @deprecated(version="2.2.0", reason="Use cancel_order instead")
3574
- def cancelOrder(
3575
- self,
3576
- market: str,
3577
- operatorId: int,
3578
- callback: Callable[[Any], None],
3579
- orderId: str | None = None,
3580
- clientOrderId: str | None = None,
3581
- ) -> None:
3582
- return self.cancel_order(market, operatorId, callback, orderId, clientOrderId)
3583
-
3584
3356
  def cancel_order(
3585
3357
  self,
3586
3358
  market: str,
@@ -3633,10 +3405,6 @@ class Bitvavo:
3633
3405
 
3634
3406
  self.do_send(self.ws, json.dumps(options), True)
3635
3407
 
3636
- @deprecated(version="2.2.0", reason="Use get_order instead")
3637
- def getOrder(self, market: str, orderId: str, callback: Callable[[Any], None]) -> None:
3638
- return self.get_order(market, orderId, callback)
3639
-
3640
3408
  def get_order(self, market: str, orderId: str, callback: Callable[[Any], None]) -> None:
3641
3409
  """Get an existing order for a specific market
3642
3410
 
@@ -3708,10 +3476,6 @@ class Bitvavo:
3708
3476
  }
3709
3477
  self.do_send(self.ws, json.dumps(options), True)
3710
3478
 
3711
- @deprecated(version="2.2.0", reason="Use get_orders instead")
3712
- def getOrders(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
3713
- return self.get_orders(market, options, callback)
3714
-
3715
3479
  def get_orders(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
3716
3480
  """Get multiple existing orders for a specific market
3717
3481
 
@@ -3792,10 +3556,6 @@ class Bitvavo:
3792
3556
  options["market"] = market
3793
3557
  self.do_send(self.ws, json.dumps(options), True)
3794
3558
 
3795
- @deprecated(version="2.2.0", reason="Use cancel_orders instead")
3796
- def cancelOrders(self, options: anydict, callback: Callable[[Any], None]) -> None:
3797
- return self.cancel_orders(options, callback)
3798
-
3799
3559
  def cancel_orders(self, options: anydict, callback: Callable[[Any], None]) -> None:
3800
3560
  """Cancel all existing orders for a specific market (or account)
3801
3561
 
@@ -3826,10 +3586,6 @@ class Bitvavo:
3826
3586
  options["action"] = "privateCancelOrders"
3827
3587
  self.do_send(self.ws, json.dumps(options), True)
3828
3588
 
3829
- @deprecated(version="2.2.0", reason="Use orders_open instead")
3830
- def ordersOpen(self, options: anydict, callback: Callable[[Any], None]) -> None:
3831
- return self.orders_open(options, callback)
3832
-
3833
3589
  def orders_open(self, options: anydict, callback: Callable[[Any], None]) -> None:
3834
3590
  """Get all open orders, either for all markets, or a single market
3835
3591
 
@@ -4012,10 +3768,6 @@ class Bitvavo:
4012
3768
  self.callbacks["balance"] = callback
4013
3769
  self.do_send(self.ws, json.dumps(options), True)
4014
3770
 
4015
- @deprecated(version="2.2.0", reason="Use deposit_assets instead")
4016
- def depositAssets(self, symbol: str, callback: Callable[[Any], None]) -> None:
4017
- return self.deposit_assets(symbol, callback)
4018
-
4019
3771
  def deposit_assets(self, symbol: str, callback: Callable[[Any], None]) -> None:
4020
3772
  """
4021
3773
  Get the deposit address (with paymentId for some assets) or bank account information to increase your
@@ -4058,10 +3810,6 @@ class Bitvavo:
4058
3810
  True,
4059
3811
  )
4060
3812
 
4061
- @deprecated(version="2.2.0", reason="Use deposit_history instead")
4062
- def depositHistory(self, options: anydict, callback: Callable[[Any], None]) -> None:
4063
- return self.deposit_history(options, callback)
4064
-
4065
3813
  def deposit_history(self, options: anydict, callback: Callable[[Any], None]) -> None:
4066
3814
  """Get the deposit history of the account
4067
3815
 
@@ -4116,17 +3864,6 @@ class Bitvavo:
4116
3864
  options["action"] = "privateGetDepositHistory"
4117
3865
  self.do_send(self.ws, json.dumps(options), True)
4118
3866
 
4119
- @deprecated(version="2.2.0", reason="Use withdraw_assets instead")
4120
- def withdrawAssets(
4121
- self,
4122
- symbol: str,
4123
- amount: str,
4124
- address: str,
4125
- body: anydict,
4126
- callback: Callable[[Any], None],
4127
- ) -> None:
4128
- return self.withdraw_assets(symbol, amount, address, body, callback)
4129
-
4130
3867
  def withdraw_assets(
4131
3868
  self,
4132
3869
  symbol: str,
@@ -4180,10 +3917,6 @@ class Bitvavo:
4180
3917
  body["address"] = address
4181
3918
  self.do_send(self.ws, json.dumps(body), True)
4182
3919
 
4183
- @deprecated(version="2.2.0", reason="Use withdrawal_history instead")
4184
- def withdrawalHistory(self, options: anydict, callback: Callable[[Any], None]) -> None:
4185
- return self.withdrawal_history(options, callback)
4186
-
4187
3920
  def withdrawal_history(self, options: anydict, callback: Callable[[Any], None]) -> None:
4188
3921
  """Get the withdrawal history
4189
3922
 
@@ -4227,10 +3960,6 @@ class Bitvavo:
4227
3960
  options["action"] = "privateGetWithdrawalHistory"
4228
3961
  self.do_send(self.ws, json.dumps(options), True)
4229
3962
 
4230
- @deprecated(version="2.2.0", reason="Use subscription_ticker instead")
4231
- def subscriptionTicker(self, market: str, callback: Callable[[Any], None]) -> None:
4232
- return self.subscription_ticker(market, callback)
4233
-
4234
3963
  def subscription_ticker(self, market: str, callback: Callable[[Any], None]) -> None:
4235
3964
  # TODO(NostraDavid): one possible improvement here is to turn `market` into a list of markets, so we can sub
4236
3965
  # to all of them at once. Same goes for other `subscription*()`
@@ -4283,10 +4012,6 @@ class Bitvavo:
4283
4012
  ),
4284
4013
  )
4285
4014
 
4286
- @deprecated(version="2.2.0", reason="Use subscription_ticker24h instead")
4287
- def subscriptionTicker24h(self, market: str, callback: Callable[[Any], None]) -> None:
4288
- return self.subscription_ticker24h(market, callback)
4289
-
4290
4015
  def subscription_ticker24h(self, market: str, callback: Callable[[Any], None]) -> None:
4291
4016
  """
4292
4017
  Subscribe to the ticker-24-hour channel, which means `callback` gets passed the new object every second, if
@@ -4344,10 +4069,6 @@ class Bitvavo:
4344
4069
  ),
4345
4070
  )
4346
4071
 
4347
- @deprecated(version="2.2.0", reason="Use subscription_account instead")
4348
- def subscriptionAccount(self, market: str, callback: Callable[[Any], None]) -> None:
4349
- return self.subscription_account(market, callback)
4350
-
4351
4072
  def subscription_account(self, market: str, callback: Callable[[Any], None]) -> None:
4352
4073
  """
4353
4074
  Subscribes to the account channel, which sends an update whenever an event happens which is related to
@@ -4426,10 +4147,6 @@ class Bitvavo:
4426
4147
  True,
4427
4148
  )
4428
4149
 
4429
- @deprecated(version="2.2.0", reason="Use subscription_candles instead")
4430
- def subscriptionCandles(self, market: str, interval: str, callback: Callable[[Any], None]) -> None:
4431
- return self.subscription_candles(market, interval, callback)
4432
-
4433
4150
  def subscription_candles(self, market: str, interval: str, callback: Callable[[Any], None]) -> None:
4434
4151
  """Subscribes to candles and returns a candle each time a new one is formed, depending on the interval
4435
4152
 
@@ -4494,10 +4211,6 @@ class Bitvavo:
4494
4211
  ),
4495
4212
  )
4496
4213
 
4497
- @deprecated(version="2.2.0", reason="Use subscription_trades instead")
4498
- def subscriptionTrades(self, market: str, callback: Callable[[Any], None]) -> None:
4499
- return self.subscription_trades(market, callback)
4500
-
4501
4214
  def subscription_trades(self, market: str, callback: Callable[[Any], None]) -> None:
4502
4215
  """Subscribes to trades, which sends an object whenever a trade has occurred.
4503
4216
 
@@ -4545,10 +4258,6 @@ class Bitvavo:
4545
4258
  ),
4546
4259
  )
4547
4260
 
4548
- @deprecated(version="2.2.0", reason="Use subscription_book_update instead")
4549
- def subscriptionBookUpdate(self, market: str, callback: Callable[[Any], None]) -> None:
4550
- return self.subscription_book_update(market, callback)
4551
-
4552
4261
  def subscription_book_update(self, market: str, callback: Callable[[Any], None]) -> None:
4553
4262
  """Subscribes to the book and returns a delta on every change to the book.
4554
4263
 
@@ -4616,10 +4325,6 @@ class Bitvavo:
4616
4325
  ),
4617
4326
  )
4618
4327
 
4619
- @deprecated(version="2.2.0", reason="Use subscription_book instead")
4620
- def subscriptionBook(self, market: str, callback: Callable[[Any], None]) -> None:
4621
- return self.subscription_book(market, callback)
4622
-
4623
4328
  def subscription_book(self, market: str, callback: Callable[[Any], None]) -> None:
4624
4329
  """Subscribes to the book and returns a delta on every change to the book.
4625
4330