In this work, we develop a discretisation method for the mixed formulation of the magnetostatic problem supporting arbitrary orders and polyhedral meshes. The method is based on a global discrete de Rham (DDR) sequence, obtained by patching the local spaces constructed in [Di Pietro, Droniou, Rapetti, Fully discrete polynomial de Rham sequences of arbitrary degree on polygons and polyhedra, arXiv:1911.03616] by enforcing the single-valuedness of the components attached to the boundary of each element. The first main contribution of this paper is a proof of exactness relations for this global DDR sequence, obtained leveraging the exactness of the corresponding local sequence and a topological assembly of the mesh valid for domains that do not enclose any void. The second main contribution is the formulation and well-posedness analysis of the method, which includes the proof of uniform Poincare inequalities for the discrete divergence and curl operators. The convergence rate in the natural energy norm is numerically evaluated on standard and polyhedral meshes. When the DDR sequence of degree $kge 0$ is used, the error converges as $h^{k+1}$, with $h$ denoting the meshsize.