mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
Implemented Movement endpoints (REST)
Thanks to @ph4z
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
This module contains the current version of the bfxapi lib
|
||||
"""
|
||||
|
||||
__version__ = '1.3.4'
|
||||
__version__ = '1.3.5'
|
||||
|
||||
2
setup.py
2
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',
|
||||
|
||||
Reference in New Issue
Block a user