Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch Davi0kProgramsThings:v3.0.5 into branch bitfinexcom:master. #250

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ Official implementation of the [Bitfinex APIs (V2)](https://docs.bitfinex.com/do
python3 -m pip install bitfinex-api-py
```

If you intend to use mypy type hints in your project, use:
```console
python3 -m pip install bitfinex-api-py[typing]
```

---

# Quickstart
Expand Down
2 changes: 1 addition & 1 deletion bfxapi/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.0.4"
__version__ = "3.0.5"
9 changes: 7 additions & 2 deletions bfxapi/rest/_interfaces/rest_auth_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,23 @@ def get_trades_history(

def get_ledgers(
self,
currency: str,
currency: Optional[str] = None,
*,
category: Optional[int] = None,
start: Optional[str] = None,
end: Optional[str] = None,
limit: Optional[int] = None,
) -> List[Ledger]:
if currency is None:
endpoint = "auth/r/ledgers/hist"
else:
endpoint = f"auth/r/ledgers/{currency}/hist"

body = {"category": category, "start": start, "end": end, "limit": limit}

return [
serializers.Ledger.parse(*sub_data)
for sub_data in self._m.post(f"auth/r/ledgers/{currency}/hist", body=body)
for sub_data in self._m.post(endpoint, body=body)
]

def get_base_margin_info(self) -> BaseMarginInfo:
Expand Down
10 changes: 7 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="bitfinex-api-py",
version="3.0.4",
version="3.0.5",
description="Official Bitfinex Python API",
long_description=(
"A Python reference implementation of the Bitfinex API "
Expand All @@ -23,6 +23,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
keywords="bitfinex,api,trading",
project_urls={
Expand All @@ -45,9 +46,12 @@
"pyee~=11.1.0",
"websockets~=12.0",
"requests~=2.32.3",
"types-requests~=2.31.0.10",
"types-urllib3~=1.26.25.14",
],
extras_require={
"typing": [
"types-requests~=2.32.0.20241016",
]
},
python_requires=">=3.8",
package_data={"bfxapi": ["py.typed"]},
)
Loading