Is there any token out there that have move than 9 decimals?
Can tokens have more than 9 decimals?
Hi @J053, currently there is no token that has more than 9 decimals on the Incognito network. Are you looking for something?
I see that on the pool information that getpdestate
returns, the pool sizes are integers, and in order to get the price rate, you need to know the decimals that each token have.
My guess is that no coin have more than 9 decimals, and that would make the code for my new bot less complex.
But are you telling me that itās possible that a coin can have more than 9 decimals?
Hi @J053, you are correct. I think this api would be helpful: https://api.incognito.org/ptoken/list
You can query the exact number of the decimal for each token here: "PDecimals":
Awesome! This will be really useful. Thanks.
@Peter, is there a way to get also a list of custom tokens? And where can I read documentation about this API?
This way please
Not every coin in the api have a PDecimals value. Do I need to assume that they have 9 decimals?
@abduraman
@J053 if the PDecimals is not available, it is considered as ā0ā by default (except for PRV, it has 9 decimal numbers).
We donāt have an official doc yet for API. We could provide some upon your requests. What are you going to build? Is that related to Assets/ Provide/ pDex/ etcā¦?
It is related to the pDEX.
Hi @J053, hope this helps:
1/ Getting pair on the Incognito network:
curl --location --request POST āhttps://device-network.incognito.org/chainā
āheader āContent-Type: application/jsonā
āheader āCookie: __cfduid=d2bb1a7ef5205eec104cf39f7928ece491605608772ā
ādata-raw ā{
ājsonrpcā: ā1.0ā,
āmethodā: āgetpdestateā,
āparamsā: [],
āidā: 1
}ā
2/ Getting quote of a pair on Uniswap/ Kyper
curl --location -g --request GET āhttps://api.incognito.org/uniswap/rate?SrcToken=${srcToken}&DestToken=${destToken}&Amount=${originaAmount}ā
āheader āCookie: __cfduid=d2bb1a7ef5205eec104cf39f7928ece491605608772ā