Bitcoin Forum
June 21, 2024, 03:30:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Services / Yet Another trade Bot ? on: February 18, 2020, 10:19:35 AM

Look, you wan't to be able to SELL your bitcoins at for example 9000$ if price drops ?
I wrote script which works on kraken exchange platform API.
Actual rate is around 10200$ (Sat Feb 15 12:10:40 CET 2020)
You want to keep your bitcoins for now, but what if price drops and loose 3000$ in a quarter, will you be able to order to sell right now ?
Wouldn't you want to be able to sell at 9000$ for example without being 24h a day in front of your screens ?

Can you order to SELL at 9000$ if actual rate is 10200$ ? (ok it is not impossible but you would loose 1200$ don't you ?)

How to be able to do so, if and only if price drops ?
There are advanced options like stop loss or take profit. Yeah ... did you see what happenned with XRP/USD on bitmex ?


"WTF. FUCK YOU BITMEX. This is really not okay! My stop didnīt trigger and my entire bitmex account is fucking gone. Fuck you! pic.twitter dot com/WHXbJoiTvL

— Marc de Koning (@Koning_Marc) February 13, 2020"



NO FUN !!!

With my scripts, orders are market type, it means that your funds are still available, you do not have to cancel order to run another one, for example selling at 13000$


Script written in python to run in CLI windows / macOS / linux (don't worry it is easy)

$ drop_sell
Usage : drop_sell <pair> <volume> <limit price> (randomtime <min> <max>)
pair : XXBTZUSD
volume : 10
limit price : 9000
time delay between price check :
min (default 20 sec.) : 5
max : 5.5
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.33 sec. (12:19:10)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.49 sec. (12:19:16)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.09 sec. (12:19:22)
2020-02-15 12:19:16
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.48 sec. (12:19:27)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.41 sec. (12:19:33)
...

This is not an advertise for the exchange platform used here, but for API method with CLI and the way to do it yourself.

As you can this script is a "stop loss" method.
I have also written a "take profit" one.
And some others with differents algorithms :


I take an example from June 2019. I made around 7 EUR per tx with a volume of 0.019 BTC.
Someday there are more than 10 tx. Some other, the program places sell price upper the rate of the day and there is less tx (trading risks...). In this case we run another "instance" with differents parameters.
With 1 bitcoin and carefully, it is possible to earn 700EUR to 10 times more a day !


$ ./buyfirst
Usage : ./buyfirst <pair> <volume> <standard deviation> (randomtime <min> <max>)
$ ./buyfirst XXBTZEUR 0.0198 132 120 1400


In this example, first order was to buy 0.0198 BTC   132EUR lower than actual rate (at runtime).
Following order will be to sell 0.0198 BTC 132EUR upper than "begin price" (rate at runtime of the script).

Check price randomly between 120 sec. and 23 min. (1400 sec.) (2 last parameters)
We can set 0.5 to 0.501 sec. if relevant ...

We receive an email with last transaction details.


OSZBNZ-VYO5N-E4C4PR  opened 2019-06-22 14:36:43  closed 2019-06-22 14:36:43 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : buy
      order : buy 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561214203.35
   trades : TIVM4H-DO4NA-CVCGXK
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9120.6
   cost : 180.5
   reason : None
   userref : 0




After this, next bid was to sell 0.0198 BTC   132EUR upper than "begin price" :


OOA4UG-UIU42-CYB3AE  opened 2019-06-22 15:00:07  closed 2019-06-22 15:00:07 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : sell
      order : sell 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561215607.56
   trades : TGNJHW-DUPP5-JUWNM6
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9461.8
   cost : 187.3
   reason : None
   userref : 0



When a "loop" (first we buy, then sell) is done, volume can be increased, and a new "begin price" is set (rate at runtime of the new "loop").

Here (June 16) I bought at 9120.6 EUR (at 14:36 UTC) and sold at 9461.8 (at 15:00 UTC)

This is just an example but you check these tx on kraken.

Another script keep this same logic but does "sell first".
I wrote an algorithm which does buy or sell now (when we run the script) :
If we do "buy", we bet on price will increase and sell later.
If we do "sell", we bet on price will decrease and buy later

$ ./tradenow
Usage : ./tradenow <buy(now)|sell(now)> <pair> <volume> <standard deviation> (randomtime delay <min> <max>)


You need an account on this platform and to create an API key. Paste it in the same folder than scripts and run.

$ ls
balances          config.txt       drop_sell.py    kraken.key       last_bids.py    pairs_list.py  rise_buy.py     sweep_now.py  tradeto.py
buyfirst.py        get_balance.py  kraken.key.old   last_orders.py     sellfirst.py    trade_at.py 
closed_orders.py  dest.txt        kraken.key.save  mykraken      show_orders.py  tradenow.py
$

Trade bots with differents algorithms.
You decide yourself which strategy you will run, you can combine several.


Questions / contact / support : zeronomicoin at gmail dot com (GPG pubkey 0x641CE2E33060003C if you want)

2  Economy / Trading Discussion / Re: Kraken API script for sale on: February 18, 2020, 10:10:05 AM

Hi princerepon, you're absolutely right, these are trade bots with differents algorithms.
You decide yourself which strategy you will run, you can combine several. You're the master of your game (ok it's about money).
And you're right too, let's move to  Marketplace-> Service  as i propose a service for sell.
3  Economy / Trading Discussion / Re: Kraken API script for sale on: February 16, 2020, 12:49:12 PM
As you have seen this script is a "stop loss" method.
I have also written a "take profit" one.
And some others with differents algorithms :


I take an example from June 2019. I made around 7 EUR per tx with a volume of 0.019 BTC.
Someday there are more than 10 tx. Some other, the program places sell price upper the rate of the day and there is less tx (trading risks...). In this case we run another "instance" with differents parameters.
With 1 bitcoin and carefully, it is possible to earn 700EUR to 10 times more a day !


$ ./buyfirst
Usage : ./buyfirst <pair> <volume> <standard deviation> (randomtime <min> <max>)
$ ./buyfirst XXBTZEUR 0.0198 132 120 1400


In this example, first order was to buy 0.0198 BTC   132EUR lower than actual rate (at runtime).
Following order will be to sell 0.0198 BTC 132EUR upper than "begin price" (rate at runtime of the script).

Check price randomly between 120 sec. and 23 min. (1400 sec.) (2 last parameters)
We can set 0.5 to 0.501 sec. if relevant ...

We receive an email with last transaction details.


OSZBNZ-VYO5N-E4C4PR  opened 2019-06-22 14:36:43  closed 2019-06-22 14:36:43 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : buy
      order : buy 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561214203.35
   trades : TIVM4H-DO4NA-CVCGXK
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9120.6
   cost : 180.5
   reason : None
   userref : 0




After this, next bid was to sell 0.0198 BTC   132EUR upper than "begin price" :


OOA4UG-UIU42-CYB3AE  opened 2019-06-22 15:00:07  closed 2019-06-22 15:00:07 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : sell
      order : sell 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561215607.56
   trades : TGNJHW-DUPP5-JUWNM6
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9461.8
   cost : 187.3
   reason : None
   userref : 0



When a "loop" (first we buy, then sell) is done, volume can be increased, and a new "begin price" is set (rate at runtime of the new "loop").

Here (June 16) I bought at 9120.6 EUR (at 14:36 UTC) and sold at 9461.8 (at 15:00 UTC)

This is just an example but you check these tx on kraken.

Another script keep this same logic but does "sell first".
I wrote an algorithm which does buy or sell now (when we run the script) :
If we do "buy", we bet on price will increase and sell later.
If we do "sell", we bet on price will decrease and buy later

$ ./tradenow
Usage : ./tradenow <buy(now)|sell(now)> <pair> <volume> <standard deviation> (randomtime delay <min> <max>)


You need an account on this platform and to create an API key. Paste it in the same folder than scripts and run.

$ ls
balances          config.txt       drop_sell.py    kraken.key       last_bids.py    pairs_list.py  rise_buy.py     sweep_now.py  tradeto.py
buyfirst.py        get_balance.py  kraken.key.old   last_orders.py     sellfirst.py    trade_at.py  
closed_orders.py  dest.txt        kraken.key.save  mykraken      show_orders.py  tradenow.py
$




A good way would be to meet each other then you could see by your own.




4  Economy / Trading Discussion / Kraken API script for sale on: February 15, 2020, 11:56:54 AM
Look, you wan't to be able to SELL your bitcoins at for example 9000$ if price drops ?
I wrote script which works on kraken exchange platform API.
Actual rate is around 10200$ (Sat Feb 15 12:10:40 CET 2020)
You want to keep your bitcoins for now, but what if price drops and loose 3000$ in a quarter, will you be able to order to sell right now ?
Wouldn't you want to be able to sell at 9000$ for example without being 24h a day in front of your screens ?

Can you order to SELL at 9000$ if actual rate is 10200$ ? (ok it is not impossible but you would loose 1200$ don't you ?)

How to be able to do so, if and only if price drops ?
There are advanced options like stop loss or take profit. Yeah ... did you see what happenned with XRP/USD on bitmex ?


"WTF. FUCK YOU BITMEX. This is really not okay! My stop didnīt trigger and my entire bitmex account is fucking gone. Fuck you! pic.twitter dot com/WHXbJoiTvL

— Marc de Koning (@Koning_Marc) February 13, 2020"



NO FUN !!!

With my scripts, orders are market type, it means that your funds are still available, you do not have to cancel order to run another one, for example selling at 13000$


Script written in python to run in CLI windows / macOS / linux (don't worry it is easy)

$ drop_sell
Usage : drop_sell <pair> <volume> <limit price> (randomtime <min> <max>)
pair : XXBTZUSD
volume : 10
limit price : 9000
time delay between price check :
min (default 20 sec.) : 5
max : 5.5
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.33 sec. (12:19:10)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.49 sec. (12:19:16)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.09 sec. (12:19:22)
2020-02-15 12:19:16
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.48 sec. (12:19:27)
10221.2 sell at 9000
next bid : 10 at 9000 USD in 5.41 sec. (12:19:33)
...

This is not an advertise for the exchange platform used here, but for API method with CLI and the way to do it yourself.

contact and support : zeronomicoin at gmail dot com (GPG pubkey 0x641CE2E33060003C if you want)
5  Economy / Digital goods / Kraken API scripts for sale on: December 15, 2019, 12:41:34 PM
Kraken API scripts for sale
---------------------------


In June I made around 7 EUR per tx with a volume of 0.019 BTC.
Someday there are more than 10 tx. Some other, the program places sell price upper the rate of the day and there is no tx (HFT risks...).
With 1 bitcoin and carefully, i would very easily earn 700EUR a day !


$ ./buyfirst
Usage : ./buyfirst <pair> <volume> <standard deviation> (randomtime <min> <max>)
$ ./buyfirst XXBTZEUR 0.0198 132 120 1400


First order is to buy 0.0198 BTC 132EUR lower than actual rate (at runtime).
Following order will be to sell 0.0198 BTC 132EUR upper than "begin price" (rate at runtime of the script).

Check price randomly between 120 sec. and 23 min. (1400 sec.) (2 last parameters)
We can set 0.5 to 0.501 sec. if relevant ...

We receive an email with last transaction details.


OSZBNZ-VYO5N-E4C4PR opened 2019-06-22 14:36:43 closed 2019-06-22 14:36:43 (UTC)
status : closed
fee : 0.4
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : buy
order : buy 0.01980000 XBTEUR @ market
vol : 0.01980000
closetm : 1561214203.35
trades : TIVM4H-DO4NA-CVCGXK
misc :
starttm : 0
limitprice : 0.00000
price : 9120.6
cost : 180.5
reason : None
userref : 0




After this, next bid was to sell 0.0198 BTC 132EUR upper than "begin price" :


OOA4UG-UIU42-CYB3AE opened 2019-06-22 15:00:07 closed 2019-06-22 15:00:07 (UTC)
status : closed
fee : 0.4
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : sell
order : sell 0.01980000 XBTEUR @ market
vol : 0.01980000
closetm : 1561215607.56
trades : TGNJHW-DUPP5-JUWNM6
misc :
starttm : 0
limitprice : 0.00000
price : 9461.8
cost : 187.3
reason : None
userref : 0



When a "loop" (first we buy, then sell) is done, volume can be increased, and a new "begin price" is set (rate at runtime of the new "loop").

Here (June 16) I bought at 9120.6 EUR (at 14:36 UTC) and sold at 9461.8 (at 15:00 UTC)



It checks market price, in next one we will buy if price is lower than 9416.7 EUR
You see ?


This script exits after ordered trade :

$ ./trade_at buy XXBTZEUR 0.03951 140 120 1400


BEGIN PRICE 9556.7EUR
Volume 0.03951

9556.7 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 994.49 sec. (11:51:40)
9558.1 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1378.85 sec. (12:14:40)
9560.9 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1193.14 sec. (12:34:33)
2019-07-16 12:14:40
9544.8 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 869.70 sec. (12:49:03)

... <snip> ...

9470.1 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 679.57 sec. (14:47:04)
9495.8 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 733.52 sec. (14:59:18)
9385.9 buy at 9416.7
{'error': [], 'result': {'descr': {'order': 'buy 0.03951000 XBTEUR @ market'}, 'txid': ['ODQUIL-2NTZZ-ZBILSN']}}


email sent

ODQUIL-2NTZZ-ZBILSN opened 2019-07-16 12:59:20 closed 2019-07-16 12:59:20 (UTC)
refid : None
userref : 0
status : closed
reason : None
opentm : 1563281960.7044
closetm : 1563281960.7186
starttm : 0
expiretm : 0
descr :
pair : XBTEUR
type : buy
ordertype : market
price : 0
price2 : 0
leverage : none
order : buy 0.03951000 XBTEUR @ market
close :
vol : 0.03951000
vol_exec : 0.03951000
cost : 370.9
fee : 0.9
price : 9390.0
stopprice : 0.00000
limitprice : 0.00000
misc :
oflags : fciq
trades : TDZOOK-2ZBTT-QRLJUX

1 transaction(s)



Finally i bought at 9390.0 EUR.



$ ./closed_orders
Days : 0.5

OVG6EB-DF6LJ-VUC45L opened 2019-07-15 20:22:55 closed 2019-07-15 20:22:55 (TZ)
status : closed
fee : 0.9
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : sell
order : sell 0.03951000 XBTEUR @ market
vol : 0.03951000
closetm : 1563214975.8
trades : TOF7JP-JW2QG-QHJRHZ
misc :
starttm : 0
limitprice : 0.00000
price : 9549.0
cost : 377.2
reason : None
userref : 0
vol_exec : 0.03951000
oflags : fciq
refid : None
stopprice : 0.00000
opentm : 1563214975.78

ODQUIL-2NTZZ-ZBILSN opened 2019-07-16 14:59:20 closed 2019-07-16 14:59:20 (TZ)
status : closed
fee : 0.9
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : buy
order : buy 0.03951000 XBTEUR @ market
vol : 0.03951000
closetm : 1563281960.72
trades : TDZOOK-2ZBTT-QRLJUX
misc :
starttm : 0
limitprice : 0.00000
price : 9390.0
cost : 370.9
reason : None
userref : 0
vol_exec : 0.03951000
oflags : fciq
refid : None
stopprice : 0.00000
opentm : 1563281960.7

2 transaction(s)



The following script keeps order price always the same (every loops will remain same "begin price") :
(ADVISE : make tests with a bigger volume than available ...
Consequently, i will have this error :
{u'error': [u'EOrder:Insufficient funds']}

./tradeto
Usage : ./tradeto <sell|buy> <pair> <volume> <standard deviation> (randomtime delay <min> <max>)

Here we "sell" (1st parameter) "1" (3rd parameter) BTC "0.5" $ (4th parameter) upper than actual rate.
We check price every 5 sec. (5th parameter) to 5.1 sec. (6th parameter).
Then we will buy 1 BTC 0.5$ lower than runtime price.


./tradeto sell XXBTZUSD 1 0.5 5 5.1

BEGIN PRICE 7104.8USD
Volume 1

7104.8 sell 1 at 7105.3 USD
next bid in 5.06 sec. (12:21:36)

7104.8 sell 1 at 7105.3 USD
next bid in 5.02 sec. (12:21:42)

7104.8 sell 1 at 7105.3 USD
next bid in 5.03 sec. (12:21:47)

2019-12-15 12:21:42
7104.8 sell 1 at 7105.3 USD
next bid in 5.07 sec. (12:21:53)

7104.8 sell 1 at 7105.3 USD
next bid in 5.09 sec. (12:21:58)

7104.8 sell 1 at 7105.3 USD
next bid in 5.05 sec. (12:22:03)

2019-12-15 12:21:58
7104.8 sell 1 at 7105.3 USD
next bid in 5.07 sec. (12:22:09)

7104.8 sell 1 at 7105.3 USD
next bid in 5.01 sec. (12:22:14)

7104.8 sell 1 at 7105.3 USD
next bid in 5.05 sec. (12:22:19)

2019-12-15 12:22:14
7104.8 sell 1 at 7105.3 USD
next bid in 5.04 sec. (12:22:25)

7104.8 sell 1 at 7105.3 USD
next bid in 5.04 sec. (12:22:30)

7104.0 sell 1 at 7105.3 USD
next bid in 5.04 sec. (12:22:35)

2019-12-15 12:22:30
7106.5 sell 1 at 7105.3 USD
{u'error': [u'EOrder:Insufficient funds']}
sell 1 at 7106.5USD

email sent

0 transaction(s)

2019-12-15 12:22:43
7106.5 buy 1 at 7105.3 USD
next bid in 5.02 sec. (12:22:48)

7106.5 buy 1 at 7105.3 USD
next bid in 5.02 sec. (12:22:53)

7104.0 buy 1 at 7105.3 USD
{u'error': [u'EOrder:Insufficient funds']}
buy 1 at 7104.0USD

email sent

0 transaction(s)

2019-12-15 12:23:00
7106.5 sell 1 at 7105.3 USD
{u'error': [u'EOrder:Insufficient funds']}
sell 1 at 7106.5USD

email sent

0 transaction(s)

2019-12-15 12:23:07
7104.0 buy 1 at 7105.3 USD
{u'error': [u'EOrder:Insufficient funds']}
buy 1 at 7104.0USD

email sent

0 transaction(s)

2019-12-15 12:23:14
7104.0 sell 1 at 7105.3 USD
next bid in 5.04 sec. (12:23:19)

2019-12-15 12:23:14
7106.5 sell 1 at 7105.3 USD
{u'error': [u'EOrder:Insufficient funds']}
sell 1 at 7106.5USD

...


Pairs available are :

./pairs_list
XETHZUSD
XXLMZUSD
XMLNXETH
XXLMZEUR
NANOEUR
SCUSD
XREPXETH
XXBTZGBP
QTUMUSD
ICXETH
ADAETH
EOSEUR
XETCXXBT
XZECZUSD
XETHZGBP
NANOXBT
LSKEUR
XXMRZEUR
XZECXXBT
ATOMUSD
XZECZJPY
ICXEUR
XLTCZUSD
LSKXBT
XREPZUSD
XETHZEUR
XMLNXXBT
WAVESXBT
PAXGXBT
XETHZUSD
EOSETH
XXDGXXBT
ADACAD
BCHUSD
ICXXBT
OMGETH
XLTCZEUR
XXBTZGBP
LINKEUR
GNOEUR
ATOMCAD
ADAEUR
OMGUSD
XTZETH
XZECZEUR
XREPXXBT
XTZEUR
SCETH
XETHZJPY
BCHEUR
LINKXBT
XETCXETH
XXBTZJPY
DASHXBT
XBTCHF
XXLMXXBT
XETCZEUR
DASHUSD
LSKETH
LSKUSD
SCEUR
ATOMEUR
XREPZEUR
NANOETH
XXBTZCAD
XXMRZUSD
XXBTZEUR
XETHXXBT
XTZCAD
ETHDAI
WAVESUSD
QTUMXBT
XETHZJPY
DAIUSDT
ATOMETH
BATETH
OMGXBT
GNOXBT
XXBTZJPY
BATUSD
XXBTZEUR
WAVESETH
NANOUSD
EOSXBT
XXBTZUSD
QTUMETH
DAIEUR
XTZUSD
XXBTZCAD
GNOETH
XETHZCAD
OMGEUR
XETHXXBT
BATXBT
XXRPZEUR
LINKETH
DASHEUR
ETHCHF
ADAUSD
BCHXBT
USDTZUSD
EOSUSD
PAXGETH
XXRPZUSD
SCXBT
XTZXBT
ICXUSD
XETHZCAD
BATEUR
XXMRXXBT
PAXGEUR
XETHZGBP
XXRPZCAD
LINKUSD
XLTCXXBT
GNOUSD
ADAXBT
WAVESEUR
QTUMCAD
DAIUSD
XXRPXXBT
QTUMEUR
ATOMXBT
PAXGUSD
XXRPZJPY
XETCZUSD
XETHZEUR
XXBTZUSD




You can let HFT bots platforms like Cryptohopper or Haasbot play with your API key, or run your own and doing it yourself !



Contact gpg key 641CE2E33060003C zeronomicoin at gmail dot com
6  Economy / Trading Discussion / Want to F#*&! the system ? on: August 05, 2019, 07:10:36 AM
HFT scripts on the kraken API for sale.

Available on github after contact.
I can explain you how to clone and run an instance.

Of course gain depends on invested volume.
Someday there are more than 10 transactions. Some other, the program places sell price upper the rate of the day and it could have no transactions (HFT risks...). That's why we have to check in order to run another "instance" with a different "standard deviation", and eventually increase time-lags between bids.
It can become a full time job, with an investment of 0.1 bitcoin, even at 5000$ we can easily make 70$ a day to 10 times more !


$ ./buyfirst
Usage : ./buyfirst <pair> <volume> <standard deviation> (randomtime delay <min> <max>)
$ ./buyfirst XXBTZEUR 0.0198 132 120 1400


Here first order is to buy 0.0198 BTC 132EUR lower than actual rate (at runtime).
Following order is to sell 0.0198 BTC 132EUR upper than begin price.

Check market price randomly between 120 sec. and 23 min.
We can set 0.5 to 0.501 sec. if relevant ...

We receive an email with last transaction details.


OSZBNZ-VYO5N-E4C4PR opened 2019-06-22 14:36:43 closed 2019-06-22 14:36:43 (UTC)
status : closed
fee : 0.4
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : buy
order : buy 0.01980000 XBTEUR @ market
vol : 0.01980000
closetm : 1561214203.35
trades : TIVM4H-DO4NA-CVCGXK
misc :
starttm : 0
limitprice : 0.00000
price : 9120.6
cost : 180.5
reason : None
userref : 0



Next trade :


OOA4UG-UIU42-CYB3AE opened 2019-06-22 15:00:07 closed 2019-06-22 15:00:07 (UTC)
status : closed
fee : 0.4
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : sell
order : sell 0.01980000 XBTEUR @ market
vol : 0.01980000
closetm : 1561215607.56
trades : TGNJHW-DUPP5-JUWNM6
misc :
starttm : 0
limitprice : 0.00000
price : 9461.8
cost : 187.3
reason : None
userref : 0



When a "loop" (first we buy, then sell) is done, volume can be increased.


Another script adjusts "standard deviation" at each new rate (very risky ... but ...)
Time between each price check is set here at 15.5 sec.


$ ./time_rtsellfirst
Usage : ./time_rtsellfirst <pair> <volume> <standard deviation> <time check (sec.)>


$ ./time_rtsellfirst XXBTZUSD 0.1 2.1 15.5

BEGIN PRICE 10520.7USD
Volume 0.1

10510.1 sell at 10522.8
10520.7 sell at 10512.2
{u'error': [u'EOrder:Insufficient funds']}
sell 0.1 at 10520.7USD

email sent

0 transaction(s)

2019-07-16 17:35:54
10510.1 buy at 10518.6
{u'error': [u'EOrder:Insufficient funds']}
buy 0.1 at 10510.1USD

email sent

0 transaction(s)

2019-07-16 17:36:03

BEGIN PRICE 10557.3USD
Volume 0.10050

10557.3 sell at 10559.4
10557.3 sell at 10559.4
10557.3 sell at 10559.4
10557.3 sell at 10559.4
10555.4 sell at 10559.4
10555.4 sell at 10557.5
10550.5 sell at 10557.5
10555.4 sell at 10552.6
{u'error': [u'EOrder:Insufficient funds']}
sell 0.10050 at 10555.4USD

email sent

0 transaction(s)

2019-07-16 17:38:06
10549.1 buy at 10555.2
{u'error': [u'EOrder:Insufficient funds']}
buy 0.10050 at 10549.1USD

email sent

0 transaction(s)

2019-07-16 17:38:16

BEGIN PRICE 10549.1USD
Volume 0.10100

10550.0 sell at 10551.2
...

I know ... I ran this script and i didn't have 0.1 bitcoin available and the kraken API return an error "Insufficient funds"... but you see the loop ?
It checks market price, then it can sell at (from) 10551.2 but if it's upper, it will sell upper. That's why i made possible to set a random time delay between market price checks, in 15 min. bitcoin can increase of 400$ isn't it ?
Also, when you order on a limit, your amount is "blocked", you can not make another bid with this same amount, but theses scripts check only the market, then your amount is still available !

Now let's see a real runtime.

$ ./buyfirst
Usage : ./buyfirst <pair> <volume> <standard deviation> (randomtime delay <min> <max>)

$ ./buyfirst XXBTZEUR 0.03951 140 120 1400


BEGIN PRICE 9556.7EUR
Volume 0.03951

9556.7 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 994.49 sec. (11:51:40)
9558.1 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1378.85 sec. (12:14:40)
9560.9 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1193.14 sec. (12:34:33)
2019-07-16 12:14:40
9544.8 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 869.70 sec. (12:49:03)

... <snip> ...

9470.1 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 679.57 sec. (14:47:04)
9495.8 buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 733.52 sec. (14:59:18)
9385.9 buy at 9416.7
{'error': [], 'result': {'descr': {'order': 'buy 0.03951000 XBTEUR @ market'}, 'txid': ['ODQUIL-2NTZZ-ZBILSN']}}
buy 0.03951 at 9385.9EUR

email sent

ODQUIL-2NTZZ-ZBILSN opened 2019-07-16 12:59:20 closed 2019-07-16 12:59:20 (UTC)
refid : None
userref : 0
status : closed
reason : None
opentm : 1563281960.7044
closetm : 1563281960.7186
starttm : 0
expiretm : 0
descr :
pair : XBTEUR
type : buy
ordertype : market
price : 0
price2 : 0
leverage : none
order : buy 0.03951000 XBTEUR @ market
close :
vol : 0.03951000
vol_exec : 0.03951000
cost : 370.9
fee : 0.9
price : 9390.0
stopprice : 0.00000
limitprice : 0.00000
misc :
oflags : fciq
trades : TDZOOK-2ZBTT-QRLJUX

1 transaction(s)

2019-07-16 14:59:27
9385.9 sell at 9696.7
next bid : 0.03951 at 9696.7 EUR in 552.00 sec. (15:08:40)
2019-07-16 14:59:28

...





$ ./closed_orders 1

OVG6EB-DF6LJ-VUC45L opened 2019-07-15 20:22:55 closed 2019-07-15 20:22:55 (TZ)
status : closed
fee : 0.9
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : sell
order : sell 0.03951000 XBTEUR @ market
vol : 0.03951000
closetm : 1563214975.8
trades : TOF7JP-JW2QG-QHJRHZ
misc :
starttm : 0
limitprice : 0.00000
price : 9549.0
cost : 377.2
reason : None
userref : 0
vol_exec : 0.03951000
oflags : fciq
refid : None
stopprice : 0.00000
opentm : 1563214975.78

ODQUIL-2NTZZ-ZBILSN opened 2019-07-16 14:59:20 closed 2019-07-16 14:59:20 (TZ)
status : closed
fee : 0.9
expiretm : 0
descr :
leverage : none
ordertype : market
price : 0
close :
pair : XBTEUR
price2 : 0
type : buy
order : buy 0.03951000 XBTEUR @ market
vol : 0.03951000
closetm : 1563281960.72
trades : TDZOOK-2ZBTT-QRLJUX
misc :
starttm : 0
limitprice : 0.00000
price : 9390.0
cost : 370.9
reason : None
userref : 0
vol_exec : 0.03951000
oflags : fciq
refid : None
stopprice : 0.00000
opentm : 1563281960.7

2 transaction(s)



You can let HFT bots platforms like Cryptohopper or Haasbot play with your API key, or run your own and do it yourself !



Contact <zeronomicoin@gmail.com> (641CE2E33060003C)
7  Economy / Currency exchange / HFT scripts on the kraken API. on: July 16, 2019, 03:52:34 PM

Gains depend with invested volume.
Someday there are more than 10 tx. Some other, the program places sell price upper the rate of the day and there is no tx (HFT risks...). That's why we have to check in order to run another "instance" with a different "standard deviation", and eventually increase time-lags between bids.
It can become a full time job, with 1 bitcoin investment, even at 6000$ we can easily make 700$ to 10 times more a day !


$ ./randomtimebuyfirst
Usage : ./randomtimebuyfirst <pair> <volume> <standard deviation> (randomtime <min> <max>)
$ ./randomtimebuyfirst XXBTZEUR 0.0198 132 120 1400


Here first order is to buy 0.0198 BTC 132EUR lower than actual rate (at runtime).
Following order is to sell 0.0198 BTC 132EUR upper than begin price.

Check price randomly between 120 sec. and 23 min.
We can set 0.5 to 0.501 sec. if relevant ...

We receive an email with last transaction details.


OSZBNZ-VYO5N-E4C4PR  opened 2019-06-22 14:36:43  closed 2019-06-22 14:36:43 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : buy
      order : buy 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561214203.35
   trades : TIVM4H-DO4NA-CVCGXK
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9120.6
   cost : 180.5
   reason : None
   userref : 0



Next trade :


OOA4UG-UIU42-CYB3AE  opened 2019-06-22 15:00:07  closed 2019-06-22 15:00:07 (UTC)
   status : closed
   fee : 0.4
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : sell
      order : sell 0.01980000 XBTEUR @ market
   vol : 0.01980000
   closetm : 1561215607.56
   trades : TGNJHW-DUPP5-JUWNM6
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9461.8
   cost : 187.3
   reason : None
   userref : 0



When a "loop" (first we buy, then sell) is done, volume can be increased.


Another script adjusts "standard deviation" at each new rate (very risky ... but ...  Smiley
Time between each price check is set here at 15.5 sec.


$ ./time_rtsellfirst
Usage : ./time_rtsellfirst <pair> <volume> <standard deviation> <time check (sec.)>


$ ./time_rtsellfirst XXBTZUSD 0.1 2.1 15.5

   BEGIN PRICE 10520.7USD
   Volume 0.1

10510.1  sell at 10522.8
10520.7  sell at 10512.2
{u'error': [u'EOrder:Insufficient funds']}
sell 0.1 at 10520.7USD

email sent

0 transaction(s)

   2019-07-16 17:35:54
10510.1  buy at 10518.6
{u'error': [u'EOrder:Insufficient funds']}
buy 0.1 at 10510.1USD

email sent

0 transaction(s)

   2019-07-16 17:36:03

   BEGIN PRICE 10557.3USD
   Volume 0.10050

10557.3  sell at 10559.4
10557.3  sell at 10559.4
10557.3  sell at 10559.4
10557.3  sell at 10559.4
10555.4  sell at 10559.4
10555.4  sell at 10557.5
10550.5  sell at 10557.5
10555.4  sell at 10552.6
{u'error': [u'EOrder:Insufficient funds']}
sell 0.10050 at 10555.4USD

email sent

0 transaction(s)

   2019-07-16 17:38:06
10549.1  buy at 10555.2
{u'error': [u'EOrder:Insufficient funds']}
buy 0.10050 at 10549.1USD

email sent

0 transaction(s)

   2019-07-16 17:38:16

   BEGIN PRICE 10549.1USD
   Volume 0.10100

10550.0  sell at 10551.2
...

It checks market price, then it can sell at (from) 10551.2 but if it's upper, it will sell upper ...
You see ?


$ ./randomtimebuyfirst XXBTZEUR 0.03951 140 120 1400


        BEGIN PRICE 9556.7EUR
        Volume 0.03951

9556.7  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 994.49 sec. (11:51:40)
9558.1  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1378.85 sec. (12:14:40)
9560.9  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 1193.14 sec. (12:34:33)
2019-07-16 12:14:40
9544.8  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 869.70 sec. (12:49:03)

... <snip> ...

9470.1  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 679.57 sec. (14:47:04)
9495.8  buy at 9416.7
next bid : 0.03951 at 9416.7 EUR in 733.52 sec. (14:59:18)
9385.9  buy at 9416.7
{'error': [], 'result': {'descr': {'order': 'buy 0.03951000 XBTEUR @ market'}, 'txid': ['ODQUIL-2NTZZ-ZBILSN']}}
buy 0.03951 at 9385.9EUR

email sent

ODQUIL-2NTZZ-ZBILSN  opened 2019-07-16 12:59:20  closed 2019-07-16 12:59:20 (UTC)
        refid : None
        userref : 0
        status : closed
        reason : None
        opentm : 1563281960.7044
        closetm : 1563281960.7186
        starttm : 0
        expiretm : 0
        descr :
                pair : XBTEUR
                type : buy
                ordertype : market
                price : 0
                price2 : 0
                leverage : none
                order : buy 0.03951000 XBTEUR @ market
                close :
        vol : 0.03951000
        vol_exec : 0.03951000
        cost : 370.9
        fee : 0.9
        price : 9390.0
        stopprice : 0.00000
        limitprice : 0.00000
        misc :
        oflags : fciq
        trades : TDZOOK-2ZBTT-QRLJUX

1 transaction(s)

        2019-07-16 14:59:27
9385.9  sell at 9696.7
next bid : 0.03951 at 9696.7 EUR in 552.00 sec. (15:08:40)
2019-07-16 14:59:28

...





$ ./closed_orders 1

OVG6EB-DF6LJ-VUC45L  opened 2019-07-15 20:22:55  closed 2019-07-15 20:22:55 (TZ)
   status : closed
   fee : 0.9
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : sell
      order : sell 0.03951000 XBTEUR @ market
   vol : 0.03951000
   closetm : 1563214975.8
   trades : TOF7JP-JW2QG-QHJRHZ
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9549.0
   cost : 377.2
   reason : None
   userref : 0
   vol_exec : 0.03951000
   oflags : fciq
   refid : None
   stopprice : 0.00000
   opentm : 1563214975.78

ODQUIL-2NTZZ-ZBILSN  opened 2019-07-16 14:59:20  closed 2019-07-16 14:59:20 (TZ)
   status : closed
   fee : 0.9
   expiretm : 0
   descr :
      leverage : none
      ordertype : market
      price : 0
      close :
      pair : XBTEUR
      price2 : 0
      type : buy
      order : buy 0.03951000 XBTEUR @ market
   vol : 0.03951000
   closetm : 1563281960.72
   trades : TDZOOK-2ZBTT-QRLJUX
   misc :
   starttm : 0
   limitprice : 0.00000
   price : 9390.0
   cost : 370.9
   reason : None
   userref : 0
   vol_exec : 0.03951000
   oflags : fciq
   refid : None
   stopprice : 0.00000
   opentm : 1563281960.7

2 transaction(s)



You can let HFT bots platforms like Cryptohopper or Haasbot play with your API key, or run your own and doing it yourself !



Contact  <zeronomicoin@gmail.com> (641CE2E33060003C)

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!