How to know the format when programmatically setting a field value
You will need to pass price object to it and not just a number. Do like this -

$price = new Price('2000', 'USD');
$entity-&gt;set('price', $price);
$entity-&gt;save();


You can always look at tests to know how things are working for the module. :)