BitTrex Plugin (Crypto Trading)

Posted By: vinsom

BitTrex Plugin (Crypto Trading) - 09/20/17 19:10

Hi,
I just shared the code for a BitTrex plugin.

https://github.com/vinsom68/Zorro-BitTrex-Plugin

There is also a compiled dll (latest build folder) and instructions.
There are a few issues, expecially for pairs who have many decimals described in the readme.
This is the first plugin of this kind for Zorro, and it might need some updates to be fully compatible with crypto.

Use at your own risk.
This is the first version, and there might be bugs.
Mostly tested with Bitcoin as base currency, but other currencies might be experimented.

Enjoy
Vincenzo
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 09/21/17 08:49

Here there is a link to a tool do download history from cryptocompare

https://github.com/vinsom68/CryptoCompareHistoryAPI
Posted By: jcl

Re: BitTrex Plugin (Crypto Trading) - 09/21/17 09:08

Thanks! I'm sure this plugin will meet a lot of interest. The latest Zorro version 1.66 has been adapted to support more decimals for bitcoin accounts, at least in theory, it has not been tested yet.
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 09/21/17 20:41

Hi Jcl, will there be a setting to support more decimals or decimals are incremented up to a fixed number ?

Cheers
Posted By: jcl

Re: BitTrex Plugin (Crypto Trading) - 09/22/17 07:03

It checks the account size and switches to more digits when it suspects a Bitcoin account.
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 09/27/17 14:40

Hi Vinsom,

Thank you very much for this, appreciate a lot !
Did you started to build strategies for crypto ?

Sure there must be some obvious inefficiencies compared to other market,
can't wait to try some strategies laugh

BR, Johan
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/03/17 20:11

Not yet.
Waiting for final Zorro 1.66 that can handle more decimals
Posted By: Petra

Re: BitTrex Plugin (Crypto Trading) - 10/08/17 06:31

Thank you for this plugin! Will try crypto trading, this just comes handy.
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 10/11/17 06:52

Hi Vinsom,

I have started to play with your files.
I am trying to backtest some strategies with the historical data taken from crypto compare (and thank you again for this !).

I see that in AssetFix you have set the PIP cost to 0.01 :

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
1ST/BTC,50,0,0,0,0.00000001,0.01,0,1,1,0.000005,

this means that 1 pip (1 satoshi) is equal to 0.01$. This is very difficult to interpret the result with that.

I think this is more convenient to put 1 in pip cost so the result is in Satoshis instead.

Also, do you know how is it possible to change the currency account in the config file (and put satoshis or BTC) ?

I really want to contribute to this and make it work for crypto account, so I will continue testing and report here.

Best regards,
Johan
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/16/17 03:10

Hi Johan,

The pip cost is calculated from the data coming from the broker.
So the values in the AssetList are all ignored except fees, for which Zorro doesn't have variables to auto set them in the plugin.
Please read carefully the readme coming with the plugin where is partially explained.

In short, Bittrex has a min trade amount of 50k satoshi.
To avoid issues , I set this amount to 100k (see why in the readme).
Now this 100k satoshi converted to the alt coin you want to buy would be the MinLotAmount, that therefore changes for every altcoin.
So a 1 Zorro lot, would be equal to this MinLotAmount (about 5US at current exchange rate), and multiples of the MinLotAmount.

Now the PipCost is equal to the MinLotAmount * Pip (1 satoshi=0.00000001) * AccountCurrency(1 if btc, or BTC/USD exchange rate)
If log is enabled and you search for "PipCost:", you will find it there for each pair in the AssetList (just clear it from times to times as becomes huge).

To enable the account to be in BTC, replace DisplayCurrency="USD" with DisplayCurrency="BTC" in Zorro.ini.
You will need Zorro 1.66 to see more decimals as Jcl says. Haven't had the time to test this.
Let me know how you go and thanks for doing some testing

Vincenzo
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/20/17 02:46

Hi Jcl,
I sent an email to support about a couple of issues found in Zorro 1.66 in the way Zorro handles crypto and decimals with a couple of simple test I did.
Please let me know what you think.

Thanks
Vincenzo
Posted By: jcl

Re: BitTrex Plugin (Crypto Trading) - 10/20/17 16:39

I have seen your email. We can help with the decimals, and will probably implement some way to set them up for the account. You had also issues with pip size or pip cost - not sure which one - but this should be easy to solve, just check the parameter in your asset list or broker function. If the value is extremely small, it can also be some spreadsheet reading error from the asset list. In that case please send the list to support, they'll look into it.
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/21/17 10:57

Hi Jcl,
I calculate the PipCost in the broker plugin.
And fill the pPipCost variable in BrokerAssef plugin function.

I replied to support highlighting the issue and waiting for a reply.
THanks
Vincenzo
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 10/21/17 16:04

Hi Vincenzo,

Thank you for your clarification.
I am playing live with your plugin (very simple strategy for now to ensure that everything is running correctly).
Could you describe to me the issue with the PIPCost ? just to verify that we have the same behaviour.

A small test I have done is this one :

- Buy 1 lot of the asset FUN/BTC
- Sell after few seconds.

It seems that the computation of the profit/loss is not good :

[557: Sat 17-10-21 17:31] 0.00000284/0.00000284�.00000284/0.00000284
!Trade id: b675939f-986b-4e9c-a64d-1b20e12e0b64 - 1508607061 - Price: 0.00000286
!Type: buy Price: 0.00000286 Amount: 352
!Quantity: 352 QRemaining: 0 Commission: 0.00000252
[FUN/BTC::L7061] Long 1@0.00000286 p
Session end at 17:31
!Trade id: e44a3e6c-2c3c-4b72-a352-0b94ab1fb6db - 1508607080 - Price: 0.00000284
!Type: sell Price: 0.00000284 Amount: 352
!Quantity: 352 QRemaining: 0 Commission: 0.00000250
[FUN/BTC::L7061] Sell 1@0.00000286: -0.00352113
Logout.. ok

It says that the loss is -0.00352113 BTC which is not the correct amount.

Is this related with what you are experiencing ?


By the way I am really happy that you develop this plugin laugh


EDIT :

Seems that there is a factor applied to the calculation of the profit.
The correct loss is -0.00000352113 BTC. if we compute the formula (found in the documentation of Zorro) : x * Lots * PIPCost/PIP with x the price difference we get the correct amount.
So there is a factor of 1000 applied in Zorro. Don't know where this is coming from.



Posted By: jcl

Re: BitTrex Plugin (Crypto Trading) - 10/23/17 11:06

Check the LotAmount. A factor 1000 looks like a LotAmout 1000 instead of 1.
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 10/23/17 15:20

Hi Jcl,

I have done a new test while printing the differents Zorro variable :

[FUN/BTC::L1401] Sell 1@0.00000317: -0.00317460
pip cost : 0.00000318
pip UNIT : 0.00000001
lot : 1.00000000
lot amount : 318.47133758
spread : 0.00001000 => HUGE !


This is caused by the spread. For the profit calculation, the roundturn cost is subtracted : Spread*PIPCost/PIP which in fact is the cause of the drift!

However the plugin seems to return a correct spread : 0.00000003.
It seems that Zorro do not take it into account in the same way as the commission. Will try to investigate why.

Vincenzo, to sum up, it seems that Commission and spread from the plugin are ignored by Zorro. It is however still possible to recompute them and set them with custom code.

BR, Johan
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/23/17 16:13

Hi JohanAu,
Thanks for your help doing some test.
Zorro support just told me there is a new beta version where you can set the mumber of decimals.

"we have today uploaded a new beta version 1.17.9 where you can set up the account decimals in the Currency column of the account list, f.i. "BTC.8" for 8 decimals."

Thanks for your input. Will do some more testing with this version as soos as I have some time.
Vincenzo
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/25/17 10:18

Hi JohanAu,
I did a bit of test with zorro 1.71 beta and spread and commission looks to be considered, so numbers looks ok.

Cheers
Vincenzo
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/25/17 10:22

Hi Jcl,
I sent to support 3 issues I found for crypto trading.
I'll post it here below again for information to other users.

------------------------------------------

Hi,
I just did a small test with Zorro 1.71 Beta and this is what I see:

- The balance of 0.08018764 Ethereum is still displayed as 0 in Zorro UI, even if I set the currency in Accounts.csv to BTC.8 or ETH.8, and in the html report profit has the $ symbol (see attachment)

