虚拟货币(BTC、ETH)炒币量化系统项目。在一版本的基础上加入了趋势判断

Overview

🎉 第二版本 🎉 (现货趋势网格)


介绍

在第一版本的基础上

趋势判断,不在固定点位开单,选择更优的开仓点位

优势: 🎉

  1. 简单易上手
  2. 安全(不用将api_secret告诉他人)

如何启动

  1. 修改app目录下的authorization文件
api_key='你的key'
api_secret='你的secret'

dingding_token = '申请钉钉群助手的token'   # 强烈建议您使用 (若不会申请,请加我个人微信)

如果你还没有币安账号: 注册页面交易返佣40%(系统返佣20%,id私发给我,微信每周返佣20%,长期有效)

免翻墙地址

申请api_key地址: 币安API管理页面

  1. 修改data/data.json配置文件 根据
{
    "runBet": {
        "next_buy_price": 350,      <- 下次开仓价   (你下一仓位买入价)
      
        "grid_sell_price": 375      <- 当前止盈价  (你的当前仓位卖出价)
        "step":0                    <- 当前仓位  (0:仓位为空)
    },
    "config": {
        "profit_ratio": 5,         <- 止盈比率      (卖出价调整比率。如:设置为5,当前买入价为100,那么下次卖出价为105)
        "double_throw_ratio": 5,   <- 补仓比率      (买入价调整比率。如:设置为5,当前买入价为100,那么下次买入价为95)
        "cointype": "ETHUSDT",     <- 交易对        (你要进行交易的交易对,请参考币安现货。如:BTC 填入 BTC/USDT)
        "quantity": [1,2,3]        <- 交易数量       (第一手买入1,第二手买入2...超过第三手以后的仓位均按照最后一位数量(3)买入)
        
    }
}

  1. 安装依赖包 ''' pip install requests json '''
  2. 运行主文件
# python eth-run.py 这是带有钉钉通知的主文件(推荐使用钉钉模式启动👍)

注意事项(一定要看)

  • 由于交易所的api在大陆无法访问(如果没有条件,可以使用api.binance.cc)
    • 您需要选择修改binanceAPI.py文件
# 修改为cc域名
class BinanceAPI(object):
    BASE_URL = "https://www.binance.cc/api/v1"
    FUTURE_URL = "https://fapi.binance.cc"
    BASE_URL_V3 = "https://api.binance.cc/api/v3"
    PUBLIC_URL = "https://www.binance.cc/exchange/public/product"
  • 如果您使用的交易所为币安,那么请保证账户里有足够的bnb

    • 手续费足够低
    • 确保购买的币种完整(如果没有bnb,比如购买1个eth,其中你只会得到0.999。其中0.001作为手续费支付了)
  • 第一版本现货账户保证有足够的U

  • 由于补仓比率是动态的,目前默认最小为5%。如果您认为过大,建议您修改文件夹data下的RunbetData.py文件

    def set_ratio(self,symbol):
        '''修改补仓止盈比率'''
        data_json = self._get_json_data()
        ratio_24hr = binan.get_ticker_24hour(symbol) #
        index = abs(ratio_24hr)

        if abs(ratio_24hr) >  **6** : # 今日24小时波动比率
            if ratio_24hr > 0 : # 单边上涨,补仓比率不变
                data_json['config']['profit_ratio'] =  **7** + self.get_step()/4  #
                data_json['config']['double_throw_ratio'] = **5**
            else: # 单边下跌
                data_json['config']['double_throw_ratio'] =  **7** + self.get_step()/4
                data_json['config']['profit_ratio'] =  **5**

        else: # 系数内震荡行情

            data_json['config']['double_throw_ratio'] = **5** + self.get_step() / 4
            data_json['config']['profit_ratio'] = **5** + self.get_step() / 4
        self._modify_json_data(data_json)

钉钉预警

如果您想使用钉钉通知,那么你需要创建一个钉钉群,然后加入自定义机器人。最后将机器人的token粘贴到authorization文件中的dingding_token 关键词输入:报警

钉钉通知交易截图

钉钉交易信息

25日实战收益

收益图

私人微信:欢迎志同道合的朋友一同探讨,一起进步。

交流群 wechat-QRcode 币圈快讯爬取群 wx号:findpanpan 麻烦备注来自github

钉钉设置教程

钉钉设置教程

免责申明

本项目不构成投资建议,投资者应独立决策并自行承担风险 币圈有风险,入圈须谨慎。

?? 风险提示:防范以“虚拟货币”“区块链”名义进行非法集资的风险。

Owner
幸福村的码农
努力中...
幸福村的码农
MasTrade is a trading bot in baselines3,pytorch,gym

mastrade MasTrade is a trading bot in baselines3,pytorch,gym idea we have for example 1 btc and we buy a crypto with it with market option to trade in

Masoud Azizi 18 May 24, 2022
AtsPy: Automated Time Series Models in Python (by @firmai)

