Open elvinteo84 opened 5 years ago
@Vlad Tyum I think you are hitting the rate limit...
some _req are produced... then they are passed into a validator function which looks like it makes an API call then if no error you produced _ans
If you breach the limit of X requests per second, they will just refuse to serve data...
from your order_hist_fix.py file...
def send_time(pair):
request = '{"call":"checkHistory", "caller":"client1","uniqID":"3","exchange":"CoinSuper", "args":{"pair":"%s"}}' % (pair)
# print(request)
with topic.get_sync_producer(linger_ms=0) as producer:
producer.produce(request.encode('utf-8'))
while True:
for pair in local_conf.pairs:
send_time(pair)
time.sleep(3)
you are producing 2 messages (1 for each pair) to kafka at 3 second interval Normally this will not cause any issues. but if it happens there is some latency and you message queue is backed up due to this... There is a potential to exceed the Rate Limit imposed by CoinSuper at the consumer side which executes the API calls
Also you will have a problem if customer wants to play with 10 pairs... you will send 10 pairs, wait 3 seconds, send another 10 pairs... On the consumer site, rate limit will instantly be hit and CoinSuper will stop sending you anything or refuse you info
So the outage we are experiencing is most likely not a CoinsSuper problem. If it was so, the API chat group will have a lot of complaints, and Li Yong will be screwed badly.
Philip: To verify on API Limits and if we are hitting the APIs limit. We should work on -10% from the API Limits at all times
Is there any way where we can: 1) Show that the Trading Modules are connected live?
Data showing live data from Coinsuper but Trading Modules are not connected. Unable to use the limit order
2) Do a reset button so that they can self fix?
Coming from an angle where the users are aware of the status and able to use the system confidently. If the system are not connected live, they will be able to self fix with a reset button