Unit Conversion

I am requesting Gold prices from WebSocket API.

As I know, I am getting Bids and Asks in USD/oz

I want to show them in USD/g (USD per Gram) as well. Can I do the conversion at my end ? or is it something that I should request from the API.

Best Answer

  • Gurpreet
    Answer ✓

    Hi @weber01,

    The price conversion will have to be done at the application level after receiving the prices from API. Just divide the price by 28.3495 (gm/oz) to get the price in grams.