Once a transaction is successfully completed, it cannot be canceled. You may, however, make a new purchase/sale for the same amount of gold at the prevailing market price.