diff --git a/pricebot.lua b/pricebot.lua new file mode 100644 index 00000000..ee15c41c --- /dev/null +++ b/pricebot.lua @@ -0,0 +1,29 @@ +-- PID = cwiHvE9XKrEaOfYISRiHqg9xHx4y8wPlwe3N64v7ko4 + +_ORBIT = "WSXUI2JjYUldJ7CKq9wE1MGwXs-ldzlUlHOQszwQe0s" + +function handleError(msg, errorMessage) +ao.send({ + Target = msg.From, + Tags = { + Action = "Error", + ["Message-Id"] = msg.Id, + Error = errorMessage + } +}) +end + +Handlers.add("muhhlmy", +Handlers.utils.hasMatchingTag("Action", "muhhlmy"), +function(msg) +local token = msg.Tags.Token +local url = "https://api.coingecko.com/api/v3/simple/price" .. "?ids=".. token .. "&vs_currencies=usd" +ao.send({ + Target = _ORBIT, + Action = "Get-Real-Data", + Url = url +}) +Handlers.utils.reply("PriceFetch") +(msg) +end +) \ No newline at end of file diff --git a/proof.png b/proof.png new file mode 100644 index 00000000..5fd236fe Binary files /dev/null and b/proof.png differ diff --git a/proof2.png b/proof2.png new file mode 100644 index 00000000..5c4b1d5c Binary files /dev/null and b/proof2.png differ