- I read Jcl post about BrokerTrade not being called for NFA accounts. Actually I thought that was by design. When this function will be enabled in next version, there would be a problem for this Bittrex plugin as the TradeId is a GUID, like "54fe52f4-09e4-4db9-95a4-af249c879133", and can't be returned to BrokerBuy to then be passed to BrokerTrade. Would be nice to have optional functions that have a char* instead of an int as the TradeID

- Profit/Loss still with dollar symbol $ in the backtest report in several places (see attachment)

-----------------------------------
Cheers
Vincenzo

Attached File
BitTrex Plugin 2.txt  (266 downloads)
Attached File
BitTrex Plugin 1.JPG  (278 downloads)
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 10/25/17 15:39

Hi Vinsom,

I carefully read what you have written. I have done the same test with the same Asset and it works perfectly fine :

[DASH/BTC::L5581] Sell 1@0.051800000: -0.00

pip UNIT : 0.00000001
commission cost: -0.00000010
commission : 0.00000500
lot amount : 0.01940459
lot : 1.00000000
spread : 0.00026581
win - loss in btc : -0.00000525

The spread is correctly set, as well as the commission.

But with asset where the spread is less than 0.00001000 (which happen with a lot of asset). Then the spread is ignored somehow. It seems that there is minimum with that value.





Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 10/25/17 19:50

Start to write some crypto strategies guys..
Use Zorro 171 beta.
In attachment there is a script to download 60 minuted history from CryptoCompare. You will need the CryptoCompareHistoryAPI exe and dependencies in your zorro folder.
Put your symbols in your asset list that you want to download.
See sample in BitTrex plugin readme.
Then start with the simplest strategy on 60 min bars like the one below from the manual with few changes.

Enjoy.
Vincenzo


function run()
{
set(TESTNOW+LOGFILE);
set(PRELOAD);
StartDate = 2015;
BarPeriod = 60;
//NumYears=1;
//StartDate = 20140718;
//EndDate = 20170522; // fixed simulation period
Margin=1;
//Capital=10000;
vars MMI_Raw;
vars MMI_Smooth;

assetList("AssetsCoinsBitTrexStrategy.csv");
while (asset(loop(Assets)))
{


vars Price = series(price());
vars Volume = series(marketVol ());
vars Trend = series(LowPass(Price,50));//500

Stop = 4*ATR(25);

MMI_Raw = series(MMI(Price,30));//300
MMI_Smooth = series(LowPass(MMI_Raw,50));//500

if(falling(MMI_Smooth)) {
if(valley(Trend) && rising(Volume))
enterLong();
else if(peak(Trend))
exitLong();

}


}

set(LOGFILE); // log all trades
PlotWidth = 800;
PlotHeight1 = 300;
plot("MMI_Raw",MMI_Raw,NEW,GREY);
plot("MMI_Smooth",MMI_Smooth,0,BLACK);
//plotTradeProfile(-50);
}

Attached File
DownloadCoinsBittrex_SHARE.c  (180 downloads)
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/10/17 10:03

@vinsom I'm trying to use your code, but the authentication to BitTrex with the API is giving me an error. It says APIkey invalid, but I've re-checked the API keys and they're ok. Just to be sure that I'm doing things correctly:

1.- It seems that you've named "PublicKey" to a variable that actually is the Secret (in the BitTrex nomenclature). Is this correct?

2.- The configuration of Bittrex should be put in the zorro.ini file, just after (in the default zorro.ini file) AVApiKey variable.

3.- The username and password of BitTrex are not needed because your code use the API keys inside zorro.ini to connect, and the 111111 is just a random number and it doesn't needs to be modified, right?

I can't wait to use this code for crypto laugh
Posted By: Nanitek

Re: BitTrex Plugin (Crypto Trading) - 11/10/17 17:05

Originally Posted By: vinsom

You will need the CryptoCompareHistoryAPI exe and dependencies in your zorro folder.


Where can I get that?
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/10/17 17:24

@Nanitek, you can download it from the vinsom github. It happened also to me, I wasn't able to find it laugh Here is it: https://github.com/vinsom68/CryptoCompareHistoryAPI
Posted By: Nanitek

Re: BitTrex Plugin (Crypto Trading) - 11/11/17 23:09

Originally Posted By: Cheulmen
@Nanitek, you can download it from the vinsom github. It happened also to me, I wasn't able to find it laugh Here is it: https://github.com/vinsom68/CryptoCompareHistoryAPI


thx

I have installed the .net but where do the files need to be copied exactly?
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/11/17 23:59

Go here: https://github.com/vinsom68/CryptoCompareHistoryAPI/tree/master/LatestBuild

And copy all of those files in your Zorro folder; in my case it is C:/users/Administrator/Zorro
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/12/17 10:18

Hi,
You should get 2 keys from Bittrex when you change the Bittrex settings and ask for API trading.
The secret one is the private key, the other one is the public.
Yes 1111 is a random number, you don't need your user and pwd to login. API keys are enough
Hope this helps

PrivateKey = "????????????????????"
PublicKey = "??????????????????????"
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/12/17 17:42

Ok, I had the keys exchanged. Now it connects laugh
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/13/17 14:26

Hello Vinsom,

PipCost is constantly varying due to BTC fluctuation, consequently the LotAmount is varying as well.

When you buy 1 lot of an asset and then you sell 1 lot of the very same asset : the quantity you sell can be different from the quantity bought in the first place. The profit calculation is then incorrect.

I am wondering if you have workaround for that ? I was thinking of fixing the PIPCost at the first init of the function.

Thanks !

Johan
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/13/17 19:07

Hi JohanAu.
In regards to this issue, the Pipcost should be constant until you stop and restart a strategy when trading live.
I remember I specifically faced this issue when testing the plugin, and the solution I applied was to lock in the the reference exchange rate for the pip cost calculation when the plugin is loaded.
So if you don't restart the strategy the pip cost should be constant.

If you are still facing issue please post your zorro.ini configuration (without the keys) and the asset list you are using and I'll have a look at it.

You can lock in the pipcost in your strategy as a temporary work around until I fix it if this is still a plugin issue.

Cheers
Vince
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/15/17 10:10

Hi Vinsom,

here the Zorro.ini :

[BITTREX]
PrivateKey = ""
PublicKey = ""
DisplayCurrency="BTC"
BaseTradeCurrency="BTC"
IntervalSec = "15"
DemoTrading="0"
EnableLog="0"
UseCryptoCompareHistory="1"
MinOrderSize="100000"
LimitOrderMaxOrderBookDepth="0.5"
WaitAfterOrderForCheckSec="2"

and the asset list :

Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
RLC/BTC,50,0.00000512,0,0,0.00000001,0.00000001,0,1,0.65,0.000000,
TRST/BTC,50,0.00000512,0,0,0.00000001,0.00000001,0,1,0.65,0.000000,

It seems that the PIP cost is not fixed, even if the strategy is not restarted.
I will fix the PIPCost as a workaround !

thank you for your help, I appreciate it.

BR, Johan
Posted By: Nanitek

Re: BitTrex Plugin (Crypto Trading) - 11/15/17 13:02

Originally Posted By: Cheulmen
Go here: https://github.com/vinsom68/CryptoCompareHistoryAPI/tree/master/LatestBuild

And copy all of those files in your Zorro folder; in my case it is C:/users/Administrator/Zorro


thx... I cant really make it work. Shall I use another Crypto asset list?
My bittrex connection works perfectly so I am not sure where I am doing it wrong.
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/15/17 19:42

Hi Nanitek.
Not sure I understand what is not working.
Can you post more details on the steps you are you doing and what is the issue ?
Are you using the download_coins_SHARE.c script I posted for downloading data with the CryptoCompareHistoryAPI tool ?

Cheers
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/16/17 09:03

Hi JohnAu,
I reproduced the issue and fixed it.
Please get last compiled dll from github.

Cheers
Vince
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/16/17 12:30

Hi Vinsom,

Amazing, thank you a lot for that. Can't wait to try it !!

Johan
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 07:51

Hi Again,

I took the latest build here : https://github.com/vinsom68/Zorro-BitTrex-Plugin/tree/master/LatestBuild

and did some testing :