Automated Time Series Models in Python (AtsPy) SSRN Report Easily develop state of the art time series models to forecast univariate data series. Simp

Derek Snow 465 Jan 02, 2023
Time series changepoint detection

changepy Changepoint detection in time series in pure python Install pip install changepy Examples from changepy import pelt from cha

Rui Gil 92 Nov 08, 2022
🌊 River is a Python library for online machine learning.

River is a Python library for online machine learning. It is the result of a merger between creme and scikit-multiflow. River's ambition is to be the go-to library for doing machine learning on strea

OnlineML 4k Jan 03, 2023
Automated machine learning: Review of the state-of-the-art and opportunities for healthcare

Automated machine learning: Review of the state-of-the-art and opportunities for healthcare

42 Dec 23, 2022
MICOM is a Python package for metabolic modeling of microbial communities

Welcome MICOM is a Python package for metabolic modeling of microbial communities currently developed in the Gibbons Lab at the Institute for Systems

57 Dec 21, 2022
50% faster, 50% less RAM Machine Learning. Numba rewritten Sklearn. SVD, NNMF, PCA, LinearReg, RidgeReg, Randomized, Truncated SVD/PCA, CSR Matrices all 50+% faster

[Due to the time taken @ uni, work + hell breaking loose in my life, since things have calmed down a bit, will continue commiting!!!] [By the way, I'm

Daniel Han-Chen 1.4k Jan 01, 2023
Python package for machine learning for healthcare using a OMOP common data model

This library was developed in order to facilitate rapid prototyping in Python of predictive machine-learning models using longitudinal medical data from an OMOP CDM-standard database.

Sontag Lab 75 Jan 03, 2023
(3D): LeGO-LOAM, LIO-SAM, and LVI-SAM installation and application

SLAM-application: installation and test (3D): LeGO-LOAM, LIO-SAM, and LVI-SAM Tested on Quadruped robot in Gazebo ● Results: video, video2 Requirement

EungChang-Mason-Lee 203 Dec 26, 2022
机器学习检测webshell

ai-webshell-detect 机器学习检测webshell,利用textcnn+简单二分类网络,基于keras,花了七天 检测原理: 从文件熵 文件长度 文件语句提取出特征,然后文件熵与长度送入二分类网络,文件语句送入textcnn 项目原理,介绍,怎么做出来的

Huoji's 56 Dec 14, 2022
Credit Card Fraud Detection, used the credit card fraud dataset from Kaggle

Credit Card Fraud Detection, used the credit card fraud dataset from Kaggle

Sean Zahller 1 Feb 04, 2022
YouTube Spam Detection with python

YouTube Spam Detection This code deletes spam comment on youtube videos based on two characteristics (currently) If the author of the comment has a se

MohamadReza Taalebi 5 Sep 27, 2022
Avocado hass time series vs predict price

AVOCADO HASS TIME SERIES VÀ PREDICT PRICE Trước khi vào Heroku muốn giao diện đẹp mọi người chuyển giúp mình theo hình bên dưới https://avocado-hass.h

hieulmsc 3 Dec 18, 2021
A data preprocessing and feature engineering script for a machine learning pipeline is prepared.

FEATURE ENGINEERING Business Problem: A data preprocessing and feature engineering script for a machine learning pipeline needs to be prepared. It is

Pinar Oner 7 Dec 18, 2021
Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.

Horovod Horovod is a distributed deep learning training framework for TensorFlow, Keras, PyTorch, and Apache MXNet. The goal of Horovod is to make dis

Horovod 12.9k Jan 07, 2023
Regularization and Feature Selection in Least Squares Temporal Difference Learning

Regularization and Feature Selection in Least Squares Temporal Difference Learning Description This is Python implementations of Least Angle Regressio

Mina Parham 0 Jan 18, 2022
InfiniteBoost: building infinite ensembles with gradient descent

InfiniteBoost Code for a paper InfiniteBoost: building infinite ensembles with gradient descent (arXiv:1706.01109). A. Rogozhnikov, T. Likhomanenko De

Alex Rogozhnikov 183 Jan 03, 2023
A pure-python implementation of the UpSet suite of visualisation methods by Lex, Gehlenborg et al.

pyUpSet A pure-python implementation of the UpSet suite of visualisation methods by Lex, Gehlenborg et al. Contents Purpose How to install How it work

288 Jan 04, 2023
ml4h is a toolkit for machine learning on clinical data of all kinds including genetics, labs, imaging, clinical notes, and more

ml4h is a toolkit for machine learning on clinical data of all kinds including genetics, labs, imaging, clinical notes, and more

Broad Institute 65 Dec 20, 2022
Required for a machine learning pipeline data preprocessing and variable engineering script needs to be prepared

Feature-Engineering Required for a machine learning pipeline data preprocessing and variable engineering script needs to be prepared. When the dataset

kemalgunay 5 Apr 21, 2022