Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions pricebot.lua
Original file line number Diff line number Diff line change
@@ -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
)
Binary file added proof.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added proof2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.