Enter 2L XLM/BTC at 21:43:37
!Trade id: - Price: 0.00000458
!Type: buy Price: 0.00000458 Amount: 438
!Quantity: 438 QRemaining: 0 Commission: 0.00000502
BrokerBuy XLM/BTC: 2751 ms
[XLM/BTC::L1418] Long 2@0.00000 at 21:43:37
Units: 438 Margin: 0.00 MCost: 0.0010 PCost: 0.00000
Asset : XLM/BTC
pip cost : 0.00000217
lot : 2.00000000


[Sun 17-11-19 00:42]
Exit [XLM/BTC::L1418]
!Trade id: - Price: 0.00000474
!Type: sell Price: 0.00000474 Amount: 421
!Quantity: 421 QRemaining: 0 Commission: 0.00000499
BrokerSell XLM/BTC: 2832 ms
[XLM/BTC::L1418] Sell 2@0.000004750: -0.00 at 00:42:07
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp -0.00 Rol 0.00 Com 0.00

Asset : XLM/BTC
price : 0.00000473
pip cost : 0.00000217
lot : 2.00000000


Seems that the PIPCost is correctly fixed but the quantity is still not the good one. I suspect that the lot amount is varying as well. I believe it shall be fixed at the init of the strategy as well.
Will do some more testing.

Johan
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 08:56

Hi Johan,
Is demo trading or live ?
Can you send me the log (remove the API keys, those are logged too) ?

Thanks for doing some more beta testing
Vince
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 09:01

Also, has the strategy been restarted between entry and exit ?
Is the account set to NFA ?

if settings are the same as before don't need to send again.

Cheers
Vince
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 10:07

Hi,

Yes I have set NFA otherwise trade cannot be closed by Zorro.
Yes settings are the same and this is live trading.
I have fixed the lot amount for each asset I am using as a workaround, let see if the issue is fixed with that.

I have also spotted strange behaviour for asset where PIPCost > 0.00000001 (1 satoshi) but I don't know if it is plugin related.

1- The Commission cost is not computed correctly :

in this example, I just enter and exit the trade after few seconds :

Trade: TradeTest XLM/BTC 2017-11-19
Buy Long XLM/BTC
Enter 1L XLM/BTC at 08:38:55
!Trade id: Price: 0.00000487
!Type: buy Price: 0.00000487 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000250
[XLM/BTC::L0735] Long 1@0.00000 at 08:38:55
Close Long XLM/BTC
Exit [XLM/BTC::L0735]
!Trade id: Price: 0.00000485
!Type: sell Price: 0.00000485 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000249
[XLM/BTC::L0735] Sell 1@0.000004870: -0.00 at 08:38:55
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp 0.00 Rol 0.00 Com 0.00
commission cost: -0.00102881
commission : 0.00000500 => roundturn fee from bittrex which is 0.5%
lot amount : 205.76131687
BalanceLong : -0.00102881
pipcost: 0.00000209


The Balance long indicate a loss of -0.00102881 BTC which is huge.

To solve that, I need to set the commission variable to: Commission = 0.00000500*PIP/PIPCost;

Trade: TradeTest XLM/BTC 2017-11-19
Buy Long XLM/BTC
Enter 1L XLM/BTC at 08:41:03
!Trade id: 54fe52f4-09e4-4db9-95a4-af249c879133 - 1511080864 - Price: 0.00000487
!Type: buy Price: 0.00000487 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000250
[XLM/BTC::L0864] Long 1@0.00000 at 08:41:03
Close Long XLM/BTC
Exit [XLM/BTC::L0864]
!Trade id: 54fe52f4-09e4-4db9-95a4-af249c879133 - 1511080869 - Price: 0.00000486
!Type: sell Price: 0.00000486 Amount: 205
!Quantity: 498.84974999999997 QRemaining: 498.84974999999997 Commission: 0.00000249
[XLM/BTC::L0864] Sell 1@0.000004870: -0.00 at 08:41:07
Entr 0.0000 Exit 0.0000 Spr 0.0000 Slp 0.00 Rol 0.00 Com 0.00
commission cost: -0.00000493
commission : 0.00000002
lot amount : 205.76131687
BalanceLong : -0.00000493
pipcost: 0.00000209

Seems correct since Commission cost is equal to Commission*LotAmount*PIP/PIPCost : 0.00000500*205.76131687*0.00000001/0.00000209 = 0.00000492


2- I suspect that the spread cost is also wrong for the asset where pip cost is > 1 satoshis and the factor PIP/PIPCost shall also be applied. I don't really mind since I have set it to zero for now but we need to be aware.


It is all for now laugh my analysis may not be correct but I am here to contribute so everyone may benefit from this !

Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 11:11

Hi JuhanAu,
Au is for Australia ? I live in Au too.

For the PIPCost , this is hardcoded in the plugin to 0.00000001, as as far as I know, is the same for all pairs on Bittrex. Correct me if I'm wrong.

The commission is set in the asset List to 0.000005, that is the commission for 1 lot (the min amount set in the config of 100k sat).
(I mentioned in the readme).
But I think you set it to a different value in your config.


I'll have a look at the Lot Amount when I have a bit more time,

Cheers
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 11:14

Sorry I didn't read carefully what you wrote about the commission.
Yes if it doesn't work correctly set from the asset list you need to code it.
There is nothing in the plugin about the commission.
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/19/17 11:25

ok Vinsom, anyway thank for the good work. Glad to help also.

I live in France (half france/italy origin).
awesome that you live in Australia as long as you don't miss Italy laugh
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/20/17 23:00

Hi JohanAu,
I haven't been able to reproduce the Lot Amount issue you mentioned.
Can you please reproduce the issue and send me the BittrexPlugin.log (clear the keys)?
Need to check the API call parameters

From a quick test I did looks fine

Line 118: 2017-11-21 08:33:30,755 INFO [default] BrokerBuy IN
Line 119: 2017-11-21 08:33:30,756 INFO [default] BrokerBuy Params: BTC-XLM Amount:212 StopDist:0.00000000
Line 129: 2017-11-21 08:33:37,216 INFO [default] BrokerBuy OUT
Line 1183: 2017-11-21 08:38:05,609 INFO [default] BrokerBuy IN
Line 1184: 2017-11-21 08:38:05,609 INFO [default] BrokerBuy Params: BTC-XLM Amount:-212 StopDist:-1.00000000
Line 1194: 2017-11-21 08:38:08,651 INFO [default] BrokerBuy OUT
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 11/22/17 07:28

Hi Vinsom,

I'll enable the bittrex plugin, but I have fixed the lot amount for each asset at the first run so it does not bother me laugh

For your question regarding the pip cost :

"Value of 1 pip profit or loss per lot in units of the account currency; determined by the lot size (LotAmount) and the exchange rate of account currency and counter currency. This value should normally remain constant during the simulation for not adding artifacts to the result. If desired for special purposes, it can be calculated by script to fluctuate with the exchange rate (see example below). When the asset price rises or falls by x, the equivalent profit or loss in account currency is x * Lots * PIPCost/PIP. "

The pip cost is based on the lot amount, so each asset has different pip cost.
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/28/17 22:41

Hi,

I'm getting an error while using this plugin. Trading in the ETH/BTC pair, I'm getting the following error:

!INSUFFICIENT_FUNDS
!market/buylimit - Error Parsing JSon
!Error calling API BrokerBuy
(ETH/BTC::L) Can't open 1@0.04684 at 22:30:01

In my Bittrex account I have 0.99ETH, so I have money to trade. My code is very simple, I just want to buy with the whole amount of money each time, so if I receive a long signal, I want to buy with all the BTC that I have, and if I receive a short signal, I want to sell all the ETH. This is the code:

Entry = PIP;
Lots = 43;
if (buy_signal == 1)
{
ReverseLong(1);
}
if (short_signal == 1)
{
ReverseShort(1);
}

I know that the plugin does not short, but I guess that this syntax is ok anyway? Instead of short I just want to sell ETH and stay in BTC, I'm not sure if the error may be because of this.

EDIT: Using Lots=40; it seems that the error doesn't appears, so I guess that this problem was due to my poor knowledge of Zorro. So, for the records, the Lots=40 is a bit less than the value of 1ETH in BTC.

EDIT2: Definitely something is wrong with the plugin, or with my script. I have 0.04386992 BTC. Then, I use Lots=43 (the code is the same than above). The system tries to buy ETH, opening a long position. And then the INSUFFICIENT FUNDS error appears frown
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 11/30/17 08:23

Hi Cheulmen,
You shouldn't trade using all your balance.
Try to open and close a trade with 50% of the balance.

