Coin-based opinion monitoring system

Overview

介绍

本仓库提供了基于币安 (Binance) 的二级市场舆情系统,可以根据自己的需求修改代码,设定各类告警提示

代码结构

  • binance.py - 与币安API交互
  • data_loader.py - 数据相关的读写
  • monitor.py - 监控的核心方法实现
  • analyze.py - 基于历史数据进行数据分析
  • utils.py - 通用函数
  • alarm.mp3 - 监控提示音,可以使用同名的其他mp3文件代替

使用说明

下载本仓库:

git clone https://github.com/geyingli/binance-monitor.git
cd binance-monitor

前往币安官网注册账号,在API管理页面获取API Key和Secret Key,在本目录下新建 api.conf 文件并按如下格式填写 (json规范):

{
    "API Key": "XXX",
    "Secret Key": "XXX"
}

通过 python3 monitor.py 指令运行监控程序。稍等历史价量数据下载完成后,可以看到类似于以下的打印信息:

开始执行价量监控...
2021年11月2日 15:52:00 >>> MBOXUSDT, $4.53, 交易量突增 ($51万)
2021年11月2日 15:57:00 >>> DENTUSDT, $0.00743, 交易量突增 ($100万)
2021年11月2日 15:59:00 >>> ZECUSDT, $177, 交易量突增 ($45万)
2021年11月2日 16:09:00 >>> AUDIOUSDT, $2.74, 交易量突增 ($56万)
2021年11月2日 16:15:00 >>> DENTUSDT, $0.00745, 交易量突增 ($84万)
2021年11月2日 16:30:00 >>> ENJUSDT, $2.96, 交易量突增 ($189万)
2021年11月2日 16:31:00 >>> AUDIOUSDT, $2.8, 交易量突增 ($91万)
2021年11月2日 16:36:00 >>> ATAUSDT, $1.164, 交易量突增 ($21万)
2021年11月2日 16:37:00 >>> LRCUSDT, $1.020, 交易量突增 ($156万)
2021年11月2日 16:38:00 >>> DGBUSDT, $0.0582, 交易量突增 ($42万)
2021年11月2日 16:41:00 >>> TLMUSDT, $0.28, 5分钟内价格上涨5%
2021年11月2日 16:49:00 >>> LRCUSDT, $1.053, 交易量突增 ($184万)

数据分析

分享一些我们在数据分析上获取的有意思的观察

价格变动 (以天为周期)

我们取了头部的几十个币种,按每分钟价格涨跌百分比绘制了如下图形。可以看出,北京时间14~19点价格走势普遍偏弱 (因为这个时间美国人在睡觉?),而晚上23点和早上5点则是涨幅分布更密集的时间

price_change_by_day

价格变动 (以周为周期)

同样,我们从周一到周天的粒度对涨幅进行统计,可以看出,周五是上涨最多见的一天,跌幅第一则以周日最为显著

price_change_by_weekday

交易量变动 (以天为周期)

下午15点开始到凌晨1点是交易量最高的一段时间

volume_by_day

交易量变动 (以周为周期)

从周一到周日的视角,周六和周日的交易量最低,而周三的平均交易量最高

volume_by_weekday

尾言

本repo在持续使用和优化中。使用中文编写,助力海内外华人割到全世界的韭菜

You might also like...
Python client and API for monitoring and controling energy diversion devices from MyEnergi

Python client and API for monitoring and controling energy diversion devices from MyEnergi A set of library functions and objects for interfacing with

Monitoring plugin for MikroTik devices

check_routeros - Monitoring MikroTik devices This is a monitoring plugin for Icinga, Nagios and other compatible monitoring solutions to check MikroTi

Demonstrating attacks, mitigations, and monitoring on AWS

About Inspectaroo is a web app which allows users to upload images to view metadata. It is designed to show off many AWS services including EC2, Lambd

IDCARD-VERIFYING-SYSTEM - The Student-Management-System-in-Python - Student Management System in Python
Student-Management-System-in-Python - Student Management System in Python

Student-Management-System-in-Python Student Management System in Python

A Python interface module to the SAS System. It works with Linux, Windows, and mainframe SAS. It supports the sas_kernel project (a Jupyter Notebook kernel for SAS) or can be used on its own.

A Python interface to MVA SAS Overview This module creates a bridge between Python and SAS 9.4. This module enables a Python developer, familiar with

The algorithm performs a simple user registration (Name, CPF, E-mail and Telephone) in an Amazon RDS database and also performs the storage, training and facial recognition of the user's face to identify the users already registered in the system in a next time the user is seen. This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners and alerts system.
This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners and alerts system.

Python Trading Bot w/ Thinkorswim Description This program is an automated trading bot that uses TDAmeritrades Thinkorswim trading platform's scanners

ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord.

ImaginaryTicketing ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord. Be sure to checkout ImaginaryCTF. See docs

Owner
luv_dusk
luv_dusk
Snipe fair coin launches. Contact @dannsniper on telegram for whitelist

Pancakeswap-sniper Pancakeswap Sniper bot Full version of Pancakeswap sniping bot used to snipe during fair coin launches. With advanced options and a

null 36 Nov 1, 2021
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
A new coin listing alert bot using Python, Flask, MongoDB, Telegram API and Binance API

Bzzmans New Coin Listing Detection Bot Architecture About Project Work in progress. This bot basically gets new coin listings from Binance using Binan

Eyüp Barlas 21 May 31, 2022
Telegram bot that let's you flip a coin in a dialog

coin_flip Telegram bot that let's you flip a coin in a dialog Report issue · Request feature About Software development tool that lets you finally dec

Ivan Akostelov 2 Dec 12, 2021
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 16 Sep 24, 2022
Discord bots that update their status to the price of any coin listed on x.vite.net

Discord bots that update their status to the price of any coin listed on x.vite.net

5am 3 Nov 27, 2022
Automate coin farming for dankmemer. Unlimited accounts at once. Uses a proxy

dankmemer-farm Simple script to farm Dankmemer coins with multiple accounts at once. Requires: Proxies, Discord Tokens Disclaimer I don't take respons

Scobra 12 Dec 20, 2022
Display relevant information for the amazing Banano coin.

Display relevant information for the amazing Banano coin. It'll also show your current Folding@Home stats (because you're likely folding for Bananos!)

Ron Talman 4 Aug 14, 2022
Slack bot for monitoring your Metaflow flows!

Metaflowbot - Slack Bot for your Metaflow flows! Metaflowbot makes it fun and easy to monitor your Metaflow runs, past and present. Imagine starting a

Outerbounds 21 Dec 7, 2022
Temperature Monitoring and Prediction Using a Modified Lambda Architecture

Temperature Monitoring and Prediction Using a Modified Lambda Architecture A more detailed write up can be seen in this paper. Original Lambda Archite

Parsa Yousefi 2 Jun 27, 2022