bitvavo-api-upgraded 2.2.0__py3-none-any.whl → 3.0.0__py3-none-any.whl

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.
@@ -25,7 +25,7 @@ configure_loggers()
25
25
  logger = get_logger(__name__)
26
26
 
27
27
 
28
- def createSignature(timestamp: ms, method: str, url: str, body: anydict | None, api_secret: str) -> str:
28
+ def create_signature(timestamp: ms, method: str, url: str, body: anydict | None, api_secret: str) -> str:
29
29
  string = f"{timestamp}{method}/v2{url}"
30
30
  if body is not None and len(body.keys()) > 0:
31
31
  string += json.dumps(body, separators=(",", ":"))
@@ -33,7 +33,7 @@ def createSignature(timestamp: ms, method: str, url: str, body: anydict | None,
33
33
  return signature
34
34
 
35
35
 
36
- def createPostfix(options: anydict | None) -> str:
36
+ def create_postfix(options: anydict | None) -> str:
37
37
  """Generate a URL postfix, based on the `options` dict.
38
38
 
39
39
  ---
@@ -67,15 +67,15 @@ def _epoch_millis(dt: dt.datetime) -> int:
67
67
  return int(dt.timestamp() * 1000)
68
68
 
69
69
 
70
- def asksCompare(a: float, b: float) -> bool:
70
+ def asks_compare(a: float, b: float) -> bool:
71
71
  return a < b
72
72
 
73
73
 
74
- def bidsCompare(a: float, b: float) -> bool:
74
+ def bids_compare(a: float, b: float) -> bool:
75
75
  return a > b
76
76
 
77
77
 
78
- def sortAndInsert(
78
+ def sort_and_insert(
79
79
  asks_or_bids: list[list[str]],
80
80
  update: list[list[str]],
81
81
  compareFunc: Callable[[float, float], bool],
@@ -101,7 +101,7 @@ def sortAndInsert(
101
101
  return asks_or_bids
102
102
 
103
103
 
104
- def processLocalBook(ws: Bitvavo.WebSocketAppFacade, message: anydict) -> None:
104
+ def process_local_book(ws: Bitvavo.WebSocketAppFacade, message: anydict) -> None:
105
105
  market: str = ""
106
106
  if "action" in message:
107
107
  if message["action"] == "getBook":
@@ -115,10 +115,10 @@ def processLocalBook(ws: Bitvavo.WebSocketAppFacade, message: anydict) -> None:
115
115
 
116
116
  if message["nonce"] != ws.localBook[market]["nonce"] + 1:
117
117
  # I think I've fixed this, by looking at the other Bitvavo repos (search for 'nonce' or '!=' 😆)
118
- ws.subscriptionBook(market, ws.callbacks[market])
118
+ ws.subscription_book(market, ws.callbacks[market])
119
119
  return
120
- ws.localBook[market]["bids"] = sortAndInsert(ws.localBook[market]["bids"], message["bids"], bidsCompare)
121
- ws.localBook[market]["asks"] = sortAndInsert(ws.localBook[market]["asks"], message["asks"], asksCompare)
120
+ ws.localBook[market]["bids"] = sort_and_insert(ws.localBook[market]["bids"], message["bids"], bids_compare)
121
+ ws.localBook[market]["asks"] = sort_and_insert(ws.localBook[market]["asks"], message["asks"], asks_compare)
122
122
  ws.localBook[market]["nonce"] = message["nonce"]
123
123
 
124
124
  if market != "":
@@ -423,7 +423,7 @@ class Bitvavo:
423
423
  )
424
424
  time.sleep(napTime + 1) # +1 to add a tiny bit of buffer time
425
425
 
426
- def calcLag(self) -> ms:
426
+ def calc_lag(self) -> ms:
427
427
  """
428
428
  Calculate the time difference between the client and server; use this value with BITVAVO_API_UPGRADED_LAG,
429
429
  when you make an api call, to precent 304 errors.
@@ -445,8 +445,8 @@ class Bitvavo:
445
445
 
446
446
  return ms(sum(lag_list) / len(lag_list))
447
447
 
448
- def getRemainingLimit(self) -> int:
449
- """Get the remaing rate limit
448
+ def get_remaining_limit(self) -> int:
449
+ """Get the remaining rate limit
450
450
 
451
451
  ---
452
452
  Returns:
@@ -456,7 +456,7 @@ class Bitvavo:
456
456
  """
457
457
  return self.rateLimitRemaining
458
458
 
459
- def updateRateLimit(self, response: anydict | errordict) -> None:
459
+ def update_rate_limit(self, response: anydict | errordict) -> None:
460
460
  """
461
461
  Update the rate limited
462
462
 
@@ -488,7 +488,7 @@ class Bitvavo:
488
488
  logger.info("napping-until-ban-lifted")
489
489
  time.sleep(timeToWait + 1) # plus one second to ENSURE we're able to run again.
490
490
 
491
- def publicRequest(
491
+ def public_request(
492
492
  self,
493
493
  url: str,
494
494
  rateLimitingWeight: int = 1,
@@ -541,7 +541,7 @@ class Bitvavo:
541
541
 
542
542
  if api_key:
543
543
  now = time_ms() + bitvavo_upgraded_settings.LAG
544
- sig = createSignature(now, "GET", url.replace(self.base, ""), None, api_secret)
544
+ sig = create_signature(now, "GET", url.replace(self.base, ""), None, api_secret)
545
545
  headers = {
546
546
  "bitvavo-access-key": api_key,
547
547
  "bitvavo-access-signature": sig,
@@ -559,11 +559,11 @@ class Bitvavo:
559
559
  self._update_rate_limit_for_key(key_index, dict(r.headers))
560
560
 
561
561
  # Also update legacy rate limit tracking
562
- self.updateRateLimit(r.json() if "error" in r.json() else dict(r.headers))
562
+ self.update_rate_limit(r.json() if "error" in r.json() else dict(r.headers))
563
563
 
564
564
  return r.json() # type:ignore[no-any-return]
565
565
 
566
- def privateRequest(
566
+ def private_request(
567
567
  self,
568
568
  endpoint: str,
569
569
  postfix: str,
@@ -616,7 +616,7 @@ class Bitvavo:
616
616
  self._current_api_secret = api_secret
617
617
 
618
618
  now = time_ms() + bitvavo_upgraded_settings.LAG
619
- sig = createSignature(now, method, (endpoint + postfix), body, api_secret)
619
+ sig = create_signature(now, method, (endpoint + postfix), body, api_secret)
620
620
  url = self.base + endpoint + postfix
621
621
  headers = {
622
622
  "bitvavo-access-key": api_key,
@@ -651,7 +651,7 @@ class Bitvavo:
651
651
  self._update_rate_limit_for_key(key_index, dict(r.headers))
652
652
 
653
653
  # Also update legacy rate limit tracking
654
- self.updateRateLimit(r.json() if "error" in r.json() else dict(r.headers))
654
+ self.update_rate_limit(r.json() if "error" in r.json() else dict(r.headers))
655
655
 
656
656
  return r.json()
657
657
 
@@ -685,7 +685,7 @@ class Bitvavo:
685
685
  {"time": 1539180275424 }
686
686
  ```
687
687
  """
688
- return self.publicRequest(f"{self.base}/time") # type: ignore[return-value]
688
+ return self.public_request(f"{self.base}/time") # type: ignore[return-value]
689
689
 
690
690
  def markets(
691
691
  self,
@@ -763,8 +763,8 @@ class Bitvavo:
763
763
  # The specific DataFrame type depends on the selected format.
764
764
  ```
765
765
  """
766
- postfix = createPostfix(options)
767
- result = self.publicRequest(f"{self.base}/markets{postfix}") # type: ignore[return-value]
766
+ postfix = create_postfix(options)
767
+ result = self.public_request(f"{self.base}/markets{postfix}") # type: ignore[return-value]
768
768
  return convert_to_dataframe(result, output_format)
769
769
 
770
770
  def assets(
@@ -841,8 +841,8 @@ class Bitvavo:
841
841
  # The specific DataFrame type depends on the selected format.
842
842
  ```
843
843
  """
844
- postfix = createPostfix(options)
845
- result = self.publicRequest(f"{self.base}/assets{postfix}") # type: ignore[return-value]
844
+ postfix = create_postfix(options)
845
+ result = self.public_request(f"{self.base}/assets{postfix}") # type: ignore[return-value]
846
846
  return convert_to_dataframe(result, output_format)
847
847
 
848
848
  def book(self, market: str, options: intdict | None = None) -> dict[str, str | int | list[str]] | errordict:
@@ -887,10 +887,10 @@ class Bitvavo:
887
887
  assert result == 714.48 # EUR can be gained from this bid if it's sold (minus the fee)
888
888
  ```
889
889
  """
890
- postfix = createPostfix(options)
891
- return self.publicRequest(f"{self.base}/{market}/book{postfix}") # type: ignore[return-value]
890
+ postfix = create_postfix(options)
891
+ return self.public_request(f"{self.base}/{market}/book{postfix}") # type: ignore[return-value]
892
892
 
893
- def publicTrades(
893
+ def public_trades(
894
894
  self,
895
895
  market: str,
896
896
  options: strintdict | None = None,
@@ -963,8 +963,8 @@ class Bitvavo:
963
963
  # Returns the above data as a DataFrame in the requested format (pandas, polars, etc.)
964
964
  ```
965
965
  """
966
- postfix = createPostfix(options)
967
- result = self.publicRequest(f"{self.base}/{market}/trades{postfix}", 5) # type: ignore[return-value]
966
+ postfix = create_postfix(options)
967
+ result = self.public_request(f"{self.base}/{market}/trades{postfix}", 5) # type: ignore[return-value]
968
968
  return convert_to_dataframe(result, output_format)
969
969
 
970
970
  def candles(
@@ -1053,11 +1053,11 @@ class Bitvavo:
1053
1053
  options["start"] = _epoch_millis(start)
1054
1054
  if end is not None:
1055
1055
  options["end"] = _epoch_millis(end)
1056
- postfix = createPostfix(options)
1057
- result = self.publicRequest(f"{self.base}/{market}/candles{postfix}") # type: ignore[return-value]
1056
+ postfix = create_postfix(options)
1057
+ result = self.public_request(f"{self.base}/{market}/candles{postfix}") # type: ignore[return-value]
1058
1058
  return convert_candles_to_dataframe(result, output_format)
1059
1059
 
1060
- def tickerPrice(
1060
+ def ticker_price(
1061
1061
  self,
1062
1062
  options: strdict | None = None,
1063
1063
  output_format: OutputFormat = OutputFormat.DICT,
@@ -1127,11 +1127,11 @@ class Bitvavo:
1127
1127
  # Returns a DataFrame with columns: market, price
1128
1128
  ```
1129
1129
  """
1130
- postfix = createPostfix(options)
1131
- result = self.publicRequest(f"{self.base}/ticker/price{postfix}") # type: ignore[return-value]
1130
+ postfix = create_postfix(options)
1131
+ result = self.public_request(f"{self.base}/ticker/price{postfix}") # type: ignore[return-value]
1132
1132
  return convert_to_dataframe(result, output_format)
1133
1133
 
1134
- def tickerBook(
1134
+ def ticker_book(
1135
1135
  self,
1136
1136
  options: strdict | None = None,
1137
1137
  output_format: OutputFormat = OutputFormat.DICT,
@@ -1194,8 +1194,8 @@ class Bitvavo:
1194
1194
  # Returns a DataFrame with columns: market, bid, ask, bidSize, askSize
1195
1195
  ```
1196
1196
  """
1197
- postfix = createPostfix(options)
1198
- result = self.publicRequest(f"{self.base}/ticker/book{postfix}") # type: ignore[return-value]
1197
+ postfix = create_postfix(options)
1198
+ result = self.public_request(f"{self.base}/ticker/book{postfix}") # type: ignore[return-value]
1199
1199
  return convert_to_dataframe(result, output_format)
1200
1200
 
1201
1201
  def ticker24h(
@@ -1283,11 +1283,11 @@ class Bitvavo:
1283
1283
  rateLimitingWeight = 25
1284
1284
  if "market" in options:
1285
1285
  rateLimitingWeight = 1
1286
- postfix = createPostfix(options)
1287
- result = self.publicRequest(f"{self.base}/ticker/24h{postfix}", rateLimitingWeight) # type: ignore[return-value]
1286
+ postfix = create_postfix(options)
1287
+ result = self.public_request(f"{self.base}/ticker/24h{postfix}", rateLimitingWeight) # type: ignore[return-value]
1288
1288
  return convert_to_dataframe(result, output_format)
1289
1289
 
1290
- def reportTrades(
1290
+ def report_trades(
1291
1291
  self,
1292
1292
  market: str,
1293
1293
  options: strintdict | None = None,
@@ -1350,11 +1350,11 @@ class Bitvavo:
1350
1350
  ]
1351
1351
  ```
1352
1352
  """
1353
- postfix = createPostfix(options)
1354
- result = self.publicRequest(f"{self.base}/report/{market}/trades{postfix}", 5) # type: ignore[return-value]
1353
+ postfix = create_postfix(options)
1354
+ result = self.public_request(f"{self.base}/report/{market}/trades{postfix}", 5) # type: ignore[return-value]
1355
1355
  return convert_to_dataframe(result, output_format)
1356
1356
 
1357
- def reportBook(self, market: str, options: intdict | None = None) -> dict[str, str | int | list[str]] | errordict:
1357
+ def report_book(self, market: str, options: intdict | None = None) -> dict[str, str | int | list[str]] | errordict:
1358
1358
  """Get MiCA-compliant order book report for a specific market
1359
1359
 
1360
1360
  Returns the list of all bids and asks for the specified market, sorted by price.
@@ -1391,10 +1391,10 @@ class Bitvavo:
1391
1391
  }
1392
1392
  ```
1393
1393
  """
1394
- postfix = createPostfix(options)
1395
- return self.publicRequest(f"{self.base}/report/{market}/book{postfix}") # type: ignore[return-value]
1394
+ postfix = create_postfix(options)
1395
+ return self.public_request(f"{self.base}/report/{market}/book{postfix}") # type: ignore[return-value]
1396
1396
 
1397
- def placeOrder(self, market: str, side: str, orderType: str, operatorId: int, body: anydict) -> anydict:
1397
+ def place_order(self, market: str, side: str, orderType: str, operatorId: int, body: anydict) -> anydict:
1398
1398
  """Place a new order on the exchange
1399
1399
 
1400
1400
  ---
@@ -1523,9 +1523,9 @@ class Bitvavo:
1523
1523
  body["side"] = side
1524
1524
  body["orderType"] = orderType
1525
1525
  body["operatorId"] = operatorId
1526
- return self.privateRequest("/order", "", body, "POST") # type: ignore[return-value]
1526
+ return self.private_request("/order", "", body, "POST") # type: ignore[return-value]
1527
1527
 
1528
- def updateOrder(self, market: str, orderId: str, operatorId: int, body: anydict) -> anydict:
1528
+ def update_order(self, market: str, orderId: str, operatorId: int, body: anydict) -> anydict:
1529
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.
1530
1530
 
1531
1531
  ---
@@ -1609,9 +1609,9 @@ class Bitvavo:
1609
1609
  body["market"] = market
1610
1610
  body["orderId"] = orderId
1611
1611
  body["operatorId"] = operatorId
1612
- return self.privateRequest("/order", "", body, "PUT") # type: ignore[return-value]
1612
+ return self.private_request("/order", "", body, "PUT") # type: ignore[return-value]
1613
1613
 
1614
- def cancelOrder(
1614
+ def cancel_order(
1615
1615
  self,
1616
1616
  market: str,
1617
1617
  operatorId: int,
@@ -1657,10 +1657,10 @@ class Bitvavo:
1657
1657
  elif orderId is not None:
1658
1658
  params["orderId"] = orderId
1659
1659
 
1660
- postfix = createPostfix(params)
1661
- return self.privateRequest("/order", postfix, {}, "DELETE") # type: ignore[return-value]
1660
+ postfix = create_postfix(params)
1661
+ return self.private_request("/order", postfix, {}, "DELETE") # type: ignore[return-value]
1662
1662
 
1663
- def getOrder(self, market: str, orderId: str) -> list[anydict] | errordict:
1663
+ def get_order(self, market: str, orderId: str) -> list[anydict] | errordict:
1664
1664
  """Get an existing order for a specific market
1665
1665
 
1666
1666
  ---
@@ -1722,10 +1722,10 @@ class Bitvavo:
1722
1722
  }
1723
1723
  ```
1724
1724
  """
1725
- postfix = createPostfix({"market": market, "orderId": orderId})
1726
- return self.privateRequest("/order", postfix, {}, "GET") # type: ignore[return-value]
1725
+ postfix = create_postfix({"market": market, "orderId": orderId})
1726
+ return self.private_request("/order", postfix, {}, "GET") # type: ignore[return-value]
1727
1727
 
1728
- def getOrders(self, market: str, options: anydict | None = None) -> list[anydict] | errordict:
1728
+ def get_orders(self, market: str, options: anydict | None = None) -> list[anydict] | errordict:
1729
1729
  """Get multiple existing orders for a specific market
1730
1730
 
1731
1731
  ---
@@ -1798,10 +1798,10 @@ class Bitvavo:
1798
1798
  """ # noqa: E501
1799
1799
  options = _default(options, {})
1800
1800
  options["market"] = market
1801
- postfix = createPostfix(options)
1802
- return self.privateRequest("/orders", postfix, {}, "GET", 5) # type: ignore[return-value]
1801
+ postfix = create_postfix(options)
1802
+ return self.private_request("/orders", postfix, {}, "GET", 5) # type: ignore[return-value]
1803
1803
 
1804
- def cancelOrders(self, options: anydict | None = None) -> list[strdict] | errordict:
1804
+ def cancel_orders(self, options: anydict | None = None) -> list[strdict] | errordict:
1805
1805
  """Cancel all existing orders for a specific market (or account)
1806
1806
 
1807
1807
  ---
@@ -1826,10 +1826,10 @@ class Bitvavo:
1826
1826
  ]
1827
1827
  ```
1828
1828
  """
1829
- postfix = createPostfix(options)
1830
- return self.privateRequest("/orders", postfix, {}, "DELETE") # type: ignore[return-value]
1829
+ postfix = create_postfix(options)
1830
+ return self.private_request("/orders", postfix, {}, "DELETE") # type: ignore[return-value]
1831
1831
 
1832
- def ordersOpen(self, options: anydict | None = None) -> list[anydict] | errordict:
1832
+ def orders_open(self, options: anydict | None = None) -> list[anydict] | errordict:
1833
1833
  """Get all open orders, either for all markets, or a single market
1834
1834
 
1835
1835
  ---
@@ -1898,8 +1898,8 @@ class Bitvavo:
1898
1898
  rateLimitingWeight = 25
1899
1899
  if "market" in options:
1900
1900
  rateLimitingWeight = 1
1901
- postfix = createPostfix(options)
1902
- return self.privateRequest("/ordersOpen", postfix, {}, "GET", rateLimitingWeight) # type: ignore[return-value]
1901
+ postfix = create_postfix(options)
1902
+ return self.private_request("/ordersOpen", postfix, {}, "GET", rateLimitingWeight) # type: ignore[return-value]
1903
1903
 
1904
1904
  def trades(
1905
1905
  self,
@@ -1962,8 +1962,8 @@ class Bitvavo:
1962
1962
  """ # noqa: E501
1963
1963
  options = _default(options, {})
1964
1964
  options["market"] = market
1965
- postfix = createPostfix(options)
1966
- result = self.privateRequest("/trades", postfix, {}, "GET", 5) # type: ignore[return-value]
1965
+ postfix = create_postfix(options)
1966
+ result = self.private_request("/trades", postfix, {}, "GET", 5) # type: ignore[return-value]
1967
1967
  return convert_to_dataframe(result, output_format)
1968
1968
 
1969
1969
  def account(self) -> dict[str, strdict]:
@@ -1987,7 +1987,7 @@ class Bitvavo:
1987
1987
  }
1988
1988
  ```
1989
1989
  """
1990
- return self.privateRequest("/account", "", {}, "GET") # type: ignore[return-value]
1990
+ return self.private_request("/account", "", {}, "GET") # type: ignore[return-value]
1991
1991
 
1992
1992
  def fees(self, market: str | None = None, quote: str | None = None) -> list[strdict] | errordict:
1993
1993
  """Get market fees for a specific market or quote currency
@@ -2024,8 +2024,8 @@ class Bitvavo:
2024
2024
  options["market"] = market
2025
2025
  if quote is not None:
2026
2026
  options["quote"] = quote
2027
- postfix = createPostfix(options)
2028
- return self.privateRequest("/account/fees", postfix, {}, "GET") # type: ignore[return-value]
2027
+ postfix = create_postfix(options)
2028
+ return self.private_request("/account/fees", postfix, {}, "GET") # type: ignore[return-value]
2029
2029
 
2030
2030
  def balance(
2031
2031
  self,
@@ -2081,11 +2081,11 @@ class Bitvavo:
2081
2081
  # with columns: symbol, available, inOrder
2082
2082
  ```
2083
2083
  """
2084
- postfix = createPostfix(options)
2085
- result = self.privateRequest("/balance", postfix, {}, "GET", 5) # type: ignore[return-value]
2084
+ postfix = create_postfix(options)
2085
+ result = self.private_request("/balance", postfix, {}, "GET", 5) # type: ignore[return-value]
2086
2086
  return convert_to_dataframe(result, output_format)
2087
2087
 
2088
- def accountHistory(self, options: strintdict | None = None) -> anydict | errordict:
2088
+ def account_history(self, options: strintdict | None = None) -> anydict | errordict:
2089
2089
  """Get all past transactions for your account
2090
2090
 
2091
2091
  ---
@@ -2129,10 +2129,10 @@ class Bitvavo:
2129
2129
  }
2130
2130
  ```
2131
2131
  """
2132
- postfix = createPostfix(options)
2133
- return self.privateRequest("/account/history", postfix, {}, "GET") # type: ignore[return-value]
2132
+ postfix = create_postfix(options)
2133
+ return self.private_request("/account/history", postfix, {}, "GET") # type: ignore[return-value]
2134
2134
 
2135
- def depositAssets(self, symbol: str) -> strdict:
2135
+ def deposit_assets(self, symbol: str) -> strdict:
2136
2136
  """Get the deposit address (with paymentId for some assets) or bank account information to increase your balance
2137
2137
 
2138
2138
  ---
@@ -2164,10 +2164,10 @@ class Bitvavo:
2164
2164
  }
2165
2165
  ```
2166
2166
  """
2167
- postfix = createPostfix({"symbol": symbol})
2168
- return self.privateRequest("/deposit", postfix, {}, "GET") # type: ignore[return-value]
2167
+ postfix = create_postfix({"symbol": symbol})
2168
+ return self.private_request("/deposit", postfix, {}, "GET") # type: ignore[return-value]
2169
2169
 
2170
- def depositHistory(self, options: anydict | None = None) -> list[anydict] | errordict:
2170
+ def deposit_history(self, options: anydict | None = None) -> list[anydict] | errordict:
2171
2171
  """Get the deposit history of the account
2172
2172
 
2173
2173
  Even when you want something from a single `symbol`, you'll still receive a list with multiple deposits.
@@ -2215,10 +2215,10 @@ class Bitvavo:
2215
2215
  ]
2216
2216
  ```
2217
2217
  """ # noqa: E501
2218
- postfix = createPostfix(options)
2219
- return self.privateRequest("/depositHistory", postfix, {}, "GET", 5) # type: ignore[return-value]
2218
+ postfix = create_postfix(options)
2219
+ return self.private_request("/depositHistory", postfix, {}, "GET", 5) # type: ignore[return-value]
2220
2220
 
2221
- def withdrawAssets(self, symbol: str, amount: str, address: str, body: anydict) -> anydict:
2221
+ def withdraw_assets(self, symbol: str, amount: str, address: str, body: anydict) -> anydict:
2222
2222
  """Withdraw a coin/token to an external crypto address or bank account.
2223
2223
 
2224
2224
  ---
@@ -2253,9 +2253,9 @@ class Bitvavo:
2253
2253
  body["symbol"] = symbol
2254
2254
  body["amount"] = amount
2255
2255
  body["address"] = address
2256
- return self.privateRequest("/withdrawal", "", body, "POST") # type: ignore[return-value]
2256
+ return self.private_request("/withdrawal", "", body, "POST") # type: ignore[return-value]
2257
2257
 
2258
- def withdrawalHistory(
2258
+ def withdrawal_history(
2259
2259
  self,
2260
2260
  options: anydict | None = None,
2261
2261
  output_format: OutputFormat = OutputFormat.DICT,
@@ -2312,8 +2312,8 @@ class Bitvavo:
2312
2312
  ]
2313
2313
  ```
2314
2314
  """ # noqa: E501
2315
- postfix = createPostfix(options)
2316
- result = self.privateRequest("/withdrawalHistory", postfix, {}, "GET", 5) # type: ignore[return-value]
2315
+ postfix = create_postfix(options)
2316
+ result = self.private_request("/withdrawalHistory", postfix, {}, "GET", 5) # type: ignore[return-value]
2317
2317
  return convert_to_dataframe(result, output_format)
2318
2318
 
2319
2319
  # API Key Management Helper Methods
@@ -2428,7 +2428,7 @@ class Bitvavo:
2428
2428
  "rate_limit_reset_at": int(self.rateLimitResetAt),
2429
2429
  }
2430
2430
 
2431
- def newWebsocket(self) -> Bitvavo.WebSocketAppFacade:
2431
+ def new_websocket(self) -> Bitvavo.WebSocketAppFacade:
2432
2432
  return Bitvavo.WebSocketAppFacade(self.APIKEY, self.APISECRET, self.ACCESSWINDOW, self.wsUrl, self)
2433
2433
 
2434
2434
  class WebSocketAppFacade:
@@ -2477,18 +2477,18 @@ class Bitvavo:
2477
2477
  self.keepBookCopy = False
2478
2478
  self.localBook: anydict = {}
2479
2479
 
2480
- def closeSocket(self) -> None:
2480
+ def close_socket(self) -> None:
2481
2481
  self.ws.close()
2482
2482
  self.keepAlive = False
2483
2483
  self.receiveThread.join()
2484
2484
 
2485
- def waitForSocket(self, ws: WebSocketApp, message: str, private: bool) -> None: # noqa: ARG002, FBT001
2485
+ def wait_for_socket(self, ws: WebSocketApp, message: str, private: bool) -> None: # noqa: ARG002, FBT001
2486
2486
  while self.keepAlive:
2487
2487
  if (not private and self.open) or (private and self.authenticated and self.open):
2488
2488
  return
2489
2489
  time.sleep(0.1)
2490
2490
 
2491
- def doSend(self, ws: WebSocketApp, message: str, private: bool = False) -> None: # noqa: FBT001, FBT002
2491
+ def do_send(self, ws: WebSocketApp, message: str, private: bool = False) -> None: # noqa: FBT001, FBT002
2492
2492
  # TODO(NostraDavid): add nap-time to the websocket, or do it here; I don't know yet.
2493
2493
  if private and self.APIKEY == "":
2494
2494
  logger.error(
@@ -2496,7 +2496,7 @@ class Bitvavo:
2496
2496
  tip="set the API key to be able to make private API calls",
2497
2497
  )
2498
2498
  return
2499
- self.waitForSocket(ws, message, private)
2499
+ self.wait_for_socket(ws, message, private)
2500
2500
  ws.send(message)
2501
2501
  if self.bitvavo.debugging:
2502
2502
  logger.debug("message-sent", message=message)
@@ -2509,7 +2509,7 @@ class Bitvavo:
2509
2509
 
2510
2510
  if "error" in msg_dict:
2511
2511
  if msg_dict["errorCode"] == 105: # noqa: PLR2004
2512
- self.bitvavo.updateRateLimit(msg_dict)
2512
+ self.bitvavo.update_rate_limit(msg_dict)
2513
2513
  if "error" in callbacks:
2514
2514
  callbacks["error"](msg_dict)
2515
2515
  else:
@@ -2609,47 +2609,47 @@ class Bitvavo:
2609
2609
  if self.bitvavo.debugging:
2610
2610
  logger.debug("websocket-closed")
2611
2611
 
2612
- def checkReconnect(self) -> None: # noqa: C901, PLR0912 (too-complex)
2612
+ def check_reconnect(self) -> None: # noqa: C901, PLR0912 (too-complex)
2613
2613
  if "subscriptionTicker" in self.callbacks:
2614
2614
  for market in self.callbacks["subscriptionTicker"]:
2615
- self.subscriptionTicker(market, self.callbacks["subscriptionTicker"][market])
2615
+ self.subscription_ticker(market, self.callbacks["subscriptionTicker"][market])
2616
2616
  if "subscriptionTicker24h" in self.callbacks:
2617
2617
  for market in self.callbacks["subscriptionTicker24h"]:
2618
- self.subscriptionTicker(market, self.callbacks["subscriptionTicker24h"][market])
2618
+ self.subscription_ticker(market, self.callbacks["subscriptionTicker24h"][market])
2619
2619
  if "subscriptionAccount" in self.callbacks:
2620
2620
  for market in self.callbacks["subscriptionAccount"]:
2621
- self.subscriptionAccount(market, self.callbacks["subscriptionAccount"][market])
2621
+ self.subscription_account(market, self.callbacks["subscriptionAccount"][market])
2622
2622
  if "subscriptionCandles" in self.callbacks:
2623
2623
  for market in self.callbacks["subscriptionCandles"]:
2624
2624
  for interval in self.callbacks["subscriptionCandles"][market]:
2625
- self.subscriptionCandles(
2625
+ self.subscription_candles(
2626
2626
  market,
2627
2627
  interval,
2628
2628
  self.callbacks["subscriptionCandles"][market][interval],
2629
2629
  )
2630
2630
  if "subscriptionTrades" in self.callbacks:
2631
2631
  for market in self.callbacks["subscriptionTrades"]:
2632
- self.subscriptionTrades(market, self.callbacks["subscriptionTrades"][market])
2632
+ self.subscription_trades(market, self.callbacks["subscriptionTrades"][market])
2633
2633
  if "subscriptionBookUpdate" in self.callbacks:
2634
2634
  for market in self.callbacks["subscriptionBookUpdate"]:
2635
- self.subscriptionBookUpdate(market, self.callbacks["subscriptionBookUpdate"][market])
2635
+ self.subscription_book_update(market, self.callbacks["subscriptionBookUpdate"][market])
2636
2636
  if "subscriptionBookUser" in self.callbacks:
2637
2637
  for market in self.callbacks["subscriptionBookUser"]:
2638
- self.subscriptionBook(market, self.callbacks["subscriptionBookUser"][market])
2638
+ self.subscription_book(market, self.callbacks["subscriptionBookUser"][market])
2639
2639
 
2640
2640
  def on_open(self, ws: Any) -> None: # noqa: ARG002
2641
2641
  now = time_ms() + bitvavo_upgraded_settings.LAG
2642
2642
  self.open = True
2643
2643
  self.reconnectTimer = 0.5
2644
2644
  if self.APIKEY != "":
2645
- self.doSend(
2645
+ self.do_send(
2646
2646
  self.ws,
2647
2647
  json.dumps(
2648
2648
  {
2649
2649
  "window": str(self.ACCESSWINDOW),
2650
2650
  "action": "authenticate",
2651
2651
  "key": self.APIKEY,
2652
- "signature": createSignature(now, "GET", "/websocket", {}, self.APISECRET),
2652
+ "signature": create_signature(now, "GET", "/websocket", {}, self.APISECRET),
2653
2653
  "timestamp": now,
2654
2654
  },
2655
2655
  ),
@@ -2657,10 +2657,10 @@ class Bitvavo:
2657
2657
  if self.reconnect:
2658
2658
  if self.bitvavo.debugging:
2659
2659
  logger.debug("reconnecting")
2660
- thread = Thread(target=self.checkReconnect)
2660
+ thread = Thread(target=self.check_reconnect)
2661
2661
  thread.start()
2662
2662
 
2663
- def setErrorCallback(self, callback: Callable[[Any], None]) -> None:
2663
+ def set_error_callback(self, callback: Callable[[Any], None]) -> None:
2664
2664
  self.callbacks["error"] = callback
2665
2665
 
2666
2666
  def time(self, callback: Callable[[Any], None]) -> None:
@@ -2688,7 +2688,7 @@ class Bitvavo:
2688
2688
  ```
2689
2689
  """
2690
2690
  self.callbacks["time"] = callback
2691
- self.doSend(self.ws, json.dumps({"action": "getTime"}))
2691
+ self.do_send(self.ws, json.dumps({"action": "getTime"}))
2692
2692
 
2693
2693
  def markets(self, options: anydict, callback: Callable[[Any], None]) -> None:
2694
2694
  """Get all available markets with some meta-information, unless options is given a `market` key.
@@ -2742,7 +2742,7 @@ class Bitvavo:
2742
2742
  """
2743
2743
  self.callbacks["markets"] = callback
2744
2744
  options["action"] = "getMarkets"
2745
- self.doSend(self.ws, json.dumps(options))
2745
+ self.do_send(self.ws, json.dumps(options))
2746
2746
 
2747
2747
  def assets(self, options: anydict, callback: Callable[[Any], None]) -> None:
2748
2748
  """Get all available assets, unless `options` is given a `symbol` key.
@@ -2793,7 +2793,7 @@ class Bitvavo:
2793
2793
  """
2794
2794
  self.callbacks["assets"] = callback
2795
2795
  options["action"] = "getAssets"
2796
- self.doSend(self.ws, json.dumps(options))
2796
+ self.do_send(self.ws, json.dumps(options))
2797
2797
 
2798
2798
  def book(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
2799
2799
  """Get a book (with two lists: asks and bids, as they're called)
@@ -2840,7 +2840,7 @@ class Bitvavo:
2840
2840
  self.callbacks["book"] = callback
2841
2841
  options["market"] = market
2842
2842
  options["action"] = "getBook"
2843
- self.doSend(self.ws, json.dumps(options))
2843
+ self.do_send(self.ws, json.dumps(options))
2844
2844
 
2845
2845
  def publicTrades(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
2846
2846
  """Publically available trades
@@ -2892,7 +2892,7 @@ class Bitvavo:
2892
2892
  self.callbacks["publicTrades"] = callback
2893
2893
  options["market"] = market
2894
2894
  options["action"] = "getTrades"
2895
- self.doSend(self.ws, json.dumps(options))
2895
+ self.do_send(self.ws, json.dumps(options))
2896
2896
 
2897
2897
  def candles(
2898
2898
  self,
@@ -2951,9 +2951,9 @@ class Bitvavo:
2951
2951
  options["market"] = market
2952
2952
  options["interval"] = interval
2953
2953
  options["action"] = "getCandles"
2954
- self.doSend(self.ws, json.dumps(options))
2954
+ self.do_send(self.ws, json.dumps(options))
2955
2955
 
2956
- def tickerPrice(self, options: anydict, callback: Callable[[Any], None]) -> None:
2956
+ def ticker_price(self, options: anydict, callback: Callable[[Any], None]) -> None:
2957
2957
  """Get the current price for each market
2958
2958
 
2959
2959
  ---
@@ -3001,9 +3001,9 @@ class Bitvavo:
3001
3001
  """
3002
3002
  self.callbacks["tickerPrice"] = callback
3003
3003
  options["action"] = "getTickerPrice"
3004
- self.doSend(self.ws, json.dumps(options))
3004
+ self.do_send(self.ws, json.dumps(options))
3005
3005
 
3006
- def tickerBook(self, options: anydict, callback: Callable[[Any], None]) -> None:
3006
+ def ticker_book(self, options: anydict, callback: Callable[[Any], None]) -> None:
3007
3007
  """Get current bid/ask, bidsize/asksize per market
3008
3008
 
3009
3009
  ---
@@ -3044,7 +3044,7 @@ class Bitvavo:
3044
3044
  """ # noqa: E501
3045
3045
  self.callbacks["tickerBook"] = callback
3046
3046
  options["action"] = "getTickerBook"
3047
- self.doSend(self.ws, json.dumps(options))
3047
+ self.do_send(self.ws, json.dumps(options))
3048
3048
 
3049
3049
  def ticker24h(self, options: anydict, callback: Callable[[Any], None]) -> None:
3050
3050
  """Get current bid/ask, bidsize/asksize per market
@@ -3111,9 +3111,9 @@ class Bitvavo:
3111
3111
  """
3112
3112
  self.callbacks["ticker24h"] = callback
3113
3113
  options["action"] = "getTicker24h"
3114
- self.doSend(self.ws, json.dumps(options))
3114
+ self.do_send(self.ws, json.dumps(options))
3115
3115
 
3116
- def placeOrder(
3116
+ def place_order(
3117
3117
  self,
3118
3118
  market: str,
3119
3119
  side: str,
@@ -3253,9 +3253,9 @@ class Bitvavo:
3253
3253
  body["orderType"] = orderType
3254
3254
  body["operatorId"] = operatorId
3255
3255
  body["action"] = "privateCreateOrder"
3256
- self.doSend(self.ws, json.dumps(body), True)
3256
+ self.do_send(self.ws, json.dumps(body), True)
3257
3257
 
3258
- def updateOrder(
3258
+ def update_order(
3259
3259
  self,
3260
3260
  market: str,
3261
3261
  orderId: str,
@@ -3351,9 +3351,9 @@ class Bitvavo:
3351
3351
  body["orderId"] = orderId
3352
3352
  body["operatorId"] = operatorId
3353
3353
  body["action"] = "privateUpdateOrder"
3354
- self.doSend(self.ws, json.dumps(body), True)
3354
+ self.do_send(self.ws, json.dumps(body), True)
3355
3355
 
3356
- def cancelOrder(
3356
+ def cancel_order(
3357
3357
  self,
3358
3358
  market: str,
3359
3359
  operatorId: int,
@@ -3403,9 +3403,9 @@ class Bitvavo:
3403
3403
  elif orderId is not None:
3404
3404
  options["orderId"] = orderId
3405
3405
 
3406
- self.doSend(self.ws, json.dumps(options), True)
3406
+ self.do_send(self.ws, json.dumps(options), True)
3407
3407
 
3408
- def getOrder(self, market: str, orderId: str, callback: Callable[[Any], None]) -> None:
3408
+ def get_order(self, market: str, orderId: str, callback: Callable[[Any], None]) -> None:
3409
3409
  """Get an existing order for a specific market
3410
3410
 
3411
3411
  ---
@@ -3474,9 +3474,9 @@ class Bitvavo:
3474
3474
  "market": market,
3475
3475
  "orderId": orderId,
3476
3476
  }
3477
- self.doSend(self.ws, json.dumps(options), True)
3477
+ self.do_send(self.ws, json.dumps(options), True)
3478
3478
 
3479
- def getOrders(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
3479
+ def get_orders(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
3480
3480
  """Get multiple existing orders for a specific market
3481
3481
 
3482
3482
  ---
@@ -3554,9 +3554,9 @@ class Bitvavo:
3554
3554
  self.callbacks["getOrders"] = callback
3555
3555
  options["action"] = "privateGetOrders"
3556
3556
  options["market"] = market
3557
- self.doSend(self.ws, json.dumps(options), True)
3557
+ self.do_send(self.ws, json.dumps(options), True)
3558
3558
 
3559
- def cancelOrders(self, options: anydict, callback: Callable[[Any], None]) -> None:
3559
+ def cancel_orders(self, options: anydict, callback: Callable[[Any], None]) -> None:
3560
3560
  """Cancel all existing orders for a specific market (or account)
3561
3561
 
3562
3562
  ---
@@ -3584,9 +3584,9 @@ class Bitvavo:
3584
3584
  """
3585
3585
  self.callbacks["cancelOrders"] = callback
3586
3586
  options["action"] = "privateCancelOrders"
3587
- self.doSend(self.ws, json.dumps(options), True)
3587
+ self.do_send(self.ws, json.dumps(options), True)
3588
3588
 
3589
- def ordersOpen(self, options: anydict, callback: Callable[[Any], None]) -> None:
3589
+ def orders_open(self, options: anydict, callback: Callable[[Any], None]) -> None:
3590
3590
  """Get all open orders, either for all markets, or a single market
3591
3591
 
3592
3592
  ---
@@ -3654,7 +3654,7 @@ class Bitvavo:
3654
3654
  """
3655
3655
  self.callbacks["ordersOpen"] = callback
3656
3656
  options["action"] = "privateGetOrdersOpen"
3657
- self.doSend(self.ws, json.dumps(options), True)
3657
+ self.do_send(self.ws, json.dumps(options), True)
3658
3658
 
3659
3659
  def trades(self, market: str, options: anydict, callback: Callable[[Any], None]) -> None:
3660
3660
  """Get all historic trades from this account
@@ -3703,7 +3703,7 @@ class Bitvavo:
3703
3703
  self.callbacks["trades"] = callback
3704
3704
  options["action"] = "privateGetTrades"
3705
3705
  options["market"] = market
3706
- self.doSend(self.ws, json.dumps(options), True)
3706
+ self.do_send(self.ws, json.dumps(options), True)
3707
3707
 
3708
3708
  def account(self, callback: Callable[[Any], None]) -> None:
3709
3709
  """Get all fees for this account
@@ -3733,7 +3733,7 @@ class Bitvavo:
3733
3733
  ```
3734
3734
  """
3735
3735
  self.callbacks["account"] = callback
3736
- self.doSend(self.ws, json.dumps({"action": "privateGetAccount"}), True)
3736
+ self.do_send(self.ws, json.dumps({"action": "privateGetAccount"}), True)
3737
3737
 
3738
3738
  def balance(self, options: anydict, callback: Callable[[Any], None]) -> None:
3739
3739
  """Get the balance for this account
@@ -3766,9 +3766,9 @@ class Bitvavo:
3766
3766
  """
3767
3767
  options["action"] = "privateGetBalance"
3768
3768
  self.callbacks["balance"] = callback
3769
- self.doSend(self.ws, json.dumps(options), True)
3769
+ self.do_send(self.ws, json.dumps(options), True)
3770
3770
 
3771
- def depositAssets(self, symbol: str, callback: Callable[[Any], None]) -> None:
3771
+ def deposit_assets(self, symbol: str, callback: Callable[[Any], None]) -> None:
3772
3772
  """
3773
3773
  Get the deposit address (with paymentId for some assets) or bank account information to increase your
3774
3774
  balance.
@@ -3804,13 +3804,13 @@ class Bitvavo:
3804
3804
  ```
3805
3805
  """
3806
3806
  self.callbacks["depositAssets"] = callback
3807
- self.doSend(
3807
+ self.do_send(
3808
3808
  self.ws,
3809
3809
  json.dumps({"action": "privateDepositAssets", "symbol": symbol}),
3810
3810
  True,
3811
3811
  )
3812
3812
 
3813
- def depositHistory(self, options: anydict, callback: Callable[[Any], None]) -> None:
3813
+ def deposit_history(self, options: anydict, callback: Callable[[Any], None]) -> None:
3814
3814
  """Get the deposit history of the account
3815
3815
 
3816
3816
  Even when you want something from a single `symbol`, you'll still receive a list with multiple deposits.
@@ -3862,9 +3862,9 @@ class Bitvavo:
3862
3862
  """
3863
3863
  self.callbacks["depositHistory"] = callback
3864
3864
  options["action"] = "privateGetDepositHistory"
3865
- self.doSend(self.ws, json.dumps(options), True)
3865
+ self.do_send(self.ws, json.dumps(options), True)
3866
3866
 
3867
- def withdrawAssets(
3867
+ def withdraw_assets(
3868
3868
  self,
3869
3869
  symbol: str,
3870
3870
  amount: str,
@@ -3915,9 +3915,9 @@ class Bitvavo:
3915
3915
  body["symbol"] = symbol
3916
3916
  body["amount"] = amount
3917
3917
  body["address"] = address
3918
- self.doSend(self.ws, json.dumps(body), True)
3918
+ self.do_send(self.ws, json.dumps(body), True)
3919
3919
 
3920
- def withdrawalHistory(self, options: anydict, callback: Callable[[Any], None]) -> None:
3920
+ def withdrawal_history(self, options: anydict, callback: Callable[[Any], None]) -> None:
3921
3921
  """Get the withdrawal history
3922
3922
 
3923
3923
  ---
@@ -3958,9 +3958,9 @@ class Bitvavo:
3958
3958
  """
3959
3959
  self.callbacks["withdrawalHistory"] = callback
3960
3960
  options["action"] = "privateGetWithdrawalHistory"
3961
- self.doSend(self.ws, json.dumps(options), True)
3961
+ self.do_send(self.ws, json.dumps(options), True)
3962
3962
 
3963
- def subscriptionTicker(self, market: str, callback: Callable[[Any], None]) -> None:
3963
+ def subscription_ticker(self, market: str, callback: Callable[[Any], None]) -> None:
3964
3964
  # TODO(NostraDavid): one possible improvement here is to turn `market` into a list of markets, so we can sub
3965
3965
  # to all of them at once. Same goes for other `subscription*()`
3966
3966
  """
@@ -4002,7 +4002,7 @@ class Bitvavo:
4002
4002
  if "subscriptionTicker" not in self.callbacks:
4003
4003
  self.callbacks["subscriptionTicker"] = {}
4004
4004
  self.callbacks["subscriptionTicker"][market] = callback
4005
- self.doSend(
4005
+ self.do_send(
4006
4006
  self.ws,
4007
4007
  json.dumps(
4008
4008
  {
@@ -4012,7 +4012,7 @@ class Bitvavo:
4012
4012
  ),
4013
4013
  )
4014
4014
 
4015
- def subscriptionTicker24h(self, market: str, callback: Callable[[Any], None]) -> None:
4015
+ def subscription_ticker24h(self, market: str, callback: Callable[[Any], None]) -> None:
4016
4016
  """
4017
4017
  Subscribe to the ticker-24-hour channel, which means `callback` gets passed the new object every second, if
4018
4018
  values have changed.
@@ -4059,7 +4059,7 @@ class Bitvavo:
4059
4059
  if "subscriptionTicker24h" not in self.callbacks:
4060
4060
  self.callbacks["subscriptionTicker24h"] = {}
4061
4061
  self.callbacks["subscriptionTicker24h"][market] = callback
4062
- self.doSend(
4062
+ self.do_send(
4063
4063
  self.ws,
4064
4064
  json.dumps(
4065
4065
  {
@@ -4069,7 +4069,7 @@ class Bitvavo:
4069
4069
  ),
4070
4070
  )
4071
4071
 
4072
- def subscriptionAccount(self, market: str, callback: Callable[[Any], None]) -> None:
4072
+ def subscription_account(self, market: str, callback: Callable[[Any], None]) -> None:
4073
4073
  """
4074
4074
  Subscribes to the account channel, which sends an update whenever an event happens which is related to
4075
4075
  the account. These are 'order' events (create, update, cancel) or 'fill' events (a trade occurred).
@@ -4136,7 +4136,7 @@ class Bitvavo:
4136
4136
  if "subscriptionAccount" not in self.callbacks:
4137
4137
  self.callbacks["subscriptionAccount"] = {}
4138
4138
  self.callbacks["subscriptionAccount"][market] = callback
4139
- self.doSend(
4139
+ self.do_send(
4140
4140
  self.ws,
4141
4141
  json.dumps(
4142
4142
  {
@@ -4147,7 +4147,7 @@ class Bitvavo:
4147
4147
  True,
4148
4148
  )
4149
4149
 
4150
- def subscriptionCandles(self, market: str, interval: str, callback: Callable[[Any], None]) -> None:
4150
+ def subscription_candles(self, market: str, interval: str, callback: Callable[[Any], None]) -> None:
4151
4151
  """Subscribes to candles and returns a candle each time a new one is formed, depending on the interval
4152
4152
 
4153
4153
  ---
@@ -4195,7 +4195,7 @@ class Bitvavo:
4195
4195
  if market not in self.callbacks["subscriptionCandles"]:
4196
4196
  self.callbacks["subscriptionCandles"][market] = {}
4197
4197
  self.callbacks["subscriptionCandles"][market][interval] = callback
4198
- self.doSend(
4198
+ self.do_send(
4199
4199
  self.ws,
4200
4200
  json.dumps(
4201
4201
  {
@@ -4211,7 +4211,7 @@ class Bitvavo:
4211
4211
  ),
4212
4212
  )
4213
4213
 
4214
- def subscriptionTrades(self, market: str, callback: Callable[[Any], None]) -> None:
4214
+ def subscription_trades(self, market: str, callback: Callable[[Any], None]) -> None:
4215
4215
  """Subscribes to trades, which sends an object whenever a trade has occurred.
4216
4216
 
4217
4217
  ---
@@ -4248,7 +4248,7 @@ class Bitvavo:
4248
4248
  if "subscriptionTrades" not in self.callbacks:
4249
4249
  self.callbacks["subscriptionTrades"] = {}
4250
4250
  self.callbacks["subscriptionTrades"][market] = callback
4251
- self.doSend(
4251
+ self.do_send(
4252
4252
  self.ws,
4253
4253
  json.dumps(
4254
4254
  {
@@ -4258,7 +4258,7 @@ class Bitvavo:
4258
4258
  ),
4259
4259
  )
4260
4260
 
4261
- def subscriptionBookUpdate(self, market: str, callback: Callable[[Any], None]) -> None:
4261
+ def subscription_book_update(self, market: str, callback: Callable[[Any], None]) -> None:
4262
4262
  """Subscribes to the book and returns a delta on every change to the book.
4263
4263
 
4264
4264
  ---
@@ -4315,7 +4315,7 @@ class Bitvavo:
4315
4315
  if "subscriptionBookUpdate" not in self.callbacks:
4316
4316
  self.callbacks["subscriptionBookUpdate"] = {}
4317
4317
  self.callbacks["subscriptionBookUpdate"][market] = callback
4318
- self.doSend(
4318
+ self.do_send(
4319
4319
  self.ws,
4320
4320
  json.dumps(
4321
4321
  {
@@ -4325,7 +4325,7 @@ class Bitvavo:
4325
4325
  ),
4326
4326
  )
4327
4327
 
4328
- def subscriptionBook(self, market: str, callback: Callable[[Any], None]) -> None:
4328
+ def subscription_book(self, market: str, callback: Callable[[Any], None]) -> None:
4329
4329
  """Subscribes to the book and returns a delta on every change to the book.
4330
4330
 
4331
4331
  ---
@@ -4385,8 +4385,8 @@ class Bitvavo:
4385
4385
  self.callbacks["subscriptionBookUser"][market] = callback
4386
4386
  if "subscriptionBook" not in self.callbacks:
4387
4387
  self.callbacks["subscriptionBook"] = {}
4388
- self.callbacks["subscriptionBook"][market] = processLocalBook
4389
- self.doSend(
4388
+ self.callbacks["subscriptionBook"][market] = process_local_book
4389
+ self.do_send(
4390
4390
  self.ws,
4391
4391
  json.dumps(
4392
4392
  {
@@ -4397,4 +4397,4 @@ class Bitvavo:
4397
4397
  )
4398
4398
 
4399
4399
  self.localBook[market] = {}
4400
- self.doSend(self.ws, json.dumps({"action": "getBook", "market": market}))
4400
+ self.do_send(self.ws, json.dumps({"action": "getBook", "market": market}))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: bitvavo-api-upgraded
3
- Version: 2.2.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>
@@ -0,0 +1,10 @@
1
+ bitvavo_api_upgraded/__init__.py,sha256=J_HdGBmZOfb1eOydaxsPmXfOIZ58hVa1qAfE6QErUHs,301
2
+ bitvavo_api_upgraded/bitvavo.py,sha256=PHN4lPlA2wWB5e6LAOewQLGqN--x_N_BLg1A25z5TxA,164948
3
+ bitvavo_api_upgraded/dataframe_utils.py,sha256=Jf-2zkYuK5Zs9kiMFJlCmO-OykjZyFIvW2aaMJYPUpo,5792
4
+ bitvavo_api_upgraded/helper_funcs.py,sha256=4oBdQ1xB-C2XkQTmN-refzIzWfO-IUowDSWhOSFdCRU,3212
5
+ bitvavo_api_upgraded/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ bitvavo_api_upgraded/settings.py,sha256=br1oqN3K8OoimmKa1JlvzMgpYNHfr2kK2f14tC72dl8,5311
7
+ bitvavo_api_upgraded/type_aliases.py,sha256=EOd3LhruyM1aZYn4xyKYhdoSql8mZH88acN0qGzMMck,1992
8
+ bitvavo_api_upgraded-3.0.0.dist-info/WHEEL,sha256=4n27za1eEkOnA7dNjN6C5-O2rUiw6iapszm14Uj-Qmk,79
9
+ bitvavo_api_upgraded-3.0.0.dist-info/METADATA,sha256=kFAZJlSH89h5kmUC81QGg-t0jpwIkiJhsnyYLdEcxso,25478
10
+ bitvavo_api_upgraded-3.0.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.8.12
2
+ Generator: uv 0.8.13
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- bitvavo_api_upgraded/__init__.py,sha256=27f1dd18199939f6f578ec9d6b1b0f9977ce219e7c8556b5a807c4e9012b507b,301
2
- bitvavo_api_upgraded/bitvavo.py,sha256=b2b8b1cc2c98c4f47eacdbf93cd1ee0d36291c8df68d152c1feb3712b06b49df,164775
3
- bitvavo_api_upgraded/dataframe_utils.py,sha256=25ffb6ce462e2b966cf6488c14994298ef8eca48d9c8522f5b669a30960f529a,5792
4
- bitvavo_api_upgraded/helper_funcs.py,sha256=e2805d435c41f82d979104e637eade7f323359f3be214a300d25a139215d0915,3212
5
- bitvavo_api_upgraded/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
6
- bitvavo_api_upgraded/settings.py,sha256=6ebd68a8ddcaf0ea229a629ad4996fccc82960d1dfaf690ad9fd78b42ef6765f,5311
7
- bitvavo_api_upgraded/type_aliases.py,sha256=10e7772e1aeec8cd5a6589f8c7229885da12aa5f26647f3c69c374a86ccc31c9,1992
8
- bitvavo_api_upgraded-2.2.0.dist-info/WHEEL,sha256=76443c98c0efcfdd1191eac5fa1d8223dba1c474dbd47676674a255e7ca48770,79
9
- bitvavo_api_upgraded-2.2.0.dist-info/METADATA,sha256=900cbf71d10dc4813bc0e1e9d169ba7a0059e1839e05db8821a98770f691cc8c,25478
10
- bitvavo_api_upgraded-2.2.0.dist-info/RECORD,,