Ccxt: liqui fetchbalance doesn't return total balance

Created on 17 Jan 2018  路  3Comments  路  Source: ccxt/ccxt

ccxt v. 1.10.750

exchange = ccxt.liqui()
exchange.apiKey = 'fake' 
exchange.secret = 'fake'
exchange.loadMarkets()

lel = exchange.fetchBalance()
pprint.pprint(lel)

No total balance returned(None returned for all pairs) even though free has a balance. Maybe they changed their api or im smoking crack again because i can't remember it being like this. I also seem to recall not getting all these None's.

duplicate question

Most helpful comment

Hi kroitor,
You can use getInfoExt method to get the total balance. Is documented in tidex that has the same api:

Method getInfoExt
Returns information about the user鈥檚 current balance (including funds on your open orders), API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.

Parameters: None.
Sample response:
{
success: 1,
return: {
funds: {
btc: {
value: 1.5,
inOrders: 0.5
},
eth: {
value: 1.0,
inOrders: 0.0
},
waves: {
value: 0.0,
inOrders: 5.0
}
},
rights: {
info: true,
trade: true,
withdraw: false
},
transaction_count: 0,
open_orders: 0,
server_time: 1505980825
},
stat: {
isSuccess: true,
serverTime: "00:00:00.0000732",
time: "00:00:00.0064923",
errors: nil
}
}
funds: Your account balance available for trading.
rights: The privileges of the current API key. At this time the privilege to withdraw is not used anywhere...
transaction_count: Deprecated, is equal to 0.
open_orders: The number of your open orders.
server_time: Server time (UTC).

All 3 comments

This is not a bug. Liqui does not let you know your total balance. It will only return free balance and the count of orders, which does not tell you anything about the total. This is their API, we can't really do much about it. Explained here: https://github.com/ccxt/ccxt/issues/235
Hope it answers your question. Thx!

Hi kroitor,
You can use getInfoExt method to get the total balance. Is documented in tidex that has the same api:

Method getInfoExt
Returns information about the user鈥檚 current balance (including funds on your open orders), API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.

Parameters: None.
Sample response:
{
success: 1,
return: {
funds: {
btc: {
value: 1.5,
inOrders: 0.5
},
eth: {
value: 1.0,
inOrders: 0.0
},
waves: {
value: 0.0,
inOrders: 5.0
}
},
rights: {
info: true,
trade: true,
withdraw: false
},
transaction_count: 0,
open_orders: 0,
server_time: 1505980825
},
stat: {
isSuccess: true,
serverTime: "00:00:00.0000732",
time: "00:00:00.0064923",
errors: nil
}
}
funds: Your account balance available for trading.
rights: The privileges of the current API key. At this time the privilege to withdraw is not used anywhere...
transaction_count: Deprecated, is equal to 0.
open_orders: The number of your open orders.
server_time: Server time (UTC).

@leandrodevs thx for the feedback, we'll add that shortly!

Was this page helpful?
0 / 5 - 0 ratings