API
Please get in touch with us if you would like to use our APIs in a third-party application.
We have the following endpoints available:
Returns an overview of all tokens available on Astrolescent.
Return value:
[{
"symbol": "XRD",
"rri":"xrd_rr1qy5wfsfh",
"name":"Radix",
"supply":10152000000
}]
Returns an overview of all tokens prices and their price history across the Radix network
Return value:
{
"ASTRL": {
"symbol":"ASTRL",
"rri":"astrl_rr1qwp4zfgxvpfez77z3yztufxw0rpw88p3tkm349rfcyxsxchcnw",
"name":"Astrolescent",
"tokenPrice":"1.075885086046706657",
"tokenPriceUSD":"0.06429617637680944411023579424608303",
"diff24H":-0.19591528504440345,
"diff24HUSD":-0.2824917832082802,
"diff7Days":-0.48487925930952536,
"diff7DaysUSD":-0.5775126748735373,
"marketCap":"2314662.34956513998796848859285898908"
}
}
Calculates the optimal route for a given input and output token and the number of input tokens
Swap accepts as GET parameters:
tokenIn
as RRItokenOut
as RRItokenInAmount
in 10^18fromAddress
as Radix address
Return value
{
"inputTokens":999000000,
"outputTokens":358493.91433750204,
"priceImpact":1.9951535000847578,
"swapFee":"1000000",
"transactionData": {
"actions":[
{"type":"TransferTokens","from_account":{"address":"rdx1qspk8wnuetu3r9hrj9u0vf25dyt0tzvkv2gn8nyh36jwglhvlqmm6hq3h8vqj"},"to_account":{"address":"rdx1qspd20zquhg2cy8uf2gpvp99sfpszz9j2fv7fqefhldqdmkv2nsngkgylal6d"},"amount":{"token_identifier":{"rri":"foton_rr1qwsqw647kcykj562vzvgekfqthjyt4txmqljqv90mp6s74glca"},"value":"999000000000000000000000000"}},
{"type":"TransferTokens","from_account":{"address":"rdx1qspk8wnuetu3r9hrj9u0vf25dyt0tzvkv2gn8nyh36jwglhvlqmm6hq3h8vqj"},"to_account":{"address":"rdx1qspjf3tndy3pm5qq22p6w2nuxasz8y74hs6qststjh7qdpgg34hwe7qnyumzy"},"amount":{"token_identifier":{"rri":"foton_rr1qwsqw647kcykj562vzvgekfqthjyt4txmqljqv90mp6s74glca"},"value":"1000000000000000000000000"}},
{"type":"TransferTokens","from_account":{"address":"rdx1qspk8wnuetu3r9hrj9u0vf25dyt0tzvkv2gn8nyh36jwglhvlqmm6hq3h8vqj"},"to_account":{"address":"rdx1qspjna6nsa527aryh9lyx7a99pdhxc7rqr34dd4zenwtm9ed4cgxwecr5q77g"},"amount":{"token_identifier":{"rri":"xrd_rr1qy5wfsfh"},"value":"1"}}
],
"encryptMessage":false,
"message":"XRD"},
"routes":[
{
"pool":"Ociswap_FOTON",
"startPrice":"13.505538648471888427",
"endPrice":"2786.658183155369154217",
"impact":0.9951535000847577,
"tokensIn":999000000,
"tokensOut":358493.91433750204
}
]
}
Last modified 3mo ago