If is still an issue, in the Zorro.ini there is a setting to enable the log.
Set it to 1 (should be already 1 by default).
Then try to run your script and after the error open the log file (BittrexPlugin.log) , clean up your bittrex secret keys and post the log.

Would like to check the quantity sent in both opening and closing the trade.

There are also some changes Bittrex did recently regarding the pip size and minimum amount, that might also create issues.

Cheers
Vincenzo
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/30/17 10:59

Hi Vinsom,

Thanks for your answer, I restarted and I'm using half of my balance to trade (using Lots=20), but I don't get why. I mean, I don't want to have "locked" half of my money, I prefer to have it being traded. Is there some limitation or... :?

Anyway, I'm pasting here the relevant log of the problem. You'll see that in this specific case I'm using 42 Lots while the balance is 0.04386992 BTC. May be I'm doing something wrong though

Click to reveal..
2017-11-29 19:30:22,644 INFO [default] apisign: MYKEYSREMOVED
2017-11-29 19:30:22,644 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04386992,"Available":0.04386992,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-29 19:30:22,644 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-29 19:30:22,644 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-29 19:30:22,691 INFO [default] {"success":true,"message":"","result":{"Bid":10451.00000002,"Ask":10465.00000000,"Last":10460.00000000}}
2017-11-29 19:30:22,691 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-29 19:30:22,691 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-29 19:30:22,691 INFO [default] BrokerAccount OUT
2017-11-29 19:30:23,097 INFO [default] BrokerTime IN
2017-11-29 19:30:23,097 INFO [default] BrokerTime OUT
2017-11-29 19:30:23,097 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:23,128 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00012338
2017-11-29 19:30:23,128 INFO [default] BrokerAsset OUT
2017-11-29 19:30:23,550 INFO [default] BrokerTime IN
2017-11-29 19:30:23,550 INFO [default] BrokerTime OUT
2017-11-29 19:30:23,550 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:23,566 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00012338
2017-11-29 19:30:23,566 INFO [default] BrokerAsset OUT
2017-11-29 19:30:23,988 INFO [default] BrokerTime IN
2017-11-29 19:30:23,988 INFO [default] BrokerTime OUT
2017-11-29 19:30:23,988 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:24,019 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00012338
2017-11-29 19:30:24,019 INFO [default] BrokerAsset OUT
2017-11-29 19:30:24,441 INFO [default] BrokerTime IN
2017-11-29 19:30:24,441 INFO [default] BrokerTime OUT
2017-11-29 19:30:24,441 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:24,472 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00012338
2017-11-29 19:30:24,472 INFO [default] BrokerAsset OUT
2017-11-29 19:30:24,894 INFO [default] BrokerTime IN
2017-11-29 19:30:24,894 INFO [default] BrokerTime OUT
2017-11-29 19:30:24,894 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:24,956 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:24,956 INFO [default] BrokerAsset OUT
2017-11-29 19:30:25,363 INFO [default] BrokerTime IN
2017-11-29 19:30:25,363 INFO [default] BrokerTime OUT
2017-11-29 19:30:25,363 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:25,409 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:25,409 INFO [default] BrokerAsset OUT
2017-11-29 19:30:25,831 INFO [default] BrokerTime IN
2017-11-29 19:30:25,831 INFO [default] BrokerTime OUT
2017-11-29 19:30:25,831 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:25,847 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:25,847 INFO [default] BrokerAsset OUT
2017-11-29 19:30:26,269 INFO [default] BrokerTime IN
2017-11-29 19:30:26,269 INFO [default] BrokerTime OUT
2017-11-29 19:30:26,269 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:26,316 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:26,316 INFO [default] BrokerAsset OUT
2017-11-29 19:30:26,722 INFO [default] BrokerTime IN
2017-11-29 19:30:26,722 INFO [default] BrokerTime OUT
2017-11-29 19:30:26,722 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:26,769 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:26,769 INFO [default] BrokerAsset OUT
2017-11-29 19:30:27,175 INFO [default] BrokerTime IN
2017-11-29 19:30:27,175 INFO [default] BrokerTime OUT
2017-11-29 19:30:27,175 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:27,191 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:27,191 INFO [default] BrokerAsset OUT
2017-11-29 19:30:27,613 INFO [default] BrokerTime IN
2017-11-29 19:30:27,613 INFO [default] BrokerTime OUT
2017-11-29 19:30:27,613 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:27,659 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:27,659 INFO [default] BrokerAsset OUT
2017-11-29 19:30:28,066 INFO [default] BrokerTime IN
2017-11-29 19:30:28,066 INFO [default] BrokerTime OUT
2017-11-29 19:30:28,066 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:28,113 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:28,113 INFO [default] BrokerAsset OUT
2017-11-29 19:30:28,534 INFO [default] BrokerTime IN
2017-11-29 19:30:28,534 INFO [default] BrokerTime OUT
2017-11-29 19:30:28,534 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:28,722 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:28,722 INFO [default] BrokerAsset OUT
2017-11-29 19:30:29,144 INFO [default] BrokerTime IN
2017-11-29 19:30:29,144 INFO [default] BrokerTime OUT
2017-11-29 19:30:29,144 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:29,159 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:29,159 INFO [default] BrokerAsset OUT
2017-11-29 19:30:29,581 INFO [default] BrokerTime IN
2017-11-29 19:30:29,581 INFO [default] BrokerTime OUT
2017-11-29 19:30:29,581 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:29,628 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:29,628 INFO [default] BrokerAsset OUT
2017-11-29 19:30:30,034 INFO [default] BrokerTime IN
2017-11-29 19:30:30,034 INFO [default] BrokerTime OUT
2017-11-29 19:30:30,034 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:30,066 INFO [default] Asset Details: BTC-ETH Price: 0.04576244 Spread: 0.00000001
2017-11-29 19:30:30,066 INFO [default] BrokerAsset OUT
2017-11-29 19:30:30,472 INFO [default] BrokerTime IN
2017-11-29 19:30:30,472 INFO [default] BrokerTime OUT
2017-11-29 19:30:30,472 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:34,284 INFO [default] Asset Details: BTC-ETH Price: 0.04579999 Spread: 0.00016093
2017-11-29 19:30:34,284 INFO [default] BrokerAsset OUT
2017-11-29 19:30:34,284 INFO [default] BrokerBuy IN
2017-11-29 19:30:34,284 INFO [default] BrokerBuy Params: BTC-ETH Amount:42 StopDist:0.00000000
2017-11-29 19:30:35,456 INFO [default] market=BTC-ETH&quantity=0.96024736&rate=0.04579999
2017-11-29 19:30:35,456 INFO [default] apisign: MYKEYSREMOVED
2017-11-29 19:30:35,644 INFO [default] {"success":false,"message":"INSUFFICIENT_FUNDS","result":null}
2017-11-29 19:30:35,644 ERROR [default] INSUFFICIENT_FUNDS
2017-11-29 19:30:35,644 ERROR [default] market/buylimit
2017-11-29 19:30:35,644 ERROR [default] market=BTC-ETH&quantity=0.96024736&rate=0.04579999
2017-11-29 19:30:35,644 ERROR [default] market/buylimit - Error Parsing JSon
2017-11-29 19:30:35,644 ERROR [default] Error calling API BrokerBuy
2017-11-29 19:30:35,644 INFO [default] BrokerBuy OUT
2017-11-29 19:30:35,644 INFO [default] BrokerAccount IN
2017-11-29 19:30:35,644 INFO [default] apisign: MYKEYSREMOVED
2017-11-29 19:30:37,362 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04386992,"Available":0.04386992,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-29 19:30:37,362 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-29 19:30:37,362 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-29 19:30:37,393 INFO [default] {"success":true,"message":"","result":{"Bid":10451.00000003,"Ask":10460.00000000,"Last":10460.00000000}}
2017-11-29 19:30:37,393 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-29 19:30:37,393 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-29 19:30:37,393 INFO [default] BrokerAccount OUT
2017-11-29 19:30:37,815 INFO [default] BrokerTime IN
2017-11-29 19:30:37,815 INFO [default] BrokerTime OUT
2017-11-29 19:30:37,815 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-29 19:30:37,862 INFO [default] Asset Details: BTC-ETH Price: 0.04579999 Spread: 0.00016093
2017-11-29 19:30:37,862 INFO [default] BrokerAsset OUT
2017-11-29 19:30:38,284 INFO [default] BrokerTime IN
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 11/30/17 15:27

