aleibovici / cryptopump

CryptoPump is a free, open source cryptocurrency trading tool that focuses on high speed and flexibility. The algorithms utilize Go Language and WebSockets to react in real-time to market movements based on Bollinger statistical analysis and pre-defined profit margins.
MIT License
73 stars 12 forks source link

Failed to GetLotSize #37

Closed fandangos closed 3 years ago

fandangos commented 3 years ago

Hey Andre,

It's much easier speaking here compared to twitter so I hope you don't mind me opening an issue. I got mysql running on my unraid server as docker. I'm able to connect to it and I've imported your .sql file into it like this:

$ docker exec -i xxxxxxxx mysql -uroot -pthepassword cryptopump < /path/to/cryptopump.sql

now I'm able to start cryptopump under Visual Studio Code. I have set the Binance API and secret and enabled spot trading.

Here's my config.yaml:

config:
  apikey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  apikeytestnet: 
  buy_24hs_highprice_entry: "0.0005"
  buy_24hs_highprice_entry_macd: "20"
  buy_direction_down: "20"
  buy_direction_up: "10"
  buy_macd_entry: "-30"
  buy_macd_upmarket: "10"
  buy_quantity_fiat_down: "50"
  buy_quantity_fiat_init: "50"
  buy_quantity_fiat_up: "50"
  buy_repeat_threshold_down: "0.002"
  buy_repeat_threshold_down_second: "0.002"
  buy_repeat_threshold_down_second_start_count: "2"
  buy_repeat_threshold_up: "0.0001"
  buy_rsi7_entry: "40"
  buy_wait: "60"
  debug: "false"
  dryrun: "true"
  exchange_comission: "0.075"
  exchangename: BINANCE
  exit: "false"
  newsession: "false"
  profit_min: "0.001"
  secretkey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  secretkeytestnet: 
  sellholdonrsi3: "70"
  selltocover: "false"
  sellwaitaftercancel: "10"
  sellwaitbeforecancel: "20"
  symbol: BUSD
  symbol_fiat: BUSD
  symbol_fiat_stash: "100"
  testnet: "false"
  tgbotapikey: 
  time_enforce: "false"
  time_start: 04:00AM
  time_stop: 07:00PM

So, when starting up I get:

`Exception has occurred: panic
"runtime error: invalid memory address or nil pointer dereference"
Stack:
    4  0x0000000001213e34 in github.com/aleibovici/cryptopump/logger.LogEntry.Do
        at C:/go/cryptopump-1.6/cryptopump-1.6/logger/logger.go:123
    5  0x00000000012e4e12 in github.com/aleibovici/cryptopump/functions.StrToFloat64
        at C:/go/cryptopump-1.6/cryptopump-1.6/functions/functions.go:42
    6  0x0000000001325d8b in github.com/aleibovici/cryptopump/exchange.GetLotSize
        at C:/go/cryptopump-1.6/cryptopump-1.6/exchange/exchange.go:125
    7  0x0000000001349dfc in main.execution
        at C:/go/cryptopump-1.6/cryptopump-1.6/main.go:530
    8  0x0000000001348787 in main.(*myHandler).handler·dwrap·1
        at C:/go/cryptopump-1.6/cryptopump-1.6/main.go:259

Do you have any idea what might be wrong in this case?

fandangos commented 3 years ago

Figured out.

You have to setup a pair like so:

symbol: BTCBUSD symbol_fiat: BUSD

and run one instance of cryptopump per pair. It's running in drymode, let's see how it goes.

aleibovici commented 3 years ago

Good to know everything runs smoothly now. Dry Mode won’t execute transactions. Use TestNet if you want to run actual transactions but with fake money.