Bitcoin Forum
June 26, 2024, 09:10:47 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Kraken API scripts for sale  (Read 45 times)
zeronomicoin (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
December 15, 2019, 12:41:34 PM
 #1

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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!