API problems

蚂蚁矿池 • 综合讨论区 • matthieu • 于2015-12-11 15:39:16发布 • sirius-bern2016-01-04 10:16:13回复 • 共3976次阅读

I've been having this error for a while now. My key was working perfectly until now...

Fatal error: Uncaught exception 'Exception' with message 'Not enough permission (code -9)'

conrad_pearson • #31 • 2015-12-29 19:12:39
Not their strong point indeed.

Alert system:
- Set up a Twitter account for each service (for example)
- Setup time: about 5 minutes. Costs: Free
- Problem solved.

Under constant DDoS:
- Use a separate VPS/host for the API (for example as a proxy)
- Don't use CloudFlare attack mode on that host, only standard mode which is REST compatible
- Use API key-based anti-DDoS instead for that host (already implemented, 600 reqs / 600 sec)
- Setup time: about 45 minutes. Costs: <$15 / month.
- Problem solved.

Don't they already have API restrictions enabled at 600 requests per 10 minutes (600 seconds)?  Setup time: zero.  Costs: free.  Problem never was unless they weren't enforcing the restrictions.

BTW they closed my ticket without responding to the when and where.  I guess their approach is "If there aren't any complaints there isn't a problem."

matthieu • #32 • 2015-12-31 08:49:09
Well, the wait is over folks.

I have created an alternative API that is free for everyone to use. It only requires a one-time registration of your API key. Then you just need to change the URL for API calls and you're done!

For more information see: http://maaapi.mooo.com/info/

I hope this will be useful to the community :)
conrad_pearson • #33 • 2015-12-31 15:34:31
Thanks for doing this Matt.  It's really sad that you can give us this free of charge, but for the approximate $1 million a year we give Antpool just from them keeping the transaction fees (Transaction fees not paid out to miners for maintaining cost and the bonus for our engineers) they couldn't fix the problem.
matthieu • #34 • 2016-01-01 16:52:21
It appears that MAAAPI has a lot of success, but because many people are using several calls per iteration (workers, account, hashrate...), the 10 requests / 10 minutes appeared a bit too low.

Therefore, the new limit is now 20 requests / 10 minutes. Happy new year :)

@conrad_pearson Thanks, well hopefully BITMAIN will be more reactive after the new year holidays...
blakemiles84 • #35 • 2016-01-02 07:37:45
matthieu - thanks for putting this together.. I'm admittedly a noob on coding, but I'm using someone elses code for an application but I'm having trouble finding where I would insert your API call url in its place. Not sure if you can help, but I would be happy to tip you for your work.
matthieu • #36 • 2016-01-02 16:05:30
@blakemiles84 the easiest way would probably to do a full text search of the base URL inside your code directories. It should be either https://antpool.com or https://www.antpool.com. Then all you need to do is update it. If you can't find it, you could send me the code to the contact address maaapi.contact@gmail.com
neville.richards • #37 • 2016-01-03 01:34:15
Thanks to Matthieu for the alternative API. I have put together a small .NET utility to write Antpool metrics to a log file for later reporting at http://propertyinvestcalc.com/antpool-logger.aspx. The utility supports the Antpool API and Matthieu's API. The utility is still in test so please let me know if you find any issues. I also have a Splunk application which creates a series of reports from the log information if anyone is interested.
sirius-bern • #38 • 2016-01-04 10:16:13
Thanks a lot Matthieu! It works perfectly! I will donate something when I am back from holidays.

您需要登录后方可回复, 如果你还没有账号你可以注册一个帐号。
全网算力 & 挖矿难度
USD  % 
EUR  € 

AntPool 蚂蚁矿池

QQ群 227819626