This paper is concerned with an inverse problem of recovering a potential term and fractional order in a one-dimensional subdiffusion problem, which involves a Djrbashian-Caputo fractional derivative of order α ∈ (0, 1) in time, from the lateral Cauchy data. In the model, we do not assume a full knowledge of the initial data and the source term, since they might be unavailable in some practical applications. We prove the unique recovery of the spatiallydependent potential coefficient and the order α of the derivation simultaneously from the measured trace data at one end point, when the model is equipped with a boundary excitation with a compact support away from t = 0. One of the initial data and the source can also be uniquely determined, provided that the other is known. The analysis employs a representation of the solution and the time analyticity of the associated function. Further, we discuss a two-stage procedure, directly inspired by the analysis, for the numerical identification of the order and potential coefficient, and illustrate the feasibility of the recovery with several numerical experiments.