GithubHelp home page GithubHelp logo

corbolais / crypto-com-stoploss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giansalex/crypto-com-stoploss

0.0 1.0 0.0 164 KB

Stop-loss on Crypto.com Exchange (API v2)

Home Page: https://platinum.crypto.com/r/chr2wsfs6g

License: GNU General Public License v3.0

Go 97.37% Dockerfile 2.63%

crypto-com-stoploss's Introduction

Crypto.com Stop-Loss Bot Go Report Card

Crypto.com Exchange

Crypto.com Trailing Stop-Loss Bot and optional Telegram notifications.

A trailing stop order sets the stop price at a fixed amount below the market price with an attached "trailing" amount. As the market price rises, the stop price rises by the trail amount, but if the stock price falls, the stop loss price doesn't change, and a market order is submitted when the stop price is hit.

Installation

Follow this guide or use Docker image

Run

Require API Keys.
Set Environment variables:

  • CRYPTO_APIKEY
  • CRYPTO_SECRET
  • TELEGRAM_TOKEN (optional to notify)

Simple command to run bot stoploss

Sell all BTC balance to market price when down 3%.

./crypto -pair=BTC/USDT -percent=3

For buy orders

Buy 100 USDT when BTC up 0.5%

./crypto -type=BUY -pair=BTC/USDT -percent=0.5 -amount=100

For sell orders with static stoploss

SELL 0.1 BTC when BTC down to 9400 USDT

./crypto -pair=BTC/USDT -price=9400 -amount=0.1

Notifications

  • Telegram.
./crypto -pair=BTC/USDT -percent=3 -interval=60 -telegram.chat=<user-id>

Crypto bot Telegram

For get user id, talk to the userinfobot

  • Mailing.
./crypto -pair=BTC/USDT -percent=3 \
      -mail.host="smtp.example.com" \
      -mail.port=587 \
      -mail.user="[email protected]" \
      -mail.pass="xxxx" \
      -mail.from="[email protected]" \
      -mail.to="[email protected]"

You can notify both: telegram, mail.

List available parameters

  -amount float
        (optional) amount to order (sell or buy) on stoploss
  -interval int
        interval in seconds to update price, example: 30 (30 sec.) (default 30)
  -mail.from string
        (optional) email sender
  -mail.host string
        (optional) SMTP Host
  -mail.pass string
        (optional) SMTP Password
  -mail.port int
        (optional) SMTP Port (default 587)
  -mail.to string
        (optional) email receptor
  -mail.user string
        (optional) SMTP User
  -pair string
        market pair, example: MCO/USDT
  -percent float
        percent (for trailing stop loss), example: 3.0 (3%)
  -price float
        price (for static stop loss), example: 9200.00 (BTC price)
  -stop-change
        Notify on stoploss change (default: false)
  -telegram.chat int
        (optional) telegram User ID for notify
  -type string
        order type: SELL or BUY (default "SELL")

Signup

Are you new user?, signup and use this referral code: chr2wsfs6g for earn bonus coin.

crypto-com-stoploss's People

Contributors

giansalex avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.