Skip to content

Commit 791c845

Browse files
authored
Merge pull request #250 from Davi0kProgramsThings/v3.0.5
Merge branch `Davi0kProgramsThings:v3.0.5` into branch `bitfinexcom:master`.
2 parents d536297 + 07c1d63 commit 791c845

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ Official implementation of the [Bitfinex APIs (V2)](https://docs.bitfinex.com/do
1919
python3 -m pip install bitfinex-api-py
2020
```
2121

22+
If you intend to use mypy type hints in your project, use:
23+
```console
24+
python3 -m pip install bitfinex-api-py[typing]
25+
```
26+
2227
---
2328

2429
# Quickstart

bfxapi/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.4"
1+
__version__ = "3.0.5"

bfxapi/rest/_interfaces/rest_auth_endpoints.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,23 @@ def get_trades_history(
232232

233233
def get_ledgers(
234234
self,
235-
currency: str,
235+
currency: Optional[str] = None,
236236
*,
237237
category: Optional[int] = None,
238238
start: Optional[str] = None,
239239
end: Optional[str] = None,
240240
limit: Optional[int] = None,
241241
) -> List[Ledger]:
242+
if currency is None:
243+
endpoint = "auth/r/ledgers/hist"
244+
else:
245+
endpoint = f"auth/r/ledgers/{currency}/hist"
246+
242247
body = {"category": category, "start": start, "end": end, "limit": limit}
243248

244249
return [
245250
serializers.Ledger.parse(*sub_data)
246-
for sub_data in self._m.post(f"auth/r/ledgers/{currency}/hist", body=body)
251+
for sub_data in self._m.post(endpoint, body=body)
247252
]
248253

249254
def get_base_margin_info(self) -> BaseMarginInfo:

setup.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="bitfinex-api-py",
5-
version="3.0.4",
5+
version="3.0.5",
66
description="Official Bitfinex Python API",
77
long_description=(
88
"A Python reference implementation of the Bitfinex API "
@@ -23,6 +23,7 @@
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2627
],
2728
keywords="bitfinex,api,trading",
2829
project_urls={
@@ -45,9 +46,12 @@
4546
"pyee~=11.1.0",
4647
"websockets~=12.0",
4748
"requests~=2.32.3",
48-
"types-requests~=2.31.0.10",
49-
"types-urllib3~=1.26.25.14",
5049
],
50+
extras_require={
51+
"typing": [
52+
"types-requests~=2.32.0.20241016",
53+
]
54+
},
5155
python_requires=">=3.8",
5256
package_data={"bfxapi": ["py.typed"]},
5357
)

0 commit comments

Comments
 (0)