diff --git a/CHANGELOG b/CHANGELOG index acc62f4..be45220 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,6 +9,7 @@ - Implemented Public Stats endpoint (rest) - Implemented Order Multi OP endpoint (rest) - Implemented Public Tickers History (rest) +- Implemented Public Funding Stats (rest) 1.1.8 - Adds support for websocket events pu, pn and pu diff --git a/bfxapi/rest/bfx_rest.py b/bfxapi/rest/bfx_rest.py index 5aaf512..70991b3 100644 --- a/bfxapi/rest/bfx_rest.py +++ b/bfxapi/rest/bfx_rest.py @@ -337,6 +337,26 @@ class BfxRest: message = await self.fetch(endpoint) return message + + async def get_public_funding_stats(self, symbol): + """ + Get a list of the most recent funding data for the given currency + (FRR, average period, total amount provided, total amount used) + + # Attributes + @param limit int: number of results (max 250) + @param start str: millisecond start time + @param end str: millisecond end time + + @return Array + [[ TIMESTAMP, PLACEHOLDER, PLACEHOLDER, FRR, AVG_PERIOD, PLACEHOLDER, + PLACEHOLDER, FUNDING_AMOUNT, FUNDING_AMOUNT_USED ], ...] + """ + endpoint = f"funding/stats/{symbol}/hist" + stats = await self.fetch(endpoint) + return stats + + ################################################## # Authenticated Data # ##################################################