-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huobi PRO empty fetchBalance return #328
Comments
Hi, @gavin369 ! Can you add the following line please to see what huobi actually returned to ccxt? let huobipro = new ccxt.huobipro ({
apiKey: 'YOUR_KEY',
secret: 'YOUR_SECRET',
verbose: true, // ←---------------------- this line added to see more verbose info
})
// ... then call the balance like you did in your code and check the onscreen output Paste the output here, please. Use triple backticks + JavaScript keyword in the beginning when pasting code for more readability, like below: ```JavaScript |
'use strict';
var ccxt = require ('ccxt');
var async = require('async');
console.log ('添加交易所名称',ccxt.exchanges[56] )
console.log ('添加交易所个数',ccxt.exchanges.length)
var start = async function () {
// 在这里使用起来就像同步代码那样直观
let huobipro = new ccxt.huobipro ({
apiKey: 'key',
secret: 'secret',
})
while (true){
ticker = (await huobipro.fetchTicker('LTC/BTC')).info;
Balance = await huobipro.fetchBalance ();
console.log (Balance)
//console.log ('买1价',ticker.ask[0],'卖1价',ticker.bid[0],'买1深度',ticker.ask[1],'卖1深度',ticker.bid[1]);
//console.log (Balance)
await sleep(3000);
}
};
start(); |
The code is ok, but please paste the verbose output as in my previous post. We need you to add that 'use strict';
var ccxt = require ('ccxt');
var async = require('async');
console.log ('添加交易所名称',ccxt.exchanges[56] )
console.log ('添加交易所个数',ccxt.exchanges.length)
var start = async function () {
// 在这里使用起来就像同步代码那样直观
let huobipro = new ccxt.huobipro ({
apiKey: 'key',
secret: 'secret',
verbose: true, // ←-------------------------- add this and copy results here
})
while (true){
ticker = (await huobipro.fetchTicker('LTC/BTC')).info;
Balance = await huobipro.fetchBalance ();
console.log (Balance)
//console.log ('买1价',ticker.ask[0],'卖1价',ticker.bid[0],'买1深度',ticker.ask[1],'卖1深度',ticker.bid[1]);
//console.log (Balance)
await sleep(3000);
}
};
start(); |
Okay, I got it. First contact with GitHub. sorry! |
@gavin369 no problem at all ) Welcome ) We will stand by to see your verbose output (add |
@gavin369 did you manage to get verbose output? We will be waiting to see your output in verbose mode, like written above. |
@gavin369 alternatively, after you fetch the balance you can simply do:
... and paste the output here. |
Now I'm not using console.log, but it's also printing information!
|
@gavin369 ok, thank you for the info! I will now debug it a little and will get back to you shortly. |
@gavin369 ok, this was a bug in balance parsing for Huobi, but now it's fixed and Huobi should be working normally. Please don't forget to update the ccxt library to version 1.9.163+ ( P.S. Next time don't paste text in images and screenshots, paste code and verbose output in text enclosed with 3 backticks (`) for all text information. When we are programming, it is much better and much easier to read, search and edit, if both the code and the output are copied and pasted in text, not as an image. Anyway, thanks for your help! ;) Let us know if you have any other questions or difficulties with it. The library is under heavy development and we really appreciate your feedback! ) |
Okay,i know! Thank you very much. |
Kucoin :: fix order status
I'm a beginner. I want to be a bot. I want to ask you something! I don't show my account balance with console.log (await huobipro.fetchBalance ()),
but actually there is a balance,
excuse me, what did I make wrong? Thank you
The text was updated successfully, but these errors were encountered: