Open realpaaao opened 4 weeks ago
Some other options other than LiFi
Option A: Use Thorwallet DEX API https://api-v2-prod.thorwallet.org/price/ETH.VTHOR-0X815C23ECA83261B6EC689B60CC4A58B54BC24D8D
Option B It is on etherscan:
https://etherscan.io/address/0x815c23eca83261b6ec689b60cc4a58b54bc24d8d#readContract
go to read contract -> convertToAssets -> 1000000 -> query, will return you something you cna divide by your input
In my screenshot: 2.129744
Option C Get directly from an RPC
"jsonrpc": "2.0",
"id": 1,
"method": "eth_call",
"params": [
{
"from": "0x0000000000000000000000000000000000000000",
"data": "0x07a2d13a0000000000000000000000000000000000000000000000000000000000989680",
"to": "0x815c23eca83261b6ec689b60cc4a58b54bc24d8d"
},
"latest"
]
}
Source: https://discord.com/channels/831398059484250142/968101436388966430/1293022058669801503
This API only returns {}
Option A: Use Thorwallet DEX API https://api-v2-prod.thorwallet.org/price/ETH.VTHOR-0X815C23ECA83261B6EC689B60CC4A58B54BC24D8D
This API only returns {}
Option A: Use Thorwallet DEX API https://api-v2-prod.thorwallet.org/price/ETH.VTHOR-0X815C23ECA83261B6EC689B60CC4A58B54BC24D8D
I asked cryptoxz why it stopped working. https://discord.com/channels/1203844257220395078/1302879277196378204/1303119140705275924
The other calls still seem to work though:
https://api-v2-prod.thorwallet.org/price/ETH.ETH
https://api-v2-prod.thorwallet.org/price/ETH.WBTC-0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599
To have a price for VTHOR we should implement pulling the price from
https://li.quest/v1/token?chain=eth&token=0x815C23eCA83261b6Ec689b60Cc4a58b54BC24D8D