RE: Karaka Tutorial #5: Oracles

avatar

You are viewing a single comment's thread:

Do you have any plans to add Oracles for Hive-Engine tokens? I have been using Karaka for a few weeks now and it works perfectly for my needs - a really well thought out tool which is exceptionally easy to configure.

What would be ideal though I think is to be able to specify a Hive-Engine token market price to be lower then a set threshold before issuing a market buy. At the moment I have it set to purchase a token when I have over 10 swap hive, but it would be preferable to have it also check the token valve and only buy when it is lower then a set amount so you don't buy whatever the current market is - but just when the lower priced offerings pop up.



0
0
0.000
2 comments
avatar
(Edited)

Hi. I'll get onto it in the next couple of weeks - still dealing with the comings and goings of Christmas and New Year! I can see myself using this feature too.
UPDATE: Done.

0
0
0.000
avatar

@c0ff33a I have a hive-engine token price oracle working and pushed to GitHub. I'll do documentation later, but here are the basics. LMK if you need any help.

"oracles": [
        { "type": "hiveengineorderbook", "params": { "tokens": [ "DEC", "BEE", "WORKERBEE" ]}}
]

Generates these facts:
hemDEC_price, hemDEC_bid, hemDEC_ask,
hemBEE_price, hemBEE_bid, hemDEC_ask,
hemWORKERBEE_price, hemWORKERBEE_bid, hemWORKERBEE_ask

The pricing is in SWAP.HIVE. You can approximate that in USD by multiplying it with the HIVEUSD price from the Coingecko oracle. The format of the generated fact names is: hem[tokenname]_price. There's also _bid and _ask if you'd prefer those - probably more useful than _price in thinly traded or widely spread markets.

Happy New Year.

0
0
0.000