虚拟货币(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

钉钉设置教程

钉钉设置教程

免责申明

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

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

You might also like...
A program will generate a eth key pair that has the public key that starts with a defined amount of 0

ETHAdressGenerator This short program will generate a eth key pair that has the public key that starts with a defined amount of 0 Requirements Python

Eth brownie struct encoding example

eth-brownie struct encoding example Overview This repository contains an example of encoding a struct, so that it can be used in a function call, usin

Most Simple & Powefull web3 Trade Bot (WINDOWS LINUX) Suport BSC ETH
Most Simple & Powefull web3 Trade Bot (WINDOWS LINUX) Suport BSC ETH

Most Simple & Powefull Trade Bot (WINDOWS LINUX) What Are Some Pros And Cons Of Owning A Sniper Bot? While having a sniper bot is typically an advanta

Microllect - Fully automated btc wallet hack,using advanced protocols
Microllect - Fully automated btc wallet hack,using advanced protocols

Microllect - Fully automated btc wallet hack,using advanced protocols

A simple program written in python to convert: USD, EUR & BTC to BRL
A simple program written in python to convert: USD, EUR & BTC to BRL

CoinsPrice This is a simple program written in python to convert: USD EUR BTC to BRL, and I used an API to get coins price. Take a look at the window

Comments
  • 逻辑错误

    逻辑错误

        '''修改补仓止盈比率'''
        data_json = self._get_json_data()
        ratio_24hr = binan.get_ticker_24hour(symbol) #
        index = abs(ratio_24hr)
    
        if abs(ratio_24hr) >  8 : # 这是单边走势情况 只改变一方的比率
            if ratio_24hr > 0 : # 单边上涨,补仓比率不变
    

    你好,作者,请问ratio_24hr返回的是什么数据结构,应该不是dict吧,abs会报错的,怎么能大于8,这个逻辑有问题吧,大于8就是单边行情吗?

    opened by shenchaonb 1
Owner
幸福村的码农
努力中...
幸福村的码农
提供火币网交易接口API最简封装,提供现货买入、卖出、huobi币安查询账户余额等接口,数字货币,虚拟货币,BTC量化交易框架,自动交易,轻量便携,不用安装,即开即用

火币网交易接口的最简封装(只管用,不用再关注细节) 提供火币网交易接口的python封装,提供买入、卖出、查询账户余额等接口 接口说明 order_value() 进行买入操作,参数为买入的币和买入的金额 买入返回的详情数据: {'单号': '272229546125038', '成交数量': 0.

dev 95 Sep 24, 2021
governance proposal to make fei redeemable for eth

Feil Proposal ?? Abstract Migrate all ETH from Fei protocol-controlled value into Yearn ETH Vault. Allow redemptions of outstanding FEI for yvETH. At

null 13 Mar 31, 2022
Official implementation of ETH-XGaze dataset baseline

ETH-XGaze baseline Official implementation of ETH-XGaze dataset baseline. ETH-XGaze dataset ETH-XGaze dataset is a gaze estimation dataset consisting

Xucong Zhang 134 Jan 3, 2023
a BTC mining program based on python3

BTC-Miner a BTC mining program based on python3 Our project refers to the nightminer project by ricmoo, which is written in Python2 (https://github.co

null 6 Jul 31, 2022
Python script to replace BTC adresses in the clipboard with similar looking ones, whose private key can be retrieved by a netcat listener or similar.

BTCStealer Python script to replace BTC adresses in the clipboard with similar looking ones, whose private key can be retrieved by a netcat listener o

Some Person 6 Jun 7, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
A collection of scripts to steal BTC from Lightning Network enabled custodial services. Only for educational purpose! Share your findings only when design flaws are fixed.

Lightning Network Fee Siphoning Attack LN-fee-siphoning is a collection of scripts to subtract BTC from Lightning Network enabled custodial services b

Reckless_Satoshi 14 Oct 15, 2022
Que es S4K Builder?, Fácil un constructor de tokens grabbers con muchas opciones, como BTC Miner, Clipper, shutdown PC, Y más! Disfrute el proyecto. <3

S4K Builder Este script Python 3 de código abierto es un constructor del muy popular registrador de tokens que está en [mi GitHub] (https://github.com

SadicX 1 Oct 22, 2021
Generate Random ETH addresses and Private Keys and Saved to file.

ethgen.py Generate Random ETH addresses and Private Keys and Saved to file. ETH address the file is stored in ETH-address.txt. ETH private keys the fi

deanondroid 2 Dec 21, 2021
🚧 finCLI's own News API. No more limited API calls. Unlimited credible and latest information on BTC, Ethereum, Indian and Global Finance.

?? finCLI's own News API. No more limited API calls. Unlimited credible and latest information on BTC, Ethereum, Indian and Global Finance.

finCLI 5 Jun 16, 2022