Git Product home page Git Product logo

golang-crypto-trading-bot's Issues

Get Order status

The bot should be able to know order status (eg. if an order is still open or is closed)

Binance empty interval

I have configured a yaml file like the following:

simulation_mode: true
exchange_configs:
- exchange: binance
  public_key: aaa
  secret_key: bbb
  deposit_addresses: {}
  fake_balances:
    USDT: 35
strategies:
- strategy: prueba
  markets:
  - market: BTC-USDT
    bindings:
    - exchange: binance
      market_name: BTCUSDT

I get an API error ([] <APIError> code=-1105, msg=Parameter 'interval' was empty.) when I try to get the candles ( wrappers[0].GetCandles(markets[0])).

The problem is in binance.go file, line 236: binanceCandles, err := wrapper.api.NewKlinesService().Symbol(MarketNameFor(market, wrapper)).Do(context.Background())

NewKlinesService create a new Klines service without Interval field, only with the client (c):

type KlinesService struct {
	c         *Client
	symbol    string
	interval  string
	limit     *int
	startTime *int64
	endTime   *int64
}

func (c *Client) NewKlinesService() *KlinesService {
	return &KlinesService{c: c}
}

Then (as you can see above), it calls a Symbol method to set the symbol, but it never calls to Interval method to set it.

cannot find module providing package github.com/adshao/go-binance

When running go get github.com/saniales/golang-crypto-trading-bot the following is outputted to stdout/err:

github.com/saniales/golang-crypto-trading-bot imports
        github.com/saniales/golang-crypto-trading-bot/cmd imports
        github.com/saniales/golang-crypto-trading-bot/exchanges imports
        github.com/adshao/go-binance: cannot find module providing package github.com/adshao/go-binance

Not sure but looks like a dependency broke

What is the default strategy name?

Hi,
I'm trying to up and run this bot in simulation mode, But I don't know what to enter as strategy_name.
Is there any default strategy? or I should implement one for my own?

thanks

Test Strategy

Hi,

I would like to know if there Watch5Sec strategy should work for default? I had been trying to configure it in my config for testing and it is not working, the bot says the strategy does not exist. Do I need to add my own in the code?

thanks in advance

Negative amount on bitfinex orderbook

in exchanges/bitfinex.go change this

			// now let's create the cache
			for price, amount := range orderbookMap {
				if amount < 0 {
					orderbook.Asks = insertSort(orderbook.Asks, environment.Order{
						Value:    decimal.NewFromFloat(price),
						Quantity: decimal.NewFromFloat(amount),
					}, false)
				} else if amount > 0 {
					orderbook.Bids = insertSort(orderbook.Bids, environment.Order{
						Value:    decimal.NewFromFloat(price),
						Quantity: decimal.NewFromFloat(-amount),
					}, true)
				}
			}

to this

			// now let's create the cache
			for price, amount := range orderbookMap {
				if amount < 0 {
					orderbook.Asks = insertSort(orderbook.Asks, environment.Order{
						Value:    decimal.NewFromFloat(price),
						Quantity: decimal.NewFromFloat(-amount),
					}, false)
				} else if amount > 0 {
					orderbook.Bids = insertSort(orderbook.Bids, environment.Order{
						Value:    decimal.NewFromFloat(price),
						Quantity: decimal.NewFromFloat(amount),
					}, true)
				}
			}

`AddCustomStrategy` function is undefined

The example in Readme.me file does not work.

package main

import bot "github.com/saniales/golang-crypto-trading-bot/cmd"

func main() {
	bot.AddCustomStrategy(examples.MyStrategy)
	bot.Execute()
}

AddCustomStrategy function is undefined.

./main.go:6:6: undefined: bot.AddCustomStrategy

Cannot add tactic: Strategy Watch5Sec does not exist

Hello,

I am using the .bot_config.yaml.example for my configuration. I have renamed the -strategy field in this yaml to Watch5Sec and I am receiving the error:

Cannot add tactic: Strategy Watch5Sec does not exist Do I need to do anything in the main.go file of my project in order for this Strategy to be seen?

Can't get project thebotguys/signalr Repository not found.

thebotguys/signalr Repository not found.

command line:

go get -u github.com/saniales/golang-crypto-trading-bot

# cd .; git clone -- https://github.com/thebotguys/signalr C:\projects\src\github.com\thebotguys\signalr
Cloning into 'C:\projects\src\github.com\thebotguys\signalr'...     
remote: Repository not found.
fatal: repository 'https://github.com/thebotguys/signalr/' not found
package github.com/thebotguys/signalr: exit status 128

Invitation on developing golang based trading bot

Hello @saniales , I've accidentally found this repo and seems you've already implemented several exchanges' connectivity that the other projects don't have.

As a golang developer, I would like to invite you to help with another crypto trading bot also written in golang:
https://github.com/c9s/bbgo

Also any pr been accepted will get project tokens in polygon chain (not much at this moment, also the pool in dex is still small).

Best regards,

wrapper.api.NewBookTickerService undefined and wrapper.api.NewPriceChangeStatsService undefined

Hello!

I can't compile app.

golang/src/github.com/saniales/golang-crypto-trading-bot/exchanges/binance.go:191:35: wrapper.api.NewBookTickerService undefined (type *binance.Client has no field or method NewBookTickerService)
golang/src/github.com/saniales/golang-crypto-trading-bot/exchanges/binance.go:209:37: wrapper.api.NewPriceChangeStatsService undefined (type *binance.Client has no field or method NewPriceChangeStatsService)

Can you fix it?

Market Orders support

We should support market orders when possible
e.g. Bittrex does not support market orders, nor does binance

Currently the following exchanges support market orders

  • Binance
  • Bitfinex
  • HitBTC
  • Kraken

Unreachable code bittrex.go

func (wrapper BittrexWrapper) FeedConnect(markets []*environment.Market) error {
	return ErrWebsocketNotSupported

	wrapper.websocketOn = true

	...
}

the function returns immediately, so the rest of the code will never be executed.

func (wrapper BittrexWrapper) subscribeMarketSummaryFeed(market *environment.Market) {
	...
	panic("Not implemented")

	go func(market *environment.Market, results <-chan api.ExchangeState) {
		...
	}(market, results)
}

The go routine will never be executed due panic call before.

Add Simulation Mode

This mode allows to calculate profits assuming trades are always made without investing

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.