gazbert / bxbot

A simple Bitcoin trading bot written in Java.
MIT License
824 stars 280 forks source link

Bug at GdaxExchangeAdapter #73

Closed kuceraf closed 6 years ago

kuceraf commented 6 years ago

When creating params for new order request params.put("price", new DecimalFormat("#.##").format(price)); Comma is used as decimal number separator at my enviroment. Gdax requires dot as decimal number separator, thus the request fails.

gazbert commented 6 years ago

Hi @kuceraf - thanks for spotting this. Which environment do you run in btw?

This issue will affect all the exchange adapters, so I'll bring in your fix and push it up into the AbstractExchangeAdapter base class.

The sample Trading Strat will also be affected too - I'll raise a separate ticket for this.

kuceraf commented 6 years ago

Hi @gazbert, yes it's right, I've examined just the gdax adapter. I run it on Windows 10, with Czech localization (and the localization probably cause the problem)

gazbert commented 6 years ago

Cool. I should get some time tomorrow night after work to sort out the other adapters & trading strat.

gazbert commented 6 years ago

Looks like the ExampleScalpingStrategy is ok - it only uses the DecimalFormat in the log statements.

gazbert commented 6 years ago

Will try and get a 0.8.4 release out tomorrow night.

gazbert commented 6 years ago

Released.