The D directive sets a default commodity, to be used for amounts without a commodity symbol (ie, plain numbers). This commodity will be applied to all subsequent commodity-less amounts, or until the next D directive. (Note, this is different from Ledger's D.)
https://hledger.org/journal.html#default-commodity