Setting precision for 12 places after the decimal for Crypto API

Hi all,
I’m getting crypto prices from the Coinmarketcap API and the prices have 12 decimal places E.g. $0.000000007269

However, when I fetch the prices into Airtable, the field [Prices] has precision set to 1.0000000 - 7 places and missing the remaining 5 places.

Is there a way to resolve this?

Thanks in advance,
Paul

One option is to save it into a text field. If you need to use it in any calculations, wrap the field reference in the VALUE() function to turn it back into a number. To display the result, concatenate it with an empty string to re-stringify it. It’s a few extra steps, but the precision should be maintained (knock on wood; I’ve never done super precise math with Airtable formulas, so I recommend running tests to ensure that this process will work for your use case).

A number/currency field is capable of storing a number with 12 decimal places if you set the value via scripting API. However, the user interface will not show these additional decimal places. You can see that the extra decimal places are stored in the editable field by using a formula field to convert the value to a string (e.g. {price} & "").

1 Like

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.