Implemented Movement endpoints (REST)

Thanks to @ph4z
This commit is contained in:
itsdeka
2022-01-16 22:15:13 +01:00
parent ca85fe2236
commit a79cd6a5a6
6 changed files with 24 additions and 3 deletions

View File

@@ -609,6 +609,22 @@ class BfxRest:
raw_ledgers = await self.post(endpoint, params=params)
return [Ledger.from_raw_ledger(rl) for rl in raw_ledgers]
async def get_movement_history(self, currency, start="", end="", limit=25):
"""
Get all of the deposits and withdraws between the start and end period associated with API_KEY
- Requires authentication.
# Attributes
@param currency string: pair symbol i.e BTC
@param start int: millisecond start time
@param end int: millisecond end time
@param limit int: max number of items in response
@return Array <models.Movement>
"""
endpoint = "auth/r/movements/{}/hist".format(currency)
params = "?start={}&end={}&limit={}".format(start, end, limit)
raw_movements = await self.post(endpoint, params=params)
return [Movement.from_raw_movement(rm) for rm in raw_movements]
async def submit_funding_offer(self, symbol, amount, rate, period,
funding_type=FundingOffer.Type.LIMIT, hidden=False):
"""