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在持续使用和优化中。使用中文编写,助力海内外华人割到全世界的韭菜

Owner
luv_dusk
luv_dusk
Transcript-Extractor-Bot - Yet another Telegram Voice Recognition bot but using vosk and supports 20+ languages

transcript extractor Yet another Telegram Voice Recognition bot but using vosk a

6 Oct 21, 2022
A Simple Telegram Bot that can Download Files From Mega.nz and Upload It to Telegram

MegaDL-Bot A Simple Telegram Bot By @mrkpbots to Download Files From Mega.nz and Upload It to Telegram Features No Login Required All Mega.nz File Lin

MRKP BOTS 5 Feb 20, 2022
Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon.

Stork (pleroma-bot) Mirror one or multiple Twitter accounts in Pleroma/Mastodon. Introduction After using the pretty cool mastodon-bot for a while, I

73 Jan 08, 2023
Herramienta para transferir eventos de Sucuri WAF hacia Azure Data Tables.

Transfiere eventos de Sucuri hacia Azure Data Tables Script para transferir eventos del Sucuri Web Application Firewall (WAF) hacia Azure Data Tables,

CSIRT-RD 1 Dec 22, 2021
A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram

MegaDL-Bot A Simple Telegram Bot By @AsmSafone to Download Files From Mega.nz and Upload It to Telegram Features No Login Required All Mega.nz File Li

SAF ONE 92 Dec 02, 2022
WeChat SDK for Python

___ __ _______ ________ ___ ___ ________ _________ ________ ___ ___ |\ \ |\ \|\ ___ \ |\ ____\|\ \|\ \|\ __ \|\___

wechatpy 3.3k Dec 26, 2022
Signs API calls to SberCloud.Advanced with AK/SK

sbercloud-api-aksk Signs API calls to SberCloud.Advanced with AK/SK This script is a courtesy of @sadpdtchr Description Sometimes there is a need to m

Peter Predtechensky 1 Nov 30, 2021
Wallpaper API from wallpaperscraft.com

wallpaper-api Wallpaper API from https://wallpaperscraft.com for API documentation see https://maajid-wallpaper-api.deta.dev/docs How to Run first, cl

Athallah Muhammad Maajid 2 Apr 06, 2022
Python3 program to control Elgato Ring Light on your local network without Elgato's Control Center software

Elgato Light Controller I'm really happy with my Elgato Key Light from an illumination perspective. However, their control software has been glitchy f

Jeff Tarr 14 Nov 16, 2022
EzilaX Music ❤ is the best and only Telegram VC player with playlists, Multi Playback, Channel play and more POWERD By SDBOTs

EzilaX-Music 🎵 A bot that can play music on Telegram Group and Channel Voice Chats Available on telegram as @EzilaXMBot Features 🔥 Thumbnail Support

Sadew Jayasekara 9 Oct 24, 2021
⭐️ Pyro String Generator ⭐️ Genrate String Session Using this bot.Made by TeamUltronX 🔥

⭐️ Pyro String Generator ⭐️ Genrate String Session Using this bot.Made by TeamUltronX 🔥 Configs: API_HASH Get from Here. API_ID Get from Here. API_KE

TheUltronX 2 Dec 16, 2022
A client that allows a user, specifiy their discord token, to send images remotely to discord

ImageBot_for_Discord A client that allows a user, specifiy their discord token, to send images remotely to discord. Can select images using a file dia

0 Aug 24, 2022
Source code of BobuxAdmin bot from Bobux Bot Development server.

BobuxAdmin Source code of BobuxAdmin bot from Bobux Bot Development server. The bot is written with usage of disnake and SQLite database. Functionalit

Bobux Bot Developers 3 Dec 29, 2022
simple discord token grabber with webhook hiding feature.

Token Grabber A simple Discord token grabber with base64 webhook encoding, it uses pastebin as a database to get webhook, so next time u dont get your

0 Dec 01, 2021
A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studying.

Studying RPC Description A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studyin

John Edmerson Pizarra 4 Nov 19, 2022
Boto3 code assistance for any API in any IDE, always up to date

botostubs Gives you code assistance for any boto3 API in any IDE. Get started by running pip install botostubs Demo Features PyPI package automaticall

Jeshan Giovanni BABOOA 94 Nov 14, 2022
Google Sheets Python API

Google Spreadsheets Python API v4 Simple interface for working with Google Sheets. Features: Open a spreadsheet by title, key or url. Read, write, and

Anton Burnashev 6.2k Dec 30, 2022
A bot written in Python to automate attending classes on MyClass (Codetantra).

codetantrabot This is python program to attend class on myclass(codetantra) Prerequisites You should have Python3 and Pip installed on your system Run

Aniket Kumar 1 Feb 08, 2022
Track to Detect and Segment: An Online Multi-Object Tracker (CVPR 2021)

Track to Detect and Segment: An Online Multi-Object Tracker (CVPR 2021) Track to Detect and Segment: An Online Multi-Object Tracker Jialian Wu, Jiale

Jialian Wu 520 Dec 31, 2022