uid (1) | timestamp | nanoseconds (2) | price (3) | volume (3) | notional (3) | tickRule (4) |
---|---|---|---|---|---|---|
... | ...00:27:17.367156 | 0 | 456.98 | 2000 | 4.3765591... | -1 |
... | ...00:44:59.302471 | 0 | 457.1 | 1000 | 2.1877050... | 1 |
... | ...00:44:59.302471 | 0 | 457.11 | 2000 | 4.3753144... | 1 |
Note:
- UID
- Some exchanges use integer IDs, others UUIDs.
- Nanoseconds
- Many databases don't support nanoseconds. Then again, many exchanges don't either. Timestamps are parsed with
pd.to_datetime(value)
, asdatetime.datetime
doesn't support nanoseconds. If nanoseconds exist, they are saved to the nanoseconds column.
- Price, volume, and notional
django-quant-tick
stores decimals withmax_digits=76
anddecimal_places=38
, similar to BigQuery's BIGNUMERIC type. Some exchange REST APIs return floats rather than strings, which can be an issue when parsing toDecimal
. Such exchanges include Bitfinex, BitMEX, and Bybit. For those exchanges, response is loaded withjson.loads(response.read(), parse_float=Decimal))
.
- Tick rule
- Plus ticks and zero plus ticks have tick rule 1, minus ticks and zero minus ticks have tick rule -1.