Added Public Funding Stats (rest)

This commit is contained in:
Dario Moceri
2021-01-28 22:12:20 +01:00
parent 438cc2ef2c
commit 0c9299184d
2 changed files with 21 additions and 0 deletions

View File

@@ -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

View File

@@ -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 #
##################################################