kelp icon indicating copy to clipboard operation
kelp copied to clipboard

feat(424): generic price feed

Open clD11 opened this issue 2 years ago • 0 comments

This PR adds a generic price feed which takes a url and response path separated by a semi-colon to retrieve the price

Two examples urls and responses paths are shown below, to see the expected json response paste the url in the browser without the response path. This feat uses a library gjson and the full syntax for traversing json responses can be seen here https://github.com/tidwall/gjson/blob/master/SYNTAX.md

Examples

https://api.kraken.com/0/public/Ticker?pair=XBTUSD;result.XXBTZUSD.a.0 https://api.kraken.com/0/public/Depth?pair=XBTUSD;result.XXBTZUSD.asks.0.0

clD11 avatar Sep 14 '21 19:09 clD11