#twiddlecoding

1 messages ยท Page 1 of 1 (latest)

worldly dawnBOT
hardy coyote
#

๐Ÿ‘‹ happy to help

foggy remnant
#

thanks!

hardy coyote
foggy remnant
#

I see. So I would need to check for the Zero-decimal currencies and treat them differently

#

Is it true that every currency except the Zero-decimal ones should have two decimals?

#

if i fetch a price in the other currencies, i should put the last two digits in the integer as after the decimal

hardy coyote
#

in the API you don't pass in decimals

#

instead you pass in the amount in cents

#

so 10$ becomes 1000

foggy remnant
#

I know, but when fetching a price, and I want to present it

#

should i precent every currency with two decimals, except the Zero-decimal ones?

hardy coyote
#

you format it accordingly

#

yes exactly

#

so you don't have to /100

foggy remnant
#

perfect

#

Thank you!

hardy coyote
#

let me know if you need any more help

foggy remnant
#

There seem to be three decimal currencies as well, so there are three types then?

hardy coyote
#

and there are special cases

#

๐Ÿ™ˆ

#

it really depends on what currencies you want to support

#

but all of the information regarding those can be found on the same page I shared earlier

worldly dawnBOT