QUESTION ABOUT SLOW API

0

do you know about api requests cryptocurrency exchanges? Simple ticker request may be viewed like this: https://api.kucoin.com/v1/open/tick or like this: https://www.okex.com/api/v1/ticker.do?symbol=ltc_btc

Different: in first case we get info about all currencies in one request and then pick up certain symbols and parameters, we need. Symbols are the keys of dictionaries or lists and other params are their values.

In second case I should create new request for each currencies I considering. Is it neccesary? If I consider, for instance 60 symbols, and do operations with them in Python - programm bot become slow enough. One-two ticker requests are long about 30 sec - for compare, in first case - 5 sec.

How can I solve this problem? Thanks.

Кирилл Вишняков

Posted 2018-03-11T18:24:36.713

Reputation: 103

Answers

1

You can solve this problem by making a request to https://www.okex.com/api/v1/tickers.do (without the symbol parameter). This will give you all the tickers in one request.

Coinwoke

Posted 2018-03-11T18:24:36.713

Reputation: 26

Genius! But why I can't find this way on https://www.okex.com/rest_api.html#spapi page?

Кирилл Вишняков 2018-03-14T19:55:42.240

It's not completely documented, but the closest thing I found was on https://github.com/okcoin-okex/OKEx.com-api-docs/blob/master/API-For-Spot-EN/REST%20API%20for%20SPOT.md#spot-price-api.

Coinwoke 2018-03-15T21:48:56.977