{"id":370605,"date":"2024-05-21T04:29:06","date_gmt":"2024-05-21T04:29:06","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=370605"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=370605","title":{"rendered":"<span>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 TON, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f API Stonfi<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041b\u044e\u0431\u043e\u0439 \u043a\u0442\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432. \u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b \u043f\u043b\u043e\u0445\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 &#8212; \u043d\u043e\u0434\u044b, \u043b\u0430\u0439\u0442\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u0434\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0441\u0435\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0438\u043b\u0438 API \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0440\u0436\u0438 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430\u0445 \u043a\u0430\u043a coingecko \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API, \u0447\u0430\u0441\u0442\u043e \u0434\u0435\u043b\u0430\u044f \u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c\u0438. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0435\u0439 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0434\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 TON \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 DEX, \u043d\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b, \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u0432 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 TON.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0431\u043e\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u0434 \u0432 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u0436\u0435\u0442\u0442\u043e\u043d\u044b \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 TON<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0443, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 API, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0430\u0442\u044b \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442:<\/p>\n<pre><code class=\"python\">def now_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S')  def thirty_days_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=30)).strftime('%Y-%m-%dT%H:%M:%S')  def seven_days_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=7)).strftime('%Y-%m-%dT%H:%M:%S')  def day_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=1)).strftime('%Y-%m-%dT%H:%M:%S')  now_utc()<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c API GET <strong>https:\/\/api.ston.fi\/v1\/stats\/pool<\/strong><\/p>\n<pre><code class=\"python\">payload = {'since': day_utc(), 'until': now_utc()}  r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)  r.json()['stats'][0]<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0443\u043b\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/80a\/3fa\/425\/80a3fa42571c2ec14497afbbabf8beea.png\" alt=\"\u0420\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043f\u0443\u043b - \u0432\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\" title=\"\u0420\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043f\u0443\u043b - \u0432\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\" width=\"1240\" height=\"328\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/80a\/3fa\/425\/80a3fa42571c2ec14497afbbabf8beea.png\"\/><\/p>\n<div><figcaption>\u0420\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043f\u0443\u043b &#8212; \u0432\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e<\/p>\n<h3>\u0411\u0435\u0440\u0435\u043c \u043f\u043e\u043b\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0418\u043c\u044f \u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u0436\u0435\u0442\u0442\u043e\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0416\u0435\u0442\u0442\u043e\u043d\u0430 \u0437\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044a\u0435\u043c \u0432 TON<\/p>\n<\/li>\n<li>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0443\u043b \u0434\u043b\u044f \u0441\u0432\u0430\u043f\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0448\u0435 API:<\/p>\n<pre><code class=\"python\">#\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u043b\u044f def take_pool_stats():   temp_arr=[]   payload = {'since': day_utc(), 'until': now_utc()}   # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume']}     temp_arr.append(temp_dict)    return temp_arr  take_pool_stats()<\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 json\u2019\u044b:<\/p>\n<pre><code>```  {'coin': 'Chow Chow',  \u00a0\u00a0'pair': 'CHOW\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQBtWFPgVknfzu6xaVcRBbNP3h_6UJ_xe29sVkiFTyPiv2bq&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '0.010646867',  \u00a0\u00a0'volume_ton': '0.000000000'},  \u00a0{'coin': 'Tonald Duck',  \u00a0\u00a0'pair': 'TDUCK\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQBUGgcu-h4SqMh5hrentq4vE59tBRRfrYE3H_0s6D_1Xzsa&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '0.000000363',  \u00a0\u00a0'volume_ton': '0.000000000'},  ```<\/code><\/pre>\n<p>\u041d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e &#8212; \u043f\u0443\u043b \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0441\u0443\u043f\u0435\u0440 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h3>\u0428\u0430\u0433 \u043d\u0430\u0437\u0430\u0434<\/h3>\n<p>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0446\u0435\u043d\u044b \u0432 TON \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043d \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 TON\/USD. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f tonapi.io \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442:<\/p>\n<pre><code class=\"python\">#take toncoin price  def take_ton_price():   resp = requests.get('https:\/\/tonapi.io\/v2\/rates?tokens=ton&amp;currencies=usd')   # Ex: {\"rates\":{\"TON\":{\"prices\":{\"USD\":2.1215},\"diff_24h\":{\"USD\":\"+0.85%\"},\"diff_7d\":{\"USD\":\"-6.04%\"},\"diff_30d\":{\"USD\":\"+2.75%\"}}}}   return resp.json()[\"rates\"][\"TON\"][\"prices\"][\"USD\"]   take_ton_price()<\/code><\/pre>\n<h3>\u0423\u0431\u0435\u0440\u0435\u043c \u043b\u0438\u0448\u043d\u0435\u0435<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u043e\u0431\u044a\u0435\u043c\u0430 \u0438 \u0446\u0435\u043d\u044b. \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435 API \u043e\u0442\u0434\u0430\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u043f\u0443\u043b\u044b, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0435\u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u043b\u044b \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u044a\u0435\u043c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043f\u0443\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0446\u0435\u043d\u0443 \u0438 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e TON \u0438\u043b\u0438 \u0434\u043e\u043b\u043b\u0430\u0440\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b c TON<\/p>\n<\/li>\n<li>\n<p>\u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e<\/p>\n<\/li>\n<li>\n<p>\u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b \u0433\u0434\u0435 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u0435\u043d\u044c\u0448\u0435 1000 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443:<\/p>\n<pre><code class=\"python\">def take_pool_stats():   temp_arr=[]   payload = {'since': day_utc(), 'until': now_utc()}   # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,2),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2)}     if(jetton['quote_symbol']=='TON' and int(float(jetton['last_price']) != 0) and int(float(jetton['quote_volume']) != 0) and int(temp_dict['volume_usd']) > 1000):       temp_arr.append(temp_dict)    return sorted(temp_arr, key=lambda d: d['volume_usd'],reverse=True)  # Coin - base_name # Pair - base_symbol\/quote_symbol url # Price - last_price * TON in USD price # 24 Volume - \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0447\u0435\u043a\u043d\u0443\u0442\u044c \u043f\u043e coingecko  take_pool_stats()<\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438 json\u2019\u044b:<\/p>\n<pre><code class=\"json\">```  {'coin': 'STON',  \u00a0\u00a0'pair': 'STON\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '2.220362684',  \u00a0\u00a0'volume_ton': '74651.187439449',  \u00a0\u00a0'price_usd': 5.89,  \u00a0\u00a0'volume_usd': 197926.43},  ```<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e<\/h3>\n<p>\u041e\u0431\u044a\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043c \u043d\u0430 \u0440\u044b\u043d\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043e\u0431\u044a\u0435\u043c\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442.(\u0412 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0430\u0436 10 \u0446\u0438\u0444\u0440 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 TON \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u0430 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u043b\u044b, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u201c\u0440\u0430\u0437\u043c\u044b\u043b\u043e\u201d. \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u0438 4 \u0437\u043d\u0430\u043a\u043e\u0432)<\/p>\n<pre><code class=\"python\">def take_pool_stats(payload):   temp_arr=[]    # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()   # for volume percentage   all_volume = sum(float(item['quote_volume']) for item in resp)   print(all_volume)    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,4),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2),\"volume_perc\": round((float(jetton['quote_volume'])\/all_volume)*100,10)}     if(jetton['quote_symbol']=='TON' and int(float(jetton['last_price']) != 0) and int(float(jetton['quote_volume']) != 0) and int(temp_dict['volume_usd']) > 1000):       temp_arr.append(temp_dict)    return sorted(temp_arr, key=lambda d: d['volume_usd'],reverse=True)   payload = {'since': day_utc(), 'until': now_utc()} take_pool_stats(payload)<\/code><\/pre>\n<p>\u041f\u043e\u043b\u043e\u0436\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Pandas \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4af\/3b7\/67f\/4af3b767f3013fa3eb179b7de74fea74.png\" width=\"1160\" height=\"400\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/4af\/3b7\/67f\/4af3b767f3013fa3eb179b7de74fea74.png\"\/><\/figure>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0436\u0435\u0442\u0442\u043e\u043d\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b. \u041d\u043e \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u0443\u043b\u0430\u043c. \u0412\u0435\u0434\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0433\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0441 \u043f\u0430\u0440\u044b \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0433\u043e\u043d\u044f\u044f \u0442\u043e\u043a\u0435\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c.<\/p>\n<h3>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c<\/h3>\n<p>\u0412 API \u0441\u0442\u043e\u043d\u0444\u0430\u0439 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0423\u0434\u043e\u0431\u043d\u043e, \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0430\u043f\u043e\u0432 \u043f\u043e \u043f\u0443\u043b\u0430\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u044d\u0442\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434:<\/p>\n<pre><code class=\"python\">def take_operations(payload):   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/operations', params=payload)   return r.json()[\"operations\"]  payload = {'since': day_utc(), 'until': now_utc()}    pool_oper_list = list(filter(lambda person: person['operation']['pool_address'] == 'EQB4whdcKBgsDHoG2j9RhTdMdghXAIyPqQzusLSUgMUNUseo', take_operations(payload)))  len(pool_oper_list)<\/code><\/pre>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0443\u043b\u0430\u0445 \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435, \u0435\u0441\u0442\u044c \u0441\u0432\u0430\u043f\u044b, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442 \u0436\u0435\u0442\u0442\u043e\u043d\u044b \u0438 TON, \u0435\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u043b\u044b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0431\u0438\u0440\u0436\u0438 \u043a \u0431\u0438\u0440\u0436\u0435. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0430\u043f\u044b.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043f\u0443\u043b\u0430 \u0432\u0435\u0440\u043d\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0430\u043f\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u0430\u043f\u044b.<\/p>\n<pre><code class=\"python\">def count_pool_operations(operations,addr_str):     pool_oper_list = list(filter(lambda person: person['operation']['pool_address'] == addr_str, operations))     unique_counts = collections.Counter(e['operation']['destination_wallet_address'] for e in pool_oper_list )     return len(pool_oper_list),len(set(unique_counts))<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434:<\/p>\n<pre><code class=\"python\">def take_pool_stats(payload):   temp_arr=[]    # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()   # for volume percentage   all_volume = sum(float(item['quote_volume']) for item in resp)   # take operations   payload['op_type'] = 'Swap'   operations = take_operations(payload)   for jetton in resp:     temp_dict = {'pool_address': jetton['pool_address'],'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,4),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2),\"volume_perc\": round((float(jetton['quote_volume'])\/all_volume)*100,2)}     #temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,2),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2)}     #temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': jetton['last_price'],'volume_usd': jetton['quote_volume']}     if(jetton['quote_symbol']=='TON' and int(float(jetton['last_price']) != 0) and int(float(jetton['quote_volume']) != 0) and int(temp_dict['volume_usd']) > 1000):       #\u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c       temp_pool_count = count_pool_operations(operations,temp_dict['pool_address'])       temp_dict[\"count_swaps\"] = temp_pool_count[0]       temp_dict[\"count_unique\"] = temp_pool_count[1]       temp_arr.append(temp_dict)      return sorted(temp_arr, key=lambda d: d['volume_usd'],reverse=True)  # Coin - base_name # Pair - base_symbol\/quote_symbol url # Price - last_price * TON in USD price # 24 Volume - \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0447\u0435\u043a\u043d\u0443\u0442\u044c \u043f\u043e coingecko  payload = {'since': day_utc(), 'until': now_utc()} take_pool_stats(payload)<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/f01\/e66\/ed0\/f01e66ed0fb64511507b20a176aad3c8.png\" width=\"1600\" height=\"372\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f01\/e66\/ed0\/f01e66ed0fb64511507b20a176aad3c8.png\"\/><\/figure>\n<h3>\u041b\u043e\u0436\u043a\u0430 \u0434\u0435\u0433\u0442\u044f\u00a0<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0431\u0440\u0430\u043b\u0438 \u0432\u044b\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0433\u043a\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043f\u0443\u043b\u0430\u043c \u0438 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c, \u043d\u043e \u0435\u0441\u0442\u044c \u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0437\u0430\u0434\u0430\u0447\u0430 API \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e \u0446\u0435\u043d\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0446\u0435\u043d\u0443 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434, \u0447\u0442\u043e \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u0432\u0430\u0436\u043d\u0430 \u0446\u0435\u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u0430 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434, \u0432\u0430\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0446\u0435\u043d\u0443 \u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u0443\u044e \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0447\u0442\u043e \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 API.<\/p>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439, \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441, API \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0431\u0438\u0440\u0436 \u043d\u0435 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u0434 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043d\u0435\u043a\u0430\u044f live \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430, \u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434, \u044d\u0442\u043e \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0438\u0437 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 &#8212; \u0432\u044b\u0437\u044b\u0432\u0430\u044f get-\u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u00a0<\/h3>\n<p>\u041c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d TON \u0441\u0432\u043e\u0435\u0439 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0438\u0437\u044f\u0449\u043d\u043e\u0441\u0442\u044c\u044e, \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u044d\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0430\u044f \u043a\u043e\u043f\u0438\u044f Ethereum, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0440\u0430\u0437\u0433\u043e\u043d\u044f\u044e\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u043e\u043b\u044c\u0448\u043e\u0433\u043e \u043a\u0430\u043f\u0438\u0442\u0430\u043b\u0430 \u0431\u0435\u0437 \u043e\u0433\u043b\u044f\u0434\u043a\u0438, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 TON, \u0443 \u043c\u0435\u043d\u044f \u0435\u0441\u0442\u044c \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441\u043d\u044b\u0435 \u0443\u0440\u043e\u043a\u0438, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0432\u044b \u043d\u0430\u0443\u0447\u0438\u0442\u0435\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 TON.<\/p>\n<p><a href=\"https:\/\/github.com\/romanovichim\/TonFunClessons_ru\" rel=\"noopener noreferrer nofollow\">https:\/\/github.com\/romanovichim\/TonFunClessons_ru<\/a><\/p>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u044b \u0438 \u0434\u0430\u0442\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u044f \u043a\u0438\u0434\u0430\u044e \u0441\u044e\u0434\u0430: <a href=\"https:\/\/t.me\/ton_learn\" rel=\"noopener noreferrer nofollow\">https:\/\/t.me\/ton_learn<\/a><\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/799739\/\"> https:\/\/habr.com\/ru\/articles\/799739\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041b\u044e\u0431\u043e\u0439 \u043a\u0442\u043e \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043b \u043f\u043e\u043a\u0443\u043f\u043a\u0443 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0446\u0438\u0444\u0440\u043e\u0432\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0430\u043a\u0442\u0438\u0432\u043e\u0432. \u0411\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u044b \u043f\u043b\u043e\u0445\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438 &#8212; \u043d\u043e\u0434\u044b, \u043b\u0430\u0439\u0442\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043e\u0442\u0434\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c\u0443 \u0431\u043b\u043e\u043a\u0443 \u0441\u0435\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0442\u043e\u0440\u0430\u043c\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0438\u043b\u0438 API \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435.<\/p>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0434\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0431\u0438\u0440\u0436\u0438 \u0441\u0442\u0440\u0435\u043c\u044f\u0442\u0441\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u043f\u043b\u043e\u0449\u0430\u0434\u043a\u0430\u0445 \u043a\u0430\u043a coingecko \u043e\u043d\u0438 \u0441\u043e\u0437\u0434\u0430\u044e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 API, \u0447\u0430\u0441\u0442\u043e \u0434\u0435\u043b\u0430\u044f \u0438\u0445 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c\u0438. \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 API \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0435\u0439 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.<\/p>\n<p>\u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0441\u043e\u0431\u0435\u0440\u0435\u043c \u0434\u044d\u0448\u0431\u043e\u0440\u0434 \u0434\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 TON \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 DEX, \u043d\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b, \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u0438 \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u0432 \u0432 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0435 TON.<\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043c\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0431\u043e\u0440\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0438\u0441\u043a\u043b\u0435\u0439\u043c\u0435\u0440\u043e\u0432:<\/p>\n<ul>\n<li>\n<p>\u043a\u043e\u0434 \u0432 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u0438<\/p>\n<\/li>\n<li>\n<p>\u0436\u0435\u0442\u0442\u043e\u043d\u044b \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043d\u0430 TON<\/p>\n<\/li>\n<\/ul>\n<h3>\u0412\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/h3>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0443, \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u043c \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 API, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0430\u0442\u044b \u0438 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0430\u0442:<\/p>\n<pre><code class=\"python\">def now_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return datetime.datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%S')  def thirty_days_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=30)).strftime('%Y-%m-%dT%H:%M:%S')  def seven_days_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=7)).strftime('%Y-%m-%dT%H:%M:%S')  def day_utc():  \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0return (datetime.datetime.utcnow() - datetime.timedelta(days=1)).strftime('%Y-%m-%dT%H:%M:%S')  now_utc()<\/code><\/pre>\n<p>\u0412\u044b\u0437\u043e\u0432\u0435\u043c API GET <strong>https:\/\/api.ston.fi\/v1\/stats\/pool<\/strong><\/p>\n<pre><code class=\"python\">payload = {'since': day_utc(), 'until': now_utc()}  r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)  r.json()['stats'][0]<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0443\u043b\u0430:<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0420\u0430\u043d\u0434\u043e\u043c\u043d\u044b\u0439 \u043f\u0443\u043b &#8212; \u0432\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u0443\u044e \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e<\/p>\n<h3>\u0411\u0435\u0440\u0435\u043c \u043f\u043e\u043b\u044f<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u044d\u0448\u0431\u043e\u0440\u0434\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p>\u0418\u043c\u044f \u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u0436\u0435\u0442\u0442\u043e\u043d\u0430<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0416\u0435\u0442\u0442\u043e\u043d\u0430 \u0437\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434<\/p>\n<\/li>\n<li>\n<p>\u041e\u0431\u044a\u0435\u043c \u0432 TON<\/p>\n<\/li>\n<li>\n<p>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0443\u043b \u0434\u043b\u044f \u0441\u0432\u0430\u043f\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0435\u0440\u0435\u043c \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0448\u0435 API:<\/p>\n<pre><code class=\"python\">#\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u043d\u0430\u043c \u043f\u043e\u043b\u044f def take_pool_stats():   temp_arr=[]   payload = {'since': day_utc(), 'until': now_utc()}   # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume']}     temp_arr.append(temp_dict)    return temp_arr  take_pool_stats()<\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 json\u2019\u044b:<\/p>\n<pre><code>```  {'coin': 'Chow Chow',  \u00a0\u00a0'pair': 'CHOW\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQBtWFPgVknfzu6xaVcRBbNP3h_6UJ_xe29sVkiFTyPiv2bq&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '0.010646867',  \u00a0\u00a0'volume_ton': '0.000000000'},  \u00a0{'coin': 'Tonald Duck',  \u00a0\u00a0'pair': 'TDUCK\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQBUGgcu-h4SqMh5hrentq4vE59tBRRfrYE3H_0s6D_1Xzsa&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '0.000000363',  \u00a0\u00a0'volume_ton': '0.000000000'},  ```<\/code><\/pre>\n<p>\u041d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e &#8212; \u043f\u0443\u043b \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0435 \u0432\u0441\u0435 \u043e\u043d\u0438 \u0441\u0443\u043f\u0435\u0440 \u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u044b.<\/p>\n<h3>\u0428\u0430\u0433 \u043d\u0430\u0437\u0430\u0434<\/h3>\n<p>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0446\u0435\u043d\u044b \u0432 TON \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0446\u0435\u043d \u0432 \u0434\u043e\u043b\u043b\u0430\u0440\u0430\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 TON\/USD. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f tonapi.io \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438, \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0445 \u043b\u0438\u043c\u0438\u0442\u043e\u0432 \u0432\u043f\u043e\u043b\u043d\u0435 \u0445\u0432\u0430\u0442\u0438\u0442:<\/p>\n<pre><code class=\"python\">#take toncoin price  def take_ton_price():   resp = requests.get('https:\/\/tonapi.io\/v2\/rates?tokens=ton&amp;currencies=usd')   # Ex: {\"rates\":{\"TON\":{\"prices\":{\"USD\":2.1215},\"diff_24h\":{\"USD\":\"+0.85%\"},\"diff_7d\":{\"USD\":\"-6.04%\"},\"diff_30d\":{\"USD\":\"+2.75%\"}}}}   return resp.json()[\"rates\"][\"TON\"][\"prices\"][\"USD\"]   take_ton_price()<\/code><\/pre>\n<h3>\u0423\u0431\u0435\u0440\u0435\u043c \u043b\u0438\u0448\u043d\u0435\u0435<\/h3>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u0443\u0440\u0441 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0441\u0447\u0435\u0442\u0430 \u043e\u0431\u044a\u0435\u043c\u0430 \u0438 \u0446\u0435\u043d\u044b. \u041a\u0430\u043a \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0448\u0435 API \u043e\u0442\u0434\u0430\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 \u0432\u0441\u0435 \u043f\u0443\u043b\u044b, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0442\u0443\u0434\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u043d\u0435\u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0443\u043b\u044b \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043e\u0431\u044a\u0435\u043c \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e. \u0410 \u0442\u0430\u043a\u0436\u0435 \u043f\u0443\u043b\u044b \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0438 \u043d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0446\u0435\u043d\u0443 \u0438 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e TON \u0438\u043b\u0438 \u0434\u043e\u043b\u043b\u0430\u0440\u0430. \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>\u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b c TON<\/p>\n<\/li>\n<li>\n<p>\u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0446\u0435\u043d\u0430 \u0440\u0430\u0432\u043d\u0430 \u043d\u0443\u043b\u044e<\/p>\n<\/li>\n<li>\n<p>\u0443\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043b\u044b \u0433\u0434\u0435 \u043e\u0431\u044a\u0435\u043c \u0442\u043e\u0440\u0433\u043e\u0432\u043b\u0438 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434 \u043c\u0435\u043d\u044c\u0448\u0435 1000 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432<\/p>\n<\/li>\n<\/ul>\n<p>\u0418 \u0441\u0440\u0430\u0437\u0443 \u0436\u0435 \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043f\u043e \u043e\u0431\u044a\u0435\u043c\u0443:<\/p>\n<pre><code class=\"python\">def take_pool_stats():   temp_arr=[]   payload = {'since': day_utc(), 'until': now_utc()}   # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,2),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2)}     if(jetton['quote_symbol']=='TON' and int(float(jetton['last_price']) != 0) and int(float(jetton['quote_volume']) != 0) and int(temp_dict['volume_usd']) > 1000):       temp_arr.append(temp_dict)    return sorted(temp_arr, key=lambda d: d['volume_usd'],reverse=True)  # Coin - base_name # Pair - base_symbol\/quote_symbol url # Price - last_price * TON in USD price # 24 Volume - \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0447\u0435\u043a\u043d\u0443\u0442\u044c \u043f\u043e coingecko  take_pool_stats()<\/code><\/pre>\n<p>\u0423\u0432\u0438\u0434\u0438\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0438 json\u2019\u044b:<\/p>\n<pre><code class=\"json\">```  {'coin': 'STON',  \u00a0\u00a0'pair': 'STON\/TON',  \u00a0\u00a0'url': 'https:\/\/app.ston.fi\/swap?ft=EQA2kCVNwVsil2EM2mB0SkXytxCqQjS4mttjDpnXmwG9T6bO&amp;tt=EQCM3B12QK1e4yZSf8GtBRT0aLMNyEsBc_DhVfRRtOEffLez',  \u00a0\u00a0'price_ton': '2.220362684',  \u00a0\u00a0'volume_ton': '74651.187439449',  \u00a0\u00a0'price_usd': 5.89,  \u00a0\u00a0'volume_usd': 197926.43},  ```<\/code><\/pre>\n<h3>\u041f\u0440\u043e\u0446\u0435\u043d\u0442 \u043e\u0442 \u043e\u0431\u0449\u0435\u0433\u043e<\/h3>\n<p>\u041e\u0431\u044a\u0435\u043c \u0443\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0442 \u0432\u0441\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043c \u043d\u0430 \u0440\u044b\u043d\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043e\u0431\u044a\u0435\u043c\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u043d\u0442.(\u0412 \u043a\u043e\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u0447\u0442\u043e \u044f \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0430\u0436 10 \u0446\u0438\u0444\u0440 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u044f\u0442\u043e\u0439, \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u044d\u0442\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432 TON \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043b\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u0442\u0438\u0432\u0430 \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u043b\u044b, \u0432 \u0441\u0432\u044f\u0437\u0438 \u0441 \u0447\u0435\u043c \u043e\u0431\u044a\u0435\u043c\u044b \u0441\u0438\u043b\u044c\u043d\u043e \u201c\u0440\u0430\u0437\u043c\u044b\u043b\u043e\u201d. \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438, \u0445\u0432\u0430\u0442\u0438\u043b\u043e \u0431\u044b \u0438 4 \u0437\u043d\u0430\u043a\u043e\u0432)<\/p>\n<pre><code class=\"python\">def take_pool_stats(payload):   temp_arr=[]    # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()   # for volume percentage   all_volume = sum(float(item['quote_volume']) for item in resp)   print(all_volume)    for jetton in resp:     temp_dict = {'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,4),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2),\"volume_perc\": round((float(jetton['quote_volume'])\/all_volume)*100,10)}     if(jetton['quote_symbol']=='TON' and int(float(jetton['last_price']) != 0) and int(float(jetton['quote_volume']) != 0) and int(temp_dict['volume_usd']) > 1000):       temp_arr.append(temp_dict)    return sorted(temp_arr, key=lambda d: d['volume_usd'],reverse=True)   payload = {'since': day_utc(), 'until': now_utc()} take_pool_stats(payload)<\/code><\/pre>\n<p>\u041f\u043e\u043b\u043e\u0436\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0432 \u0434\u0430\u0442\u0430\u0444\u0440\u0435\u0439\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Pandas \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0433\u0438\u043f\u043e\u0442\u0435\u0437\u044b \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0436\u0435\u0442\u0442\u043e\u043d\u0430\u043c\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043d\u0435\u0439 \u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044f \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u0435\u0440\u0438\u043e\u0434\u044b. \u041d\u043e \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u043e\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0435\u0442\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e \u043f\u0443\u043b\u0430\u043c. \u0412\u0435\u0434\u044c \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0433\u043e\u043d\u044f\u0442\u044c \u043e\u0431\u044a\u0435\u043c \u0441 \u043f\u0430\u0440\u044b \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432, \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0440\u0430\u0437\u0433\u043e\u043d\u044f\u044f \u0442\u043e\u043a\u0435\u043d. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c.<\/p>\n<h3>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c<\/h3>\n<p>\u0412 API \u0441\u0442\u043e\u043d\u0444\u0430\u0439 \u0435\u0441\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0423\u0434\u043e\u0431\u043d\u043e, \u0442\u043e, \u0447\u0442\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u042d\u0442\u0438\u043c \u043c\u044b \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0430\u043f\u043e\u0432 \u043f\u043e \u043f\u0443\u043b\u0430\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441\u0440\u0435\u0434\u0438 \u044d\u0442\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0441\u0442\u0430\u043d\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430 \u043f\u0435\u0440\u0438\u043e\u0434:<\/p>\n<pre><code class=\"python\">def take_operations(payload):   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/operations', params=payload)   return r.json()[\"operations\"]  payload = {'since': day_utc(), 'until': now_utc()}    pool_oper_list = list(filter(lambda person: person['operation']['pool_address'] == 'EQB4whdcKBgsDHoG2j9RhTdMdghXAIyPqQzusLSUgMUNUseo', take_operations(payload)))  len(pool_oper_list)<\/code><\/pre>\n<p>\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0432 \u043f\u0443\u043b\u0430\u0445 \u0431\u044b\u0432\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435, \u0435\u0441\u0442\u044c \u0441\u0432\u0430\u043f\u044b, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u044e\u0442 \u0436\u0435\u0442\u0442\u043e\u043d\u044b \u0438 TON, \u0435\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043b\u0438\u043a\u0432\u0438\u0434\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0443\u043b\u044b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0431\u0438\u0440\u0436\u0438 \u043a \u0431\u0438\u0440\u0436\u0435. \u0414\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0432\u0430\u043f\u044b.<\/p>\n<p>\u0421\u043e\u0431\u0435\u0440\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043f\u0443\u043b\u0430 \u0432\u0435\u0440\u043d\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0432\u0430\u043f\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043e\u0448\u0435\u043b\u044c\u043a\u043e\u0432 \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0432\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0432\u0430\u043f\u044b.<\/p>\n<pre><code class=\"python\">def count_pool_operations(operations,addr_str):     pool_oper_list = list(filter(lambda person: person['operation']['pool_address'] == addr_str, operations))     unique_counts = collections.Counter(e['operation']['destination_wallet_address'] for e in pool_oper_list )     return len(pool_oper_list),len(set(unique_counts))<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0432 \u0434\u044d\u0448\u0431\u043e\u0440\u0434:<\/p>\n<pre><code class=\"python\">def take_pool_stats(payload):   temp_arr=[]    # stonfi pools stats   r = requests.get('https:\/\/api.ston.fi\/v1\/stats\/pool', params=payload)   resp = r.json()['stats']   # ton_usd   ton_usd = take_ton_price()   # for volume percentage   all_volume = sum(float(item['quote_volume']) for item in resp)   # take operations   payload['op_type'] = 'Swap'   operations = take_operations(payload)   for jetton in resp:     temp_dict = {'pool_address': jetton['pool_address'],'coin': jetton['base_name'],'pair': jetton['base_symbol']+'\/'+jetton['quote_symbol'],'url': jetton['url'],'price_ton': jetton['last_price'],'volume_ton': jetton['quote_volume'], 'price_usd': round(float(jetton['last_price'])*ton_usd,4),'volume_usd': round(float(jetton['quote_volume'])*ton_usd,2),\"volume_perc\":<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-370605","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/370605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370605"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/370605\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}