From a50502a0b26703f9aa11daaaed93aa5adf2d11a4 Mon Sep 17 00:00:00 2001 From: matthewli1409 Date: Tue, 18 Oct 2022 15:33:46 +0700 Subject: [PATCH 1/2] ledger missing id fix --- bfxapi/models/ledger.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bfxapi/models/ledger.py b/bfxapi/models/ledger.py index 93d17d0..766a965 100644 --- a/bfxapi/models/ledger.py +++ b/bfxapi/models/ledger.py @@ -26,7 +26,8 @@ class Ledger: DESCRIPTION """ - def __init__(self, currency, mts, amount, balance, description): + def __init__(self, lid, currency, mts, amount, balance, description): + self.id = lid self.currency = currency self.mts = mts self.amount = amount @@ -40,15 +41,16 @@ class Ledger: @return Ledger """ + lid = raw_ledger[LedgerModel.ID] currency = raw_ledger[LedgerModel.CURRENCY] mts = raw_ledger[LedgerModel.MTS] amount = raw_ledger[LedgerModel.AMOUNT] balance = raw_ledger[LedgerModel.BALANCE] description = raw_ledger[LedgerModel.DESCRIPTION] - return Ledger(currency, mts, amount, balance, description) + return Ledger(lid, currency, mts, amount, balance, description) def __str__(self): ''' Allow us to print the Ledger object in a pretty format ''' - text = "Ledger <{} {} balance:{} '{}' mts={}>" - return text.format(self.amount, self.currency, self.balance, + text = "Ledger <{} {} {} balance:{} '{}' mts={}>" + return text.format(self.id, self.amount, self.currency, self.balance, self.description, self.mts) From eb33c06d5193456fe4cb47754756a991ca141d42 Mon Sep 17 00:00:00 2001 From: matthewli1409 Date: Tue, 18 Oct 2022 16:10:38 +0700 Subject: [PATCH 2/2] change version --- CHANGELOG | 3 +++ bfxapi/version.py | 2 +- setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index c874132..ed1f6a6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2.0.4 +-) Added missing ID to ledgers.py + 2.0.3 -) Implemented Liquidations endpoint (REST) diff --git a/bfxapi/version.py b/bfxapi/version.py index 42f2fa1..d05bc2f 100644 --- a/bfxapi/version.py +++ b/bfxapi/version.py @@ -2,4 +2,4 @@ This module contains the current version of the bfxapi lib """ -__version__ = '2.0.3' +__version__ = '2.0.4' diff --git a/setup.py b/setup.py index 126d5c1..49d3425 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='2.0.3', + version='2.0.4', 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',