Bitcoin Forum
April 05, 2020, 04:01:13 AM *
News: Latest Bitcoin Core release: 0.19.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Kraken API script for sale  (Read 39 times)
zeronomicoin
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
February 15, 2020, 11:56:54 AM
Last edit: February 16, 2020, 12:03:21 PM by zeronomicoin
 #1

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)
"There should not be any signed int. If you've found a signed int somewhere, please tell me (within the next 25 years please) and I'll change it to unsigned int." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1586059273
Hero Member
*
Offline Offline

Posts: 1586059273

View Profile Personal Message (Offline)

Ignore
1586059273
Reply with quote  #2

1586059273
Report to moderator
1586059273
Hero Member
*
Offline Offline

Posts: 1586059273

View Profile Personal Message (Offline)

Ignore
1586059273
Reply with quote  #2

1586059273
Report to moderator
hugeblack
Legendary
*
Offline Offline

Activity: 1008
Merit: 1253


[∞ ÷ 21 * 10^6=Buy BTC] Avatar for Rent 25$


View Profile
February 16, 2020, 08:05:39 AM
 #2

I don’t know how we will benefit from the information you provided? Can you provide the price, a trial version, any evidence of the benefit of using that script, warranty, or any useful information?

Previous scripts you worked on, your experiences, your protofilo. Expected earnings?

zeronomicoin
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
February 16, 2020, 12:49:12 PM
 #3

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.




princerepon
Full Member
***
Offline Offline

Activity: 728
Merit: 101


Lifestyle & Wellness Platform


View Profile
February 16, 2020, 09:53:43 PM
 #4

 Shocked Shocked
I never trade in Kraken so i really don't know they have option for "Stop Loss" or not. I mean, i saw in couple of exchange they provide their trader "Stop Loss" option for better trading. I know little bit how it works but don't understand your proposal clearly. Are you talking about bot or something..? And why don't you move your thread in Marketplace-> Service section. After all you are trying to sell something right.. Huh Huh

zeronomicoin
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
February 18, 2020, 10:10:05 AM
 #5


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

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!