Skip to content

Instantly share code, notes, and snippets.

@still-dreaming-1
Last active May 2, 2022 15:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save still-dreaming-1/b51cf6b8a35f2de929e805f20168adf1 to your computer and use it in GitHub Desktop.
Save still-dreaming-1/b51cf6b8a35f2de929e805f20168adf1 to your computer and use it in GitHub Desktop.
Live Coin Watch API coins/list example
// Live Coin Watch sample code migrated to be compatible with RestSharp v107
var client = new RestClient(
new RestClientOptions("https://api.livecoinwatch.com/coins/list") {
Timeout = -1
}
);
var request = new RestRequest()
.AddHeader("x-api-key", "your API key here")
.AddJsonBody(new {
currency = "USD",
sort = "rank",
order = "ascending",
offset = 0,
limit = 2,
meta = false
});
var response = await client.PostAsync(request);
Console.WriteLine(response.Content);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment