[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Let's say hypothetically I want to make a phone app / web

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 7
Thread images: 2

File: 1486617162625.jpg (78KB, 640x640px) Image search: [Google]
1486617162625.jpg
78KB, 640x640px
Let's say hypothetically I want to make a phone app / web tools for cryptocurrency investment. Where do services get their data from? All the APIs I find have very restrictive limits.
>>
If you need higher limits, contact said API vendor and offer money. Most will accommodate for moneys.
>>
File: aGRAbj5_460s.jpg (33KB, 460x515px) Image search: [Google]
aGRAbj5_460s.jpg
33KB, 460x515px
>>3218900
im the one who pioneered that image
>>
>>3218900
Why dont you cache the market data on a server and serve that data to your app?

Then you can cut the requests down to a few nodes that stream its data via websockets to end client
>>
>>3218900
You need to under volt AND power limit your cards. And don't mine during peak hours if your electric company charges you extra at that time.

Also you shouldn't be mining with 1080TI wtf.
>>
>>3219108
Well obviously I'm not going to have the app make an API call every time the user wants to refresh data, but take for example coinmarketcap's API -- It only gives me an overview count, and no icons for ticker images. I'd need to hit all the APIs for accurate data -- cryptopia, bittrex, etherdelta, etc. And they all have different limits and give different data and some of them are stricter than others.
Ah whatever I'll just do it and not be lazy about it.
>>
>>3219194
quick and dirty

public class Scraper : IDisposable
{
private readonly HttpClient _httpClient;

public Scraper()
{
_httpClient = new HttpClient();
}

public void Dispose()
{
_httpClient?.Dispose();
}

public async Task Scrape()
{
Directory.CreateDirectory("icons");

IList<Ticker> tickers;

using (HttpResponseMessage response =
await _httpClient.GetAsync("https://api.coinmarketcap.com/v1/ticker/"))
{
response.EnsureSuccessStatusCode();
string jsonStr = await response.Content.ReadAsStringAsync();
tickers = JsonConvert.DeserializeObject<IList<Ticker>>(jsonStr);
}

foreach (Ticker ticker in tickers)
{
await Task.Delay(500);

using (HttpResponseMessage response =
await _httpClient.GetAsync(
$"https://files.coinmarketcap.com/static/img/coins/32x32/{ticker.Id}.png"))
{
response.EnsureSuccessStatusCode();
byte[] bytes = await response.Content.ReadAsByteArrayAsync();
File.WriteAllBytes(Path.Combine("icons", $"{ticker.Id}.png"), bytes);
}
}
}
}

public class Ticker
{
public string Id { get; set; }
}
Thread posts: 7
Thread images: 2


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.