It happened again, this time with Lots=20. I'm pasting here the log (I just left in the log the initial start, and then the buys and the error, to avoid a massive logfile).

Click to reveal..
2017-11-30 11:24:00,234 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 11:24:00,234 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 11:24:01,310 INFO [default] {"success":true,"message":"","result":{"Bid":9970.00000000,"Ask":9980.79999999,"Last":9980.80000000}}
2017-11-30 11:24:01,310 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,310 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,310 INFO [default] BrokerAccount IN
2017-11-30 11:24:01,310 INFO [default] apisign: MYKEYS
2017-11-30 11:24:01,479 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04238690,"Available":0.04238690,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 11:24:01,479 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 11:24:01,479 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 11:24:01,504 INFO [default] {"success":true,"message":"","result":{"Bid":9970.00000000,"Ask":9980.79999999,"Last":9980.80000000}}
2017-11-30 11:24:01,504 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,504 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,504 INFO [default] BrokerAccount OUT
2017-11-30 11:24:01,504 INFO [default] BrokerLogin OUT
2017-11-30 11:24:01,504 INFO [default] BrokerTime IN
2017-11-30 11:24:01,504 INFO [default] BrokerTime OUT
2017-11-30 11:24:01,509 INFO [default] BrokerAccount IN
2017-11-30 11:24:01,509 INFO [default] apisign: MYKEYS
2017-11-30 11:24:01,509 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04238690,"Available":0.04238690,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 11:24:01,509 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 11:24:01,509 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 11:24:01,538 INFO [default] {"success":true,"message":"","result":{"Bid":9970.00000000,"Ask":9980.79999999,"Last":9980.80000000}}
2017-11-30 11:24:01,538 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,538 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 11:24:01,538 INFO [default] BrokerAccount OUT
2017-11-30 11:24:01,542 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:24:01,542 INFO [default] CanSubscribe IN
2017-11-30 11:24:01,568 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:24:01,772 INFO [default] Asset Details: BTC-ETH Price: 0.04396704 Spread: 0.00007604 MinAmount: 0.02278371 PipCost: 0.00000227
2017-11-30 11:24:01,772 INFO [default] BrokerAsset OUT
2017-11-30 11:24:01,773 INFO [default] BrokerHistory2 IN
2017-11-30 11:24:01,773 INFO [default] Params BTC-ETH Start : 11/02/17 10:24:01 End : 11/30/17 10:24:01 nTickMinutes : 5 nTicks : 300
2017-11-30 11:24:01,773 INFO [default] BrokerHistory3 IN
2017-11-30 11:24:01,975 INFO [default] return nTick: 28
2017-11-30 11:24:01,975 INFO [default] BrokerHistory3 OUT
2017-11-30 11:24:01,979 INFO [default] BrokerHistory2 IN
2017-11-30 11:24:01,979 INFO [default] Params BTC-ETH Start : 11/02/17 10:24:01 End : 11/03/17 00:00:00 nTickMinutes : 5 nTicks : 300
2017-11-30 11:24:01,979 INFO [default] BrokerHistory3 IN
2017-11-30 11:24:02,169 INFO [default] return nTick: 1
2017-11-30 11:24:02,169 INFO [default] BrokerHistory3 OUT
2017-11-30 11:24:02,174 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:24:02,367 INFO [default] Asset Details: BTC-ETH Price: 0.04396704 Spread: 0.00007604 MinAmount: 0.02278371 PipCost: 0.00000227
2017-11-30 11:24:02,367 INFO [default] BrokerAsset OUT
2017-11-30 11:24:02,437 INFO [default] BrokerTime IN
2017-11-30 11:24:02,437 INFO [default] BrokerTime OUT
2017-11-30 11:24:02,437 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:24:02,454 INFO [default] Asset Details: BTC-ETH Price: 0.04396704 Spread: 0.00007604
2017-11-30 11:24:02,454 INFO [default] BrokerAsset OUT
2017-11-30 11:24:02,454 INFO [default] BrokerAccount IN
2017-11-30 11:24:02,454 INFO [default] apisign: MYKEYS
2017-11-30 11:24:02,454 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04238690,"Available":0.04238690,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 11:24:02,454 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 11:24:02,454 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 11:24:02,471 INFO [default] {"success":true,"message":"","result":{"Bid":9970.00000000,"Ask":9980.79999999,"Last":9980.80000000}}
2017-11-30 11:24:02,471 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 11:24:02,471 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 11:24:02,471 INFO [default] BrokerAccount OUT
2017-11-30 11:24:02,745 INFO [default] BrokerTime IN

[...]

2017-11-30 11:30:49,425 INFO [default] Asset Details: BTC-ETH Price: 0.04395995 Spread: 0.00002599
2017-11-30 11:30:49,425 INFO [default] BrokerAsset OUT
2017-11-30 11:30:49,699 INFO [default] BrokerTime IN
2017-11-30 11:30:49,699 INFO [default] BrokerTime OUT
2017-11-30 11:30:49,699 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:30:49,886 INFO [default] Asset Details: BTC-ETH Price: 0.04400150 Spread: 0.00004155
2017-11-30 11:30:49,886 INFO [default] BrokerAsset OUT
2017-11-30 11:30:49,886 INFO [default] BrokerBuy IN
2017-11-30 11:30:49,886 INFO [default] BrokerBuy Params: BTC-ETH Amount:20 StopDist:0.00000000
2017-11-30 11:30:49,926 INFO [default] market=BTC-ETH&quantity=0.45567428&rate=0.04400175
2017-11-30 11:30:49,926 INFO [default] apisign: MYKEYS
2017-11-30 11:30:50,117 INFO [default] {"success":true,"message":"","result":{"uuid":"3e42e3cd-4201-4a55-bd1d-2c5c41ae9242"}}
2017-11-30 11:30:52,118 INFO [default] apisign: MYKEYS
2017-11-30 11:30:52,290 INFO [default] {"success":true,"message":"","result":{"AccountId":null,"OrderUuid":"3e42e3cd-4201-4a55-bd1d-2c5c41ae9242","Exchange":"BTC-ETH","Type":"LIMIT_BUY","Quantity":0.45567428,"QuantityRemaining":0.00000000,"Limit":0.04400175,"Reserved":0.02005046,"ReserveRemaining":0.02005041,"CommissionReserved":0.00005012,"CommissionReserveRemaining":0.00000000,"CommissionPaid":0.00005012,"Price":0.02005041,"PricePerUnit":0.04400162000000000000,"Opened":"2017-11-30T10:30:51.647","Closed":"2017-11-30T10:30:52.677","IsOpen":false,"Sentinel":"14f8186b-b9ac-49d9-ac84-caea192f47cf","CancelInitiated":false,"ImmediateOrCancel":false,"IsConditional":false,"Condition":"NONE","ConditionTarget":null}}
2017-11-30 11:30:52,290 INFO [default] Trade id: 3e42e3cd-4201-4a55-bd1d-2c5c41ae9242 - 1512037849 - Price: 0.04400175
2017-11-30 11:30:52,291 INFO [default] Type: buy Price: 0.04400175 Amount: 0.45567428
2017-11-30 11:30:52,293 INFO [default] Quantity: 0.45567427999999999 QRemaining: 0 Commission: 0.00005013
2017-11-30 11:30:52,293 INFO [default] BrokerBuy OUT
2017-11-30 11:30:52,295 INFO [default] BrokerAccount IN
2017-11-30 11:30:52,296 INFO [default] apisign: MYKEYS
2017-11-30 11:30:52,550 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.02228637,"Available":0.02228637,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 11:30:52,550 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 11:30:52,550 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 11:30:52,577 INFO [default] {"success":true,"message":"","result":{"Bid":9800.00000000,"Ask":9800.04999998,"Last":9800.00000000}}
2017-11-30 11:30:52,577 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 11:30:52,577 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 11:30:52,577 INFO [default] BrokerAccount OUT
2017-11-30 11:30:52,852 INFO [default] BrokerTime IN
2017-11-30 11:30:52,852 INFO [default] BrokerTime OUT
2017-11-30 11:30:52,852 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:30:52,876 INFO [default] Asset Details: BTC-ETH Price: 0.04400176 Spread: 0.00000001
2017-11-30 11:30:52,876 INFO [default] BrokerAsset OUT
2017-11-30 11:30:53,150 INFO [default] BrokerTime IN
2017-11-30 11:30:53,150 INFO [default] BrokerTime OUT
2017-11-30 11:30:53,150 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 11:30:53,177 INFO [default] Asset Details: BTC-ETH Price: 0.04400176 Spread: 0.00000001
2017-11-30 11:30:53,177 INFO [default] BrokerAsset OUT
2017-11-30 11:30:53,451 INFO [default] BrokerTime IN
2017-11-30 11:30:53,451 INFO [default] BrokerTime OUT

