add get_asset_supply
This commit is contained in:
parent
5fe11b8b04
commit
d797f35ba9
1 changed files with 16 additions and 1 deletions
|
|
@ -120,7 +120,22 @@ const requestsLimiter = rateLimit({
|
|||
})
|
||||
res.json(response.data)
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
app.get('/api/get_asset_supply', exceptionHandler(async (req, res) => {
|
||||
const response = await axios({
|
||||
method: 'get',
|
||||
url: config.api,
|
||||
data: {
|
||||
method: 'get_asset_info',
|
||||
params: {
|
||||
asset_id: req.query.asset_id || ""
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
res.json(response?.data?.result?.asset_descriptor?.current_supply || "Error fetching supply");
|
||||
}));
|
||||
|
||||
app.get(
|
||||
'/api/get_total_coins',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue