curl https://YOUR_QUICKNODE_ENDPOINT_HERE.com \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"risk.getPriceImpactScenarios","params":{"address":"0x5de5fc77fa43dda4155ce70edb0be683c0cc03c3", "scenarios":[{"asset":"WHYPE", "priceChange":-0.15}, {"asset":"WHYPE", "priceChange":-0.25}, {"asset":"UETH", "priceChange":-0.3}]},"id":1,"jsonrpc":"2.0"}'
from web3 import Web3
w3 = Web3(Web3.HTTPProvider("https://YOUR_QUICKNODE_ENDPOINT_HERE.com"))
resp = w3.provider.make_request(
'risk.getPriceImpactScenarios',{"address":"0x5de5fc77fa43dda4155ce70edb0be683c0cc03c3","scenarios":[{"asset":"WHYPE","priceChange":-0.15},{"asset":"WHYPE","priceChange":-0.25},{"asset":"UETH","priceChange":-0.3}]}
)
print(resp)
require 'eth'
client = Eth::Client.create "https://YOUR_QUICKNODE_ENDPOINT_HERE.com"
payload = {
"id":1,
"jsonrpc":"2.0",
"method":"risk.getPriceImpactScenarios","params":{"address":"0x5de5fc77fa43dda4155ce70edb0be683c0cc03c3","scenarios":[{"asset":"WHYPE","priceChange":-0.15},{"asset":"WHYPE","priceChange":-0.25},{"asset":"UETH","priceChange":-0.3}]}
}
response = client.send(payload.to_json)
puts response
const ethers = require("ethers");
(async () : {
const provider = new ethers.providers.JsonRpcProvider("https://YOUR_QUICKNODE_ENDPOINT_HERE.com");
const network = await provider.send(
"risk.getPriceImpactScenarios",{"address":"0x5de5fc77fa43dda4155ce70edb0be683c0cc03c3","scenarios":[{"asset":"WHYPE","priceChange":-0.15},{"asset":"WHYPE","priceChange":-0.25},{"asset":"UETH","priceChange":-0.3}]}
);
console.log(network);
})();