Merge pull request #250 from Davi0kProgramsThings/v3.0.5

Merge branch `Davi0kProgramsThings:v3.0.5` into branch `bitfinexcom:master`.
This commit is contained in:
itsdeka
2024-11-14 03:58:41 -05:00
committed by GitHub
4 changed files with 20 additions and 6 deletions

View File

@@ -19,6 +19,11 @@ Official implementation of the [Bitfinex APIs (V2)](https://docs.bitfinex.com/do
python3 -m pip install bitfinex-api-py 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 # Quickstart

View File

@@ -1 +1 @@
__version__ = "3.0.4" __version__ = "3.0.5"

View File

@@ -232,18 +232,23 @@ class RestAuthEndpoints(Interface):
def get_ledgers( def get_ledgers(
self, self,
currency: str, currency: Optional[str] = None,
*, *,
category: Optional[int] = None, category: Optional[int] = None,
start: Optional[str] = None, start: Optional[str] = None,
end: Optional[str] = None, end: Optional[str] = None,
limit: Optional[int] = None, limit: Optional[int] = None,
) -> List[Ledger]: ) -> 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} body = {"category": category, "start": start, "end": end, "limit": limit}
return [ return [
serializers.Ledger.parse(*sub_data) 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: def get_base_margin_info(self) -> BaseMarginInfo:

View File

@@ -2,7 +2,7 @@ from distutils.core import setup
setup( setup(
name="bitfinex-api-py", name="bitfinex-api-py",
version="3.0.4", version="3.0.5",
description="Official Bitfinex Python API", description="Official Bitfinex Python API",
long_description=( long_description=(
"A Python reference implementation of the Bitfinex API " "A Python reference implementation of the Bitfinex API "
@@ -23,6 +23,7 @@ setup(
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
], ],
keywords="bitfinex,api,trading", keywords="bitfinex,api,trading",
project_urls={ project_urls={
@@ -45,9 +46,12 @@ setup(
"pyee~=11.1.0", "pyee~=11.1.0",
"websockets~=12.0", "websockets~=12.0",
"requests~=2.32.3", "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", python_requires=">=3.8",
package_data={"bfxapi": ["py.typed"]}, package_data={"bfxapi": ["py.typed"]},
) )