diff --git a/CHANGELOG b/CHANGELOG index 3c1f98a..3119820 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.3.5 +-) Implemented Movement endpoints (REST) + 1.3.4 -) Fixed undefined p_sub issue in subscription_manager.py -) Added submit cancel all funding orders endpoint (REST) diff --git a/bfxapi/__init__.py b/bfxapi/__init__.py index f5fbc80..4ad4f80 100644 --- a/bfxapi/__init__.py +++ b/bfxapi/__init__.py @@ -5,7 +5,8 @@ This module is used to interact with the bitfinex api from .version import __version__ from .client import Client from .models import (Order, Trade, OrderBook, Subscription, Wallet, - Position, FundingLoan, FundingOffer, FundingCredit) + Position, FundingLoan, FundingOffer, FundingCredit, + Movement) from .websockets.generic_websocket import GenericWebsocket, Socket from .websockets.bfx_websocket import BfxWebsocket from .utils.decimal import Decimal diff --git a/bfxapi/models/__init__.py b/bfxapi/models/__init__.py index b9b4b17..c7bf7b2 100644 --- a/bfxapi/models/__init__.py +++ b/bfxapi/models/__init__.py @@ -22,5 +22,6 @@ from .ledger import Ledger from .funding_trade import FundingTrade from .margin_info import MarginInfo from .margin_info_base import MarginInfoBase +from .movement import Movement NAME = "models" diff --git a/bfxapi/rest/bfx_rest.py b/bfxapi/rest/bfx_rest.py index 5cfc97a..b1332b1 100644 --- a/bfxapi/rest/bfx_rest.py +++ b/bfxapi/rest/bfx_rest.py @@ -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 + """ + 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): """ diff --git a/bfxapi/version.py b/bfxapi/version.py index bceabe3..62a74a7 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '1.3.4' +__version__ = '1.3.5' diff --git a/setup.py b/setup.py index 1d2cfce..dfcaf4a 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ from os import path here = path.abspath(path.dirname(__file__)) setup( name='bitfinex-api-py', - version='1.3.4', + version='1.3.5', description='Official Bitfinex Python API', long_description='A Python reference implementation of the Bitfinex API for both REST and websocket interaction', long_description_content_type='text/markdown',