expected min_ndim=3, found ndim=2.
Keras expects three-dimensional arrays when working with Conv1D: the expected shape is [batch_size, sequence_length, feature_dimension]. In your case, you only have one feature dimension, I suspect the price, but imagine you also wanted to pass the trading volumes data, you would have xtrain.shape == (6445,16,2). The last dimension would contain information about the price and the volume.
To solve your issue, you need to reshape your xtrain to
(batch_size, sequence_length, feature_dimension=(6445,16,1)
To do so, you can use tensorflow:
xtrain = tf.expand_dims(xtrain, axis=-1) # -1 means expand the LAST axis
or with numpy:
xtrain = np.expand_dims(xtrain, axis=-1) # -1 means expand the LAST axis
This function just does what the name implies: it adds a new axis in the position specified by axis. This results in xtrain having the shape we wanted, now you can just proceed with your model, for example:
model = keras.models.Sequential()
model.add(keras.layers.TimeDistributed(keras.layers.Conv1D(filters=64, kernel_size=1, activation='relu'), input_shape=(None,16,1)))