Synthetixio / synthetix

Synthetix Solidity smart contracts
https://synthetix.io/
MIT License
1.21k stars 599 forks source link

Looking for some examples for how to curl the Synthetix API #376

Closed bitcoinmeetups closed 4 years ago

bitcoinmeetups commented 4 years ago

Looking for some examples for how to curl the Synthetix API

Hi,

I am testing out the Synthetix API at the moment. I am looking for some examples for how to curl the API. If you could post a couple of examples below that would be nice.

BM

jjgonecrypto commented 4 years ago

So as the backend is Ethereum, we supply the synthetix-js library as a mechanism to easily fetch state on-chain.

We do have an internal API that feeds some of https://dashboard.synthetix.io, however we are migrating to using The Graph, and have another utility to abstract away GraphQL requests to those endpoints: synthetix-data.

There is no documentation for the internal API we are using. You could either compile something yourself on-chain using synthetix-js, query via synthetix-data, or use a third party service like Dune Analytics or some such.