[...]

2017-11-30 12:00:00,870 INFO [default] Asset Details: BTC-ETH Price: 0.04425000 Spread: 0.00010000
2017-11-30 12:00:00,870 INFO [default] BrokerAsset OUT
2017-11-30 12:00:01,144 INFO [default] BrokerTime IN
2017-11-30 12:00:01,144 INFO [default] BrokerTime OUT
2017-11-30 12:00:01,144 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:01,177 INFO [default] Asset Details: BTC-ETH Price: 0.04425000 Spread: 0.00010000 MinAmount: 0.02278371 PipCost: 0.00000215
2017-11-30 12:00:01,177 INFO [default] BrokerAsset OUT
2017-11-30 12:00:01,180 INFO [default] BrokerBuy IN
2017-11-30 12:00:01,180 INFO [default] BrokerBuy Params: BTC-ETH Amount:-20 StopDist:-1.00000000
2017-11-30 12:00:01,215 INFO [default] market=BTC-ETH&quantity=0.45567428&rate=0.04415000
2017-11-30 12:00:01,215 INFO [default] apisign: MYKEYS
2017-11-30 12:00:01,408 INFO [default] {"success":true,"message":"","result":{"uuid":"0ee0d20c-7a32-4718-ad68-c49765e4aade"}}
2017-11-30 12:00:03,409 INFO [default] apisign: MYKEYS
2017-11-30 12:00:03,568 INFO [default] {"success":true,"message":"","result":{"AccountId":null,"OrderUuid":"0ee0d20c-7a32-4718-ad68-c49765e4aade","Exchange":"BTC-ETH","Type":"LIMIT_SELL","Quantity":0.45567428,"QuantityRemaining":0.00000000,"Limit":0.04415000,"Reserved":0.45567428,"ReserveRemaining":0.45567428,"CommissionReserved":0.00000000,"CommissionReserveRemaining":0.00000000,"CommissionPaid":0.00005029,"Price":0.02011801,"PricePerUnit":0.04414997000000000000,"Opened":"2017-11-30T11:00:02.973","Closed":"2017-11-30T11:00:04.57","IsOpen":false,"Sentinel":"66e0cd06-9f91-499e-9886-4e06e67036c7","CancelInitiated":false,"ImmediateOrCancel":false,"IsConditional":false,"Condition":"NONE","ConditionTarget":null}}
2017-11-30 12:00:03,568 INFO [default] Trade id: 0ee0d20c-7a32-4718-ad68-c49765e4aade - 1512039601 - Price: 0.04415000
2017-11-30 12:00:03,569 INFO [default] Type: sell Price: 0.04415000 Amount: 0.45567428
2017-11-30 12:00:03,570 INFO [default] Quantity: 0.45567427999999999 QRemaining: 0 Commission: 0.00005030
2017-11-30 12:00:03,571 INFO [default] BrokerBuy OUT
2017-11-30 12:00:03,573 INFO [default] BrokerAccount IN
2017-11-30 12:00:03,573 INFO [default] apisign: MYKEYS
2017-11-30 12:00:03,739 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 12:00:03,739 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 12:00:03,739 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 12:00:03,763 INFO [default] {"success":true,"message":"","result":{"Bid":9501.00000001,"Ask":9501.58880834,"Last":9501.00000000}}
2017-11-30 12:00:03,763 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 12:00:03,763 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 12:00:03,763 INFO [default] BrokerAccount OUT
2017-11-30 12:00:03,764 INFO [default] BrokerTime IN
2017-11-30 12:00:03,764 INFO [default] BrokerTime OUT
2017-11-30 12:00:03,764 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:03,951 INFO [default] Asset Details: BTC-ETH Price: 0.04425000 Spread: 0.00010000
2017-11-30 12:00:03,951 INFO [default] BrokerAsset OUT
2017-11-30 12:00:03,952 INFO [default] BrokerAccount IN
2017-11-30 12:00:03,952 INFO [default] apisign: MYKEYS
2017-11-30 12:00:03,952 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 12:00:03,952 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 12:00:03,952 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 12:00:03,973 INFO [default] {"success":true,"message":"","result":{"Bid":9501.00000001,"Ask":9501.58880834,"Last":9501.00000000}}
2017-11-30 12:00:03,973 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 12:00:03,973 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 12:00:03,973 INFO [default] BrokerAccount OUT
2017-11-30 12:00:04,247 INFO [default] BrokerTime IN
2017-11-30 12:00:04,247 INFO [default] BrokerTime OUT
2017-11-30 12:00:04,247 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:04,263 INFO [default] Asset Details: BTC-ETH Price: 0.04425000 Spread: 0.00010000
2017-11-30 12:00:04,263 INFO [default] BrokerAsset OUT

[...]

2017-11-30 12:00:33,396 INFO [default] Asset Details: BTC-ETH Price: 0.04425000 Spread: 0.00010000
2017-11-30 12:00:33,396 INFO [default] BrokerAsset OUT
2017-11-30 12:00:33,671 INFO [default] BrokerTime IN
2017-11-30 12:00:33,671 INFO [default] BrokerTime OUT
2017-11-30 12:00:33,671 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:33,849 INFO [default] Asset Details: BTC-ETH Price: 0.04421666 Spread: 0.00006666
2017-11-30 12:00:33,849 INFO [default] BrokerAsset OUT
2017-11-30 12:00:33,850 INFO [default] BrokerBuy IN
2017-11-30 12:00:33,850 INFO [default] BrokerBuy Params: BTC-ETH Amount:-20 StopDist:0.00000000
2017-11-30 12:00:33,885 INFO [default] market=BTC-ETH&quantity=0.45567428&rate=0.04413660
2017-11-30 12:00:33,886 INFO [default] apisign: MYKEYS
2017-11-30 12:00:34,053 INFO [default] {"success":false,"message":"INSUFFICIENT_FUNDS","result":null}
2017-11-30 12:00:34,053 ERROR [default] INSUFFICIENT_FUNDS
2017-11-30 12:00:34,055 ERROR [default] market/selllimit
2017-11-30 12:00:34,055 ERROR [default] market=BTC-ETH&quantity=0.45567428&rate=0.04413660
2017-11-30 12:00:34,055 ERROR [default] market/selllimit - Error Parsing JSon
2017-11-30 12:00:34,056 ERROR [default] Error calling API BrokerBuy
2017-11-30 12:00:34,057 INFO [default] BrokerBuy OUT
2017-11-30 12:00:34,058 INFO [default] BrokerAccount IN
2017-11-30 12:00:34,058 INFO [default] apisign: MYKEYS
2017-11-30 12:00:34,232 INFO [default] {"success":true,"message":"","result":{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-11-30 12:00:34,232 INFO [default] CallGetAccBaseCurrExchRate IN
2017-11-30 12:00:34,232 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-11-30 12:00:34,315 INFO [default] {"success":true,"message":"","result":{"Bid":9501.00000000,"Ask":9501.58880831,"Last":9501.00000000}}
2017-11-30 12:00:34,315 INFO [default] GetAccBaseCurrExchRate OUT
2017-11-30 12:00:34,315 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-11-30 12:00:34,315 INFO [default] BrokerAccount OUT
2017-11-30 12:00:34,590 INFO [default] BrokerTime IN
2017-11-30 12:00:34,590 INFO [default] BrokerTime OUT
2017-11-30 12:00:34,590 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:34,797 INFO [default] Asset Details: BTC-ETH Price: 0.04421666 Spread: 0.00006666
2017-11-30 12:00:34,797 INFO [default] BrokerAsset OUT
2017-11-30 12:00:35,071 INFO [default] BrokerTime IN
2017-11-30 12:00:35,071 INFO [default] BrokerTime OUT
2017-11-30 12:00:35,071 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-11-30 12:00:35,099 INFO [default] Asset Details: BTC-ETH Price: 0.04421666 Spread: 0.00006666
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 04:10

Hi,
I need to implement the changes that Bittrex put in place:
https://support.bittrex.com/hc/en-us/articles/115003004171

THis should fix the issue outlined above too,
I'll do it as soon as I have some free time next week.
Cheers
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 04:58

Hi Cheulmen,
I did the changes. Please get latest dll from GitHub.

please also increase the MinOrderSize in zorro ini.
MinOrderSize="200000", as Bittrex increased it to 100k
see explaination in the readme.txt

Please try first with 50% amount .
You can increase later is no issue.
THanks for doing some testing
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 16:50

No, thank you for the plugin!

OK great, I'm continuing with the testing, It is working now again with half of the stack, Lots=20. Lets see what happens.
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 17:42

Hello Vinsom,

So far I am able to play with some strategies almost succesfully with your plugin.
The only things left I would say is the calculation of the spread:

the plugin log display:
2017-12-03 18:28:37,979 INFO [default] BrokerAsset IN Symbol: XLM/BTC
2017-12-03 18:28:38,385 INFO [default] Asset Details: BTC-XLM Price: 0.00000792 Spread: 0.00000001

so Spread is 1 satoshis and it is correct.

But when I display it in Zorro :

Close Long XLM/BTC
Asset : XLM/BTC
Commission : 0.00000002
Commission cost : -0.00001000
pip cost : 0.00000126
Lots : 2.00000000
spread : 0.00001000
spread cost : -0.00252207
LotAmount : 205.00000000
BalanceLong : -0.00253207
WinTotal : 0.00000000
[Sun 17-12-03 17:38] 0 -0 +0 0.00000794/0.00000794.00000794/0.00000794

The spread is set to 1000 satoshis, causing a huge spread cost and consequently a huge loss.
I do not overwrite it with Zorro so I can't tell if it is plugin related or Zorro related. Please let me know what you think when you will have some time.

Regards, Johan
Posted By: Cheulmen

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 20:01

It is happening again, it doesn't make the first trade:

Click to reveal..
2017-12-03 18:55:14,307 INFO [default] CallGetAccBaseCurrExchRate IN
2017-12-03 18:55:14,307 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-12-03 18:55:15,479 INFO [default] {"success":true,"message":"","result":

{"Bid":11646.00000001,"Ask":11649.94499999,"Last":11649.94499999}}
2017-12-03 18:55:15,479 INFO [default] GetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,479 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,479 INFO [default] BrokerAccount IN
2017-12-03 18:55:15,479 INFO [default] apisign:MYKEYS
2017-12-03 18:55:15,651 INFO [default] {"success":true,"message":"","result":

{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-12-03 18:55:15,651 INFO [default] CallGetAccBaseCurrExchRate IN
2017-12-03 18:55:15,651 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-12-03 18:55:15,666 INFO [default] {"success":true,"message":"","result":

{"Bid":11646.00000001,"Ask":11649.94499999,"Last":11649.94499999}}
2017-12-03 18:55:15,666 INFO [default] GetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,666 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,666 INFO [default] BrokerAccount OUT
2017-12-03 18:55:15,666 INFO [default] BrokerLogin OUT
2017-12-03 18:55:15,666 INFO [default] BrokerTime IN
2017-12-03 18:55:15,666 INFO [default] BrokerTime OUT
2017-12-03 18:55:15,682 INFO [default] BrokerAccount IN
2017-12-03 18:55:15,682 INFO [default] apisign:MYKEYS
2017-12-03 18:55:15,682 INFO [default] {"success":true,"message":"","result":

{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-12-03 18:55:15,682 INFO [default] CallGetAccBaseCurrExchRate IN
2017-12-03 18:55:15,682 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-12-03 18:55:15,713 INFO [default] {"success":true,"message":"","result":

{"Bid":11646.00000001,"Ask":11649.94499999,"Last":11649.94499999}}
2017-12-03 18:55:15,713 INFO [default] GetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,713 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-12-03 18:55:15,713 INFO [default] BrokerAccount OUT
2017-12-03 18:55:15,713 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 18:55:15,713 INFO [default] CanSubscribe IN
2017-12-03 18:55:15,776 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 18:55:15,807 INFO [default] Asset Details: BTC-ETH Price: 0.04087400 Spread: 0.00001400 MinAmount: 0.04894763 PipCost:

0.00000570
2017-12-03 18:55:15,807 INFO [default] BrokerAsset OUT
2017-12-03 18:55:15,822 INFO [default] BrokerHistory2 IN
2017-12-03 18:55:15,822 INFO [default] Params BTC-ETH Start : 11/05/17 22:25:15 End : 12/03/17 17:55:15 nTickMinutes : 5 nTicks :

300
2017-12-03 18:55:15,822 INFO [default] BrokerHistory3 IN
2017-12-03 18:55:15,994 INFO [default] return nTick: 28
2017-12-03 18:55:15,994 INFO [default] BrokerHistory3 OUT
2017-12-03 18:55:15,994 INFO [default] BrokerHistory2 IN
2017-12-03 18:55:15,994 INFO [default] Params BTC-ETH Start : 11/05/17 22:25:15 End : 11/06/17 00:00:00 nTickMinutes : 5 nTicks :

300
2017-12-03 18:55:15,994 INFO [default] BrokerHistory3 IN
2017-12-03 18:55:16,156 INFO [default] return nTick: 1
2017-12-03 18:55:16,156 INFO [default] BrokerHistory3 OUT
2017-12-03 18:55:16,182 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 18:55:16,213 INFO [default] Asset Details: BTC-ETH Price: 0.04087400 Spread: 0.00001400 MinAmount: 0.04894763 PipCost:

0.00000570
2017-12-03 18:55:16,213 INFO [default] BrokerAsset OUT
2017-12-03 18:55:16,276 INFO [default] BrokerTime IN
2017-12-03 18:55:16,276 INFO [default] BrokerTime OUT
2017-12-03 18:55:16,276 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 18:55:16,307 INFO [default] Asset Details: BTC-ETH Price: 0.04087400 Spread: 0.00001400
2017-12-03 18:55:16,307 INFO [default] BrokerAsset OUT
2017-12-03 18:55:16,307 INFO [default] BrokerAccount IN
2017-12-03 18:55:16,307 INFO [default] apisign: MYKEYS
2017-12-03 18:55:16,307 INFO [default] {"success":true,"message":"","result":

{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-12-03 18:55:16,307 INFO [default] CallGetAccBaseCurrExchRate IN
2017-12-03 18:55:16,307 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-12-03 18:55:16,354 INFO [default] {"success":true,"message":"","result":

{"Bid":11646.00000001,"Ask":11649.94499999,"Last":11649.94499999}}
2017-12-03 18:55:16,354 INFO [default] GetAccBaseCurrExchRate OUT
2017-12-03 18:55:16,354 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-12-03 18:55:16,354 INFO [default] BrokerAccount OUT
2017-12-03 18:55:16,760 INFO [default] BrokerTime IN
2017-12-03 18:55:16,760 INFO [default] BrokerTime OUT
2017-12-03 18:55:16,760 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 18:55:16,776 INFO [default] Asset Details: BTC-ETH Price: 0.04087400 Spread: 0.00001400

[...]

2017-12-03 19:12:41,651 INFO [default] BrokerAsset OUT
2017-12-03 19:12:42,071 INFO [default] BrokerTime IN
2017-12-03 19:12:42,071 INFO [default] BrokerTime OUT
2017-12-03 19:12:42,071 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 19:12:42,290 INFO [default] Asset Details: BTC-ETH Price: 0.04086050 Spread: 0.00000004
2017-12-03 19:12:42,290 INFO [default] BrokerAsset OUT
2017-12-03 19:12:42,290 INFO [default] BrokerBuy IN
2017-12-03 19:12:42,290 INFO [default] BrokerBuy Params: BTC-ETH Amount:-20 StopDist:0.00000000
2017-12-03 19:12:42,540 INFO [default] market=BTC-ETH&quantity=0.97895252&rate=0.04086046
2017-12-03 19:12:42,540 INFO [default] apisign: MYKEYS
2017-12-03 19:12:42,759 INFO [default] {"success":false,"message":"INSUFFICIENT_FUNDS","result":null}
2017-12-03 19:12:42,759 ERROR [default] INSUFFICIENT_FUNDS
2017-12-03 19:12:42,759 ERROR [default] market/selllimit
2017-12-03 19:12:42,759 ERROR [default] market=BTC-ETH&quantity=0.97895252&rate=0.04086046
2017-12-03 19:12:42,759 ERROR [default] market/selllimit - Error Parsing JSon
2017-12-03 19:12:42,759 ERROR [default] Error calling API BrokerBuy
2017-12-03 19:12:42,759 INFO [default] BrokerBuy OUT
2017-12-03 19:12:42,759 INFO [default] BrokerAccount IN
2017-12-03 19:12:42,759 INFO [default] apisign: MYKEYS
2017-12-03 19:12:42,946 INFO [default] {"success":true,"message":"","result":

{"Currency":"BTC","Balance":0.04235409,"Available":0.04235409,"Pending":0.00000000,"CryptoAddress":null}}
2017-12-03 19:12:42,946 INFO [default] CallGetAccBaseCurrExchRate IN
2017-12-03 19:12:42,946 INFO [default] GetAccBaseCurrExchRate IN Symbol: USDT-BTC
2017-12-03 19:12:43,024 INFO [default] {"success":true,"message":"","result":

{"Bid":11670.00000000,"Ask":11684.00000000,"Last":11670.00000000}}
2017-12-03 19:12:43,024 INFO [default] GetAccBaseCurrExchRate OUT
2017-12-03 19:12:43,024 INFO [default] CallGetAccBaseCurrExchRate OUT
2017-12-03 19:12:43,024 INFO [default] BrokerAccount OUT
2017-12-03 19:12:43,431 INFO [default] BrokerTime IN
2017-12-03 19:12:43,431 INFO [default] BrokerTime OUT
2017-12-03 19:12:43,431 INFO [default] BrokerAsset IN Symbol: ETH/BTC
2017-12-03 19:12:43,727 INFO [default] Asset Details: BTC-ETH Price: 0.04086050 Spread: 0.00000004
2017-12-03 19:12:43,727 INFO [default] BrokerAsset OUT

Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 21:15

Hi Cheulmen,
So from the log you posted I see you are trying to sell ETH 0.97895252.
Can you please post what is your ETH balance ?
The one logged is converted to BTC, so I can't tell from the log file.

The error insufficient fund is returned from the API broker call, so if the plugin sends correct data to the API (quantity=0.97895252&rate=0.04086046) not sure what else could be.

Maybe another test you can do is try to sell ETH 0.97895252 at a rate out of the money (so the order doesn't get filled) on Bittrex web site and see if you get the same error or not.

I don't have funds on Bittrex right now. I will do a test as soon as I have some.

Cheers
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 12/03/17 21:19

Hi JohanAU,
If you see the spread calculated correctly in the log file, that is the value sent to Zorro in the plugin.
I can't tell what happen afterwards and why the spread doesn't match.
We should ask someone in the Zorro team for more details.

Please also get latest dll. I made some changes outlined in a previous post.
Are you doing back testing crypto strategies or live ?

Cheers
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 12/04/17 17:46

Hi Vinsom,
Thanks for the update,

I have played with your latest plugin update and got a very messy results laugh

2017-12-04 18:41:03,316 INFO [default] Asset Details: BTC-BAT Price: 0.00001719 Spread: 0.00000012 MinAmount: -3.00000000 PipCost: -0.00000003
2017-12-04 18:41:03,316 INFO [default] BrokerAsset OUT
2017-12-04 18:41:03,316 INFO [default] BrokerAsset IN Symbol: FUN/BTC
2017-12-04 18:41:03,567 INFO [default] Asset Details: BTC-FUN Price: 0.00000252 Spread: 0.00000001 MinAmount: -3.00000000 PipCost: -0.00000003
2017-12-04 18:41:03,567 INFO [default] BrokerAsset OUT
2017-12-04 18:41:03,567 INFO [default] BrokerAsset IN Symbol: MCO/BTC
2017-12-04 18:41:03,926 INFO [default] Asset Details: BTC-MCO Price: 0.00097603 Spread: 0.00000203 MinAmount: 1.02456000 PipCost: 0.00000001
2017-12-04 18:41:03,926 INFO [default] BrokerAsset OUT
2017-12-04 18:41:03,926 INFO [default] BrokerAsset IN Symbol: MTL/BTC
2017-12-04 18:41:04,145 INFO [default] Asset Details: BTC-MTL Price: 0.00058320 Spread: 0.00000170 MinAmount: 1.72417000 PipCost: 0.00000002
2017-12-04 18:41:04,145 INFO [default] BrokerAsset OUT
2017-12-04 18:41:04,145 INFO [default] BrokerAsset IN Symbol: RLC/BTC
2017-12-04 18:41:05,083 INFO [default] Asset Details: BTC-RLC Price: 0.00005125 Spread: 0.00000037 MinAmount: -3.00000000 PipCost: -0.00000003
2017-12-04 18:41:05,083 INFO [default] BrokerAsset OUT
2017-12-04 18:41:05,083 INFO [default] BrokerAsset IN Symbol: TRST/BTC
2017-12-04 18:41:05,239 INFO [default] Asset Details: BTC-TRST Price: 0.00003969 Spread: 0.00000030 MinAmount: -3.00000000 PipCost: -0.00000003
2017-12-04 18:41:05,239 INFO [default] BrokerAsset OUT
2017-12-04 18:41:05,239 INFO [default] BrokerAsset IN Symbol: XLM/BTC
2017-12-04 18:41:05,473 INFO [default] Asset Details: BTC-XLM Price: 0.00000815 Spread: 0.00000002 MinAmount: -3.00000000 PipCost: -0.00000003

negative MinAmout and pipCost !
I am playing live with some very basic strategies for now and using only Minimum lot size.
Posted By: vinsom

Re: BitTrex Plugin (Crypto Trading) - 12/04/17 20:05

Sorry guys,
I forgot to test it also with small value pairs.
Please get latest.

Cheers
Posted By: JohanAu

Re: BitTrex Plugin (Crypto Trading) - 12/05/17 08:53

Hello Vinsom,

thanks for the update. I have also a day job and it is complicated to test so I can't imagine what it takes to develop.
I need to learn how to code the plugin so I can help.
Posted By: beannt

Re: BitTrex Plugin (Crypto Trading) - 05/31/18 11:31

Hi,

I am facing "Error 055: No bars generated" using Z10 with Bittrex plugin, Zorro version is 1.83.2

Z10
Login 0 Bittrex 1.1.. at UTC 05-31 11:23
Z10.11: H 4 W 2 V 1
V 1.832 on Thu 18-05-31 18:23:05 (Zorro S Subscription)
Error 055: No bars generated

To rebalance click [Test]!
Logout.. ok

Can any one help ? Thank you.
Posted By: AndrewAMD

Re: BitTrex Plugin (Crypto Trading) - 05/31/18 13:50

Originally Posted By: beannt
I am facing "Error 055: No bars generated" using Z10 with Bittrex plugin
This has nothing to do with the Bittrex plugin. Your problem is addressed here under your respective error code:
http://zorro-trader.com/manual/en/errors.htm

Also, read this:
http://www.zorro-trader.com/manual/en/zsystems.htm

The manual is your friend! laugh
Posted By: beannt

Re: BitTrex Plugin (Crypto Trading) - 06/01/18 06:49

Thanks, I figured it out. Since English is not my native language, I missed some point.

For anyone struggling as me:
Z10 is not enter trade itself, instead it's just an suggestion. And we must do the buy/sell on the exchanges
Posted By: jrath

Re: BitTrex Plugin (Crypto Trading) - 06/03/18 23:45

Thanks for programming the bittrex plugin. For me I had a different version of visual studio installed than the plugin expected. 140 vs 120. I was able to clone the github repo and recompile. Then it worked. Just wanted to share. Error was 'can't connect' ...

Attached picture Snip.PNG
Posted By: 3DCat

Re: BitTrex Plugin (Crypto Trading) - 08/15/18 19:25

Hi guys, im back:)

i was *hoping* to get access to Bittrex Orderbookdata via the great plugin which is now part of Zorro(S). However it wouldn't work for me. Is get_book implemented as described in the manual? orderUpdate always returns 0 for me.

Thanks
Posted By: 3DCat

Re: BitTrex Plugin (Crypto Trading) - 08/24/18 10:16

Thank you very much, it worked in the new version. I'm trying to harvest t2 Data now for doing a backtest.
© 2020 lite-C Forums