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
Problem with InfluxDB and filedKey type for trade ID #425
Comments
Hi @igorjan |
@olibre I'll test it if you open a PR |
Hi @olibre I am happy to test and help with the documentation. Let me know when you have something to test. |
All right @igorjan. |
@olibre Yes this sounds good to me. |
Hi @igorjan |
@olibre - in case you don't have time, can you tell me your planned changes? I'm reworking the influx code now so I can probably do them unless you have already started |
@igorjan - I believe this has been fixed - can you test with the latest code from github and let me know? I rewrote a large part of the influx backend, and all trade ids should be strings now |
going to close this - I think its fixed, if someone wants to chime in and refute that we can reopen this |
I can confirm the issue has been fixed for my use case. |
This change doesn't appear to be backwards compatible, after upgrading cryptofeed there's now a discrepancy between old and new filed types and to the best of my knowledge influx doesn't offer support to change the old field types from float to string. Any chance there can be an option to cast string to floats? |
the new version of influx doesnt work well with strings, at least not from what i've seen. it also makes the code unnecessarily complicated and I'm having a hard time finding a reason to justify that. |
and yes, the change is not backwards compatible. |
Hi @bmoscon |
When inserting Trades into influxDB the ID field is of type float for Binance and Coinbase while for Poloniex is type string.
When the program is runing it seems to be doing OK insetring data for all three exchanges but periodically it will produce this error.
2021-02-24 14:17:08,143 : ERROR : POST to http://localhost:8086/write?db=CryptoDataV2 failed: 400 - {"error":"partial write: field type conflict: input field "id" on measurement "trades-POLONIEX" is type float, already exists as type string dropped=1"}
To Reproduce
f.add_feed(Poloniex(subscription={'TUSD-USDT'], }, callbacks={TRADES: TradeInflux(db_addr, db = db_name , numeric_type=float )}))
Expected behavior
Trade ID type should be consistent for all exchanges.
Dropping values because of wrong ID type should be avoided.
Operating System:
The text was updated successfully, but these errors were encountered: