fetchBalance from Kucoin for sub-account returns nothing
See original GitHub issue- OS: Ubuntu
- Programming Language version: nodejs
- CCXT version: 1.73.49
async getBalance(id: ObjectID): Promise<any> {
const bot = await this.findOne(id);
const criteria: any = {
apiKey: bot.apiKey,
secret: bot.secret,
};
if (_.keys(bot.headers).length > 0) {
criteria.headers = bot.headers;
}
if (bot.password) {
criteria.password = bot.password;
}
// console.log(criteria);
const balance = await this.exchangesService.getBalance(
bot.exchangeClassName.toLowerCase() as ExchangeId,
criteria,
);
console.log(balance);
return balance;
}
// ExchangeService
async getBalance(exchangeId: ExchangeId, criteria: any) {
const ex = this.instantiateExchange(exchangeId, criteria)
const balance = await ex.fetchBalance();
return balance
}
private instantiateExchange(id: ExchangeId, criteria?: any) {
return new ccxt[id]({
timeout: 30000,
enableRateLimit: true,
...(criteria || {})
});
}
// Sub-account
{
info: { code: '200000', data: [] },
timestamp: undefined,
datetime: undefined,
free: {},
used: {},
total: {}
}
// Main-account
{
info: {
code: '200000',
data: [
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object], [Object], [Object],
[Object], [Object], [Object], [Object]
]
},
timestamp: undefined,
datetime: undefined,
// .....
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
kukoin not fetching amount for all accounts · Issue #5849 · ccxt ...
OS: React native Programming Language version: js CCXT version: 1.18.1176 Exchange: kukoin Method:fetchBalance I got a few users asking why ...
Read more >Sub-Accounts - KuCoin
KuCoin allows you to create up to 100 Sub-Accounts under one Master Account to improve the efficiency of account management.
Read more >Announcement on the Adjustment of Sub-account Functions
Dear Users: We have recently upgraded our sub-accounts system. Updates to our sub-account related features are described below: 1.
Read more >KuCoin Has Upgraded the Sub-Account Function
Dear KuCoin Users,In order to provide users with a feature-rich trading environment, KuCoin has now upgraded the sub-account function.
Read more >KuCoin API Documentation: General
Unless otherwise specified, all timestamps from API are returned in ... //Available assets of a currency "holds": "0" //Hold assets of a currency...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@mak1986 thx for reporting back, i’m sure it will help other users.
I’m sorry I wasted your time. I just needed to transfer the funds to the trading account.