-
Notifications
You must be signed in to change notification settings - Fork 2k
Bittrex Exchange Hybrid Backfilling / Error handling / Products update #1221
Conversation
Back-filling is accomplished by using the candle api and the marketHistory Candle api 1 minute interval max history of about 10 days mapping to size: total volume traded in 1 min price: closing price for the 1 min period side: forced as sell as there is no way to tell since this is a sum of both buy and sells in the 1 minute period marketHistory is directly mapped but only has the last 100 trades
This does accomplish the backfill, but it does save "imaginary" trades, each one of the imaginary ones is the sum of all the trades for 1m or what ever the gap is from the previous one. All imaginary trades buy/sell is guessed. I figure the buy/sell for this doesn't really matter for what were looking for here, what were really after is the price and the time of that price, and the volume traded so we can calculate velocity. any calculations that take into the account number of past trades of buy/sell orders a may be incorrect. |
Bittrex retrieves all back data at once,
I figure if the price was higher then it was a buy. but not sure, since were dealing with groups of trades in this part, and not a single filled order.
if the close price is higher there should be been more buys so mark the buySell as buy
Done poking at it. The confusion comes from the perspective. looking at the marker trend this is the correct view. looking at as a trader, this is incorrect, because if the price is higher. I would have sold. |
allows for correct calculation of minimums, and increments
as a recoverable error. see issue #1218
Okay really done poking at it. |
@DeviaVir, I'm Done with bittrex. on to getting hitbtc to work. |
The only error i'm getting now on bittrex is this: /home/ubuntu/zenbot-watcher/extensions/exchanges/bittrex/exchange.js:233 Any idea to solve this? Parameters : (error with other coins as well -- ADT-ETH/DGB-ETH/STRAT-ETH/WAVES-ETH/SNT-ETH/FUN-ETH ) |
what are the parameters you are sending in so I can try and reproduce this error. Its one that I havn't seen yet. |
They only way I was able to reproduce it was to delete the item out of the products.json. note: you need to be in the extensions/exchanges/bittrex/ directory when executing so it will save the products.json in that directory. |
correct a mistake in increment I made due to misunderstanding of how increment works.
@XarImoR I finally got this error to reproduce while the coin combo was in the products list. It only seems to be on the the ETH market, I am still trying to figure out what the error is caused by, but is taking awhile as it happens only under rare conditions for me. |
I have received "Error during syncing balance. Please check your API-Key" -- this I still get, but is treated now as a recoverable error, it shouldn't crash the program. If your version is crashing on this, you my not have some of the updates I included in this pull after the first post. I have not received I suspect these are all related to cloudfare interfering, and they are all the same error just showing up as different because of where it is happening in the code. All of them can be caused by the API not responding for one reason or other. 1-2 is when the api doesn't respond with the data we think it should have. 1 and 2 has to do with error handing. I just need to catch it, or log it some how when it happens (need the JSON of the error object that is returned, do figure out conditions)
|
Stack trace was not returning enuf information to diagnose some errors returned by the api.
# Conflicts: # extensions/exchanges/bittrex/products.json
I've added extra logging to any errors that occur when calling the API. Try and get to the bottom of this errors. |
Do not post an unedited debug result. It will contain API key as it seems it is returned by the API results. Going to close down this pull till I figure out these errors. |
thanks for the warning...but this is a text copy from a other machine...but i will delete the comment |
Address issue #1218 making URL request error a recoverable error.
Correct generation of bittrex products.json. min size is now taken into account.
Addresses Issues #499,#816, and my own personal annoyance with its inability to back-fill.
Back-filling is accomplished by using the candle api and the
marketHistory
Candle api
1 minute interval
max history of about 10 days
mapping to
size: total volume traded in 1 min
price: closing price for the 1 min period
side: forced as sell as there is no way to tell since this is a sum of
both buy and sells in the 1 minute period
marketHistory
is directly mapped but only has the last 100 trades