ctubio / Krypto-trading-bot

Self-hosted crypto trading bot (automated high frequency market making) written in C++
https://127.0.0.1:3000
Other
3.37k stars 823 forks source link

Bitfinex missing market data #830

Closed sgs1 closed 6 years ago

sgs1 commented 6 years ago

Hi guys! I've downloaded your bot in my ubuntu pc; I've configured the API for Bitfinex for BTC/USD but I see this error (only this): Warrrrning: unable to calculate quote, missing market data.

In my webclient, I see two columns with name "MissingData". What I'm wrong?

ctubio commented 6 years ago

does refreshing the webclient (F5 on winy) helps?

otherwise, consider to show more logs

sgs1 commented 6 years ago

No, it doesn't help.

Here I post the logs that I see when I run ./K.sh. I'm using Mojave in this moment, but the same problem is under Ubuntu.

`K build x86_64-apple-darwin17 2018-08-05 01:48:12. v0.4.9+17 (zip install). 10/14 12:45:23.660720 DB loaded OK from /data/db/K.BITFINEX.BTC.USD.db. 10/14 12:45:23.662161 UI ready at https://2001:b07:2ee:92c8:497a:5f8:7c40:c086:3000. 10/14 12:45:23.664339 DB loaded last Quoting Parameters OK. 10/14 12:45:23.664722 DB loaded TBP = 0.002800 BTC. 10/14 12:45:23.673355 DB loaded 1518 historical Fair Values. 10/14 12:45:23.675224 DB Warrrrning: consider to warm up some EWMA Values. 10/14 12:45:23.685591 DB loaded 118 historical Trades. 10/14 12:45:26.184502 GW BITFINEX allows client IP. 10/14 12:45:26.184539 GW BITFINEX:

ctubio commented 6 years ago

there is no issue, at the end it says:

10/14 12:45:31.153318 GW BITFINEX WS Streaming channel 515826:book.`

so market data is finally there.

you see the following messages :

10/14 12:45:30.299785 QE Warrrrning: Unable to calculate quote, missing market data.

ONLY MEANWHILE K starts and Bitfinex doesnt reply yet the market data (the first few seconds after starts; you started at 12:45:23 and got missng market data until bitfinex replied at 12:45:31)

if you refresh the UI before bitfinex reply ofcourse there is missingdata in the UI.. if yo refrewsh after bitfinex reply (first few seconds after start) then the UI is ofcourse all fine

sgs1 commented 6 years ago

Hello, thanks for the reply!

I've runned the bot, and after 10 seconds, I've refreshed the page. But, I still see "missingData" in the columns.

schermata 2018-10-14 alle 17 59 47
ctubio commented 6 years ago

your next issue is with wallet data, this MissingData statuses are related to the wallet.

wallet values are displayed under Market, Orders link, and over Submit Order button. if you dont see them must be because the value are 0 or very close to 0.

can you please make sure about having positive balance on BTC and/or USD? i belive this will fix your issue.

alternatively you can use --debug-secret argument to display messages coming from bitfienx, were your wallet values must be displayed

sgs1 commented 6 years ago

then I've to run "./K.sh --debug-secret", right?

ctubio commented 6 years ago

yes, in case you want to display debug messages

you need to look for message like:

<<< [0,"ws",[["exchange","USD",XXX,0,null]]]

or

<<< [0,"ws",[["exchange","BTC",XXX,0,null]]]

where XXX must be your current available wallet funds

the wallet is not displayed in the UI if the available wallet funds are = to 0

sgs1 commented 6 years ago

Hello! Yes, I look both of the two messages. And the value of them is: 0.007 for USD and 0.004 for BTC. At the moment, the view is this.

schermata 2018-10-21 alle 19 06 30