For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
25 1 3 10

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.

developer-community
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
21.5k 56 14 20

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.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.