Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

feat(424): generic price feed #735

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

clD11
Copy link
Contributor

@clD11 clD11 commented Sep 14, 2021

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 clD11 requested a review from nikhilsaraf as a code owner September 14, 2021 19:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant