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
Turns any script into a telegram bot

pytobot Turns any script into a telegram bot Install pip install --upgrade pytobot Usage Script: while True: message = input() if message == "

Dmitry Kotov 17 Jan 06, 2023
PyLyrics Is An [Open-Source] Bot That Can Help You Get Song Lyrics

PyLyrics-Bot Telegram Bot To Search Song Lyrics From Genuis. 🤖 Demo: 👨‍💻 Deploy: ❤ Deploy Your Own Bot : Star 🌟 Fork 🍴 & Deploy -Easy Way -Self-h

DAMIEN 12 Nov 12, 2022
Ig-Crackv2 - Crack Instagram Version 2.9

★★ Information ★★ ★★Menu Special Crack Melalui Pengikut Crack Melalui Mengikuti

Risky [ Zero Tow ] 11 Aug 30, 2022
ToqueIO Nuke tools - A collection of tools designed to assist in enhancing your workflows within nuke

ToqueIO Nuke tools - A collection of tools designed to assist in enhancing your workflows within nuke

4 Feb 19, 2022
Automatically searching for vaccine appointments

Vaccine Appointments Automatically searching for vaccine appointments Usage To copy this package, run: git clone https://github.com/TheIronicCurtain/v

58 Apr 13, 2021
Simulación con el método de Montecarlo para verificar ganancias con márgenes negativos.

Apliación del método Monte Carlo a un ejemplo que incluye márgenes negativos. Por Marco A. de la Cruz Importante La información contenida en este ejem

1 Jan 17, 2022
The accompanying code for the paper "GMAT: Global Memory Augmentation for Transformers" (Ankit Gupta and Jonathan Berant).

GMAT: Global Memory Augmentation for Transformers This repository contains the accompanying code for the paper: "GMAT: Global Memory Augmentation for

Ankit Gupta 7 Oct 21, 2021
Smilecreator4 - This site is for people who want to hack or want to learn it!

smilecreator4 This site is for people who want to hack or want to learn it! Furthermore, this program does not work without turning off Antivirus or W

1 Jan 04, 2022
Maintained Fork of Jishaku For nextcord

Onami a debugging and utility extension for nextcord bots Read the documentation online. Fork Onami is a actively maintained fork of Jishaku for nextc

RPS 11 Dec 14, 2022
Get random jokes bapack2 on telegram

Jokes Bapack2 Telegram Bot Get random jokes bapack2 from jokes-bapack2-api on telegram bot Screenshot Requirements python pip pipenv python-telegram-b

Miftah Afina 2 Nov 17, 2021
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.

MonkeyLearn API for Python Official Python client for the MonkeyLearn API. Build and run machine learning models for language processing from your Pyt

MonkeyLearn 157 Nov 22, 2022
SC4.0 - BEST EXPERIENCE · HEX EDITOR · Discord Nuker · Plugin Adder · Cheat Engine

smilecreator4 This site is for people who want to hack or want to learn it! Furthermore, this program does not work without turning off Antivirus or W

1 Jan 04, 2022
A Slash Commands Discord Bot created using Pycord!

Hey, I am Slash Bot. A Bot which works with Slash Commands! Prerequisites Python 3+ Check out. the requirements.txt and install all the pakages. Insta

Saumya Patel 18 Nov 15, 2022
Framework for creating and running trading strategies. Blatantly stolen copy of qtpylib to make it work for Indian markets.

_• Kinetick Trade Bot Kinetick is a framework for creating and running trading strategies without worrying about integration with broker and data str

Vinay 41 Dec 31, 2022
Um simples bot público para todos usarem no discord!

Discord Bot - Código Público Características: Linguagem de Programação: Python Quantidade de comandos: 17 Comandos: Prefixo do bot: O prefixo desse bo

Kevin 3 Dec 31, 2021
A Discord bot that may save your day by predicting it.

Sage A Discord bot that may save your day by predicting it.

1 Nov 17, 2022
Interact and easily use Google Chat room webhooks.

Chat Webhooks Easily interact and send messages with Google Chat's webhooks feature. This API is small, but should be a nice framework for working wit

BD103 2 Dec 13, 2021
PyHoroscope - Observational Indian lunisolar calendar, horoscope and matching using the Swiss ephemeris

PyHoroscope Observational Indian lunisolar calendar, horoscope and matching usin

4 Jun 05, 2022
Hasan Can Kaya - Konusanlar Ticket Notifier

Hasan Can Kaya - Konusanlar Ticket Notifier This script sends a notification to any telegram chat/group/channel when added a new available ticket to b

omer citak 3 Jan 31, 2022
Home Assistant for Opendata CWB. Get the weather forecast of the city in Taiwan.

Home assistant support for Opendata CWB. The readme in Traditional Chinese. This integration is based on OpenWeatherMap (@csparpa, pyowm) to develop.

11 Sep 30, 2022