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
The Easy-to-use Dialogue Response Selection Toolkit for Researchers

Easy-to-use toolkit for retrieval-based Chatbot Our released data can be found at this link. Make sure the following steps are adopted to use our code

GMFTBY 32 Nov 13, 2022
Heroku app to explore boardgame data

A Dashboard for the Board Game Geeks among us Link to Application As many Board Game Geeks like myself track the scores of board game matches I decide

Maarten Grootendorst 20 Nov 23, 2022
Neko is An Anime themed advance Telegram group management bot.

NekoRobot A modular telegram Python bot running on python3 with an sqlalchemy, mongodb database. ╒═══「 Status 」 Maintained Support Group Included Free

Lovely Prince 11 Oct 11, 2022
Python Wrapper for aztro - The Astrology API | Get Daily Horoscope 💫

PyAztro PyAztro is a client library for aztro written in Python. aztro provides horoscope info for sun signs such as Lucky Number, Lucky Color, Mood,

Sameer Kumar 30 Jan 08, 2023
A unified API wrapper for YouTube and Twitch chat bots.

Chatto A unified API wrapper for YouTube and Twitch chat bots. Contributing Chatto is open to contributions. To find out where to get started, have a

Ethan Henderson 5 Aug 01, 2022
a Disqus alternative

Isso – a commenting server similar to Disqus Isso – Ich schrei sonst – is a lightweight commenting server written in Python and JavaScript. It aims to

Martin Zimmermann 4.7k Jan 02, 2023
Create a Neo4J graph of users and roles trust policies within an AWS Organization.

AWS_ORG_MAPPER This tool uses sso-oidc to authenticate to the AWS organization. Once authenticated the tool will attempt to enumerate all users and ro

Ruse 24 Jul 28, 2022
Python API for British Geological Survey magnetic field calculator

Magnetic field calculator Python API for British Geological Survey magnetic field calculator. Description This project magnetic field calculator. It u

Filip Š 3 Mar 11, 2022
Portal Backend for Yuta management

Portal Backend for Yuta management Prerequisites Python 3.10 or above. pip, pdm installed. Quickstart Install the required packages: pdm install Runn

Loc Mai 1 Dec 20, 2021
Create Multiple CF entry for multiple websites

AWS-CloudFront Problem: Deploy multiple CloudFront for account with multiple domains. Functionality: Running this script in loop and deploy CloudFront

Giten Mitra 5 Nov 18, 2022
A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

A GUI Application that creates a Spotify Playlist from any year in the past, by just entering your preferred date

David .K. Danso 1 Jan 17, 2022
A python package for AxisVM

PyAxisVM The package is under development. Follow us on social media, where we'll announce the first release! Overview The PyAxisVM project offers a h

AxisVM - InterCAD 8 Nov 19, 2022
Discord Bot for Genshin Impact Wish Simulating

Genshin Inpact Wish Simulation Discord Bot Bot Links Invite Reddit Official Discord Features Discord embed reaction menu for wishes Simple code scalin

Jeffrey Shum 2 Jan 04, 2023
Telegram vc - A bot that can play music on telegram group's voice call

Telegram Voice Chat Bot A bot that can play music on telegram group's voice call

1 Jan 02, 2022
Clash of Clans developer unofficial api Wrapper to generate ip based token

Clash of Clans developer unofficial api Wrapper to generate ip based token

Aryan Vikash 6 Apr 01, 2022
Jira-cache - Jira cache with python

Direct queries to Jira have two issues: they are sloooooow many queries are impo

John Scott 6 Oct 08, 2022
An almost dependency-less, synchronous Discord gateway library meant for my personal use

An almost dependency-less, synchronous Discord gateway library meant for my personal use.

h0nda 4 Feb 05, 2022
VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers near them.

Introduction VaccineAlarm is a simple python script that allows user to get notified when their desired vaccine doses are available at vaccine centers

Ankit Tripathi 5 Nov 26, 2021
A telegram bot to download mega.nz links. (made with pyrogram).

Mega Link Downloader Bot This is a telegram bot to download mega.nz links and return them as files/videos - Made by a 100% noob! (When I mean noob I r

171 Dec 27, 2022
Stinky ID - A stable pluggable Telegram userbot + Voice & Video Call music bot, based on Telethon

Ultroid - UserBot A stable pluggable Telegram userbot + Voice & Video Call music

Riyan.rz 1 Jan 03, 2022