Hello,
My name is Anish. I just started to use influx and would like to store crypto (trade, order) data.
The data comes from a websocket as JSON, i will parse using Java and would like to write to influx.
Should i be creating:
different measurements like asks, trades, bids?
use Tags like currency_pair, trade_type?
use Fields like price, amount, tid, last_price?
Sorry, i am perplexed on how to write all the below data to influx, any pointers should be very helpful.
Thanks and Regards
Anish
Below is the data that comes as a single JSON:
{“asks”:
[
[38.5097,64.0],
[38.51,1211.0],
[38.59,7.2],
],
“last_price”:{“action”:“ask”,“price”:38.5},
“target_users”:[“sadasda”],
“trades”:
[
{“currency_pair”:“xem_jpy”,“trade_type”:“ask”,“price”:38.5,“currency_pair”:“xem_jpy”,“date”:1521088883,“amount”:1343.0,“tid”:106350611},
{“currency_pair”:“xem_jpy”,“trade_type”:“ask”,“price”:38.5,“currency_pair”:“xem_jpy”,“date”:1521088879,“amount”:1851.0,“tid”:106350587},
{“currency_pair”:“xem_jpy”,“trade_type”:“ask”,“price”:38.5,“currency_pair”:“xem_jpy”,“date”:1521088872,“amount”:29.0,“tid”:106350580},
],
“bids”:
[
[38.5,5032.9],
[38.4,4.0],
[38.344,4495.8],
],
“currency_pair”:“xem_jpy”,“timestamp”:“2018-03-15 13:41:24.923787”}