-) updated CHANGELOG

-) updated example get_authenticated_data.py
-) updated string formatter margin_info.py and margin_info_base.py
This commit is contained in:
itsdeka
2021-06-25 12:20:37 +02:00
parent a28b263238
commit 6df56657d3
4 changed files with 12 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
1.1.16
-) Implemented Margin Info (rest)
-) Implemented claim position (rest)
1.1.15
-) Added 'ids' parameter to get_order_history()

View File

@@ -80,12 +80,13 @@ async def log_funding_credits_history():
[ print (c) for c in credit ]
async def log_margin_info():
m1 = await bfx.rest.get_margin_info('tBTCUSD')
print (m1)
m2 = await bfx.rest.get_margin_info('sym_all')
print (m2)
m3 = await bfx.rest.get_margin_info('base')
print (m3)
margin_info = await bfx.rest.get_margin_info('tBTCUSD')
print(margin_info)
sym_all = await bfx.rest.get_margin_info('sym_all') # list of Margin Info
for margin_info in sym_all:
print(margin_info)
base = await bfx.rest.get_margin_info('base')
print(base)
async def run():
await log_wallets()

View File

@@ -43,4 +43,5 @@ class MarginInfo:
return MarginInfo(symbol, tradable_balance, gross_balance, buy, sell)
def __str__(self):
return "Margin Info {}".format(self.symbol)
return "Margin Info {} buy={} sell={} tradable_balance={} gross_balance={}" \
"".format(self.symbol, self.buy, self.sell, self. tradable_balance, self. gross_balance)

View File

@@ -44,4 +44,5 @@ class MarginInfoBase:
return MarginInfoBase(user_pl, user_swaps, margin_balance, margin_net, margin_min)
def __str__(self):
return "Margin Info Base"
return "Margin Info Base user_pl={} user_swaps={} margin_balance={} margin_net={} margin_min={}" \
"".format(self.user_pl, self.user_swaps, self.margin_balance, self.margin_net, self.margin_min)