mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
@@ -349,3 +349,6 @@ class RestAuthenticatedEndpoints(Middleware):
|
||||
|
||||
def get_invoice_count_stats(self, status: Literal["CREATED", "PENDING", "COMPLETED", "EXPIRED"], format: str) -> List[InvoiceCountStats]:
|
||||
return [ InvoiceCountStats(**sub_data) for sub_data in self._POST("auth/r/ext/pay/invoice/stats/count", body={ "status": status, "format": format }) ]
|
||||
|
||||
def get_invoice_earning_stats(self, currency: str, format: str) -> List[InvoiceEarningStats]:
|
||||
return [ InvoiceEarningStats(**sub_data) for sub_data in self._POST("auth/r/ext/pay/invoice/stats/earning", body={ "currency": currency, "format": format }) ]
|
||||
@@ -618,4 +618,9 @@ class InvoiceCountStats(_Type):
|
||||
time: str
|
||||
count: float
|
||||
|
||||
@dataclass
|
||||
class InvoiceEarningStats(_Type):
|
||||
time: str
|
||||
count: float
|
||||
|
||||
#endregion
|
||||
@@ -32,3 +32,5 @@ print(bfx.rest.auth.submit_invoice(
|
||||
print(bfx.rest.auth.get_invoices())
|
||||
|
||||
print(bfx.rest.auth.get_invoice_count_stats(status="CREATED", format="Y"))
|
||||
|
||||
print(bfx.rest.auth.get_invoice_earning_stats(currency="USD", format="Y"))
|
||||
Reference in New Issue
Block a user