How does the chain get the token price?
What should I configure?
cgw logs
{"build_number":"234a559","level":"error","message":"Error getting native coin price: Error ","request_id":"052850c3-0ba6-402e-b422-9aada3087714","timestamp":"2024-08-22T08:51:01.820Z","version":"v1.53.0"}
{"build_number":"234a559","level":"error","message":"Error getting token prices: Error: Error getting 0x5fd55a1b9fc24967c4db09c513c3ba0dfa7ff687 price from provider ","request_id":"7e46512c-42ef-4daf-90e7-35794b0c8b09","timestamp":"2024-08-22T08:51:32.146Z","version":"v1.53.0"}
ui screen capture
cfg admin config
@fmrsabino @hectorgomezv @iamacook
Hello @lance-web3,
We currently use Coingecko to get the fiat prices, so you would need to take those configuration values from the Coingecko API: https://api.coingecko.com/api/v3/asset_platforms
I understand you are trying to get prices on fxCore Mainnet, so:
{
"id": "function-x",
"chain_identifier": 530,
"name": "Function X",
"shortname": "",
"native_coin_id": "fx-coin"
},
So:
Prices provider native coin: fx-coin
Prices provider chain name: function-x
You can left "Balances provider" configuration keys empty.
Hello @lance-web3,
We currently use Coingecko to get the fiat prices, so you would need to take those configuration values from the Coingecko API: https://api.coingecko.com/api/v3/asset_platforms
I understand you are trying to get prices on fxCore Mainnet, so:
{ "id": "function-x", "chain_identifier": 530, "name": "Function X", "shortname": "", "native_coin_id": "fx-coin" },So:
Prices provider native coin: fx-coin Prices provider chain name: function-xYou can left "Balances provider" configuration keys empty.
ok it works, how about for all other tokens? I am wondering.. @hectorgomezv
You'd need to configure the native_coin_id (in the Coingecko response) as Prices provider native coin (in the Config Service Chain configuration). And also id (in the Coingecko response) as Prices provider chain name (in the Config Service Chain configuration).
You'd need to configure the
native_coin_id(in the Coingecko response) asPrices provider native coin(in the Config ServiceChainconfiguration). And alsoid(in the Coingecko response) asPrices provider chain name(in the Config ServiceChainconfiguration).
@hectorgomezv
Say we have more than 1 tokens, You mean it can configure multiple in those field? e.g.
Prices provider native coin: fx-coin,coin2,coin3
Prices provider chain name: function-x
Hi @lance-web3 Apologies for not following up earlier. Have you found a solution to your question in the meantime? If not, please let me know how we can assist. Otherwise, I will close this issue shortly.