Bitcoin Forum
May 08, 2024, 03:05:38 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Here is my Algorithm trading python code  (Read 131 times)
fr4nkthetank (OP)
Legendary
*
Offline Offline

Activity: 2294
Merit: 1182


Now the money is free, and so the people will be


View Profile
January 05, 2018, 01:05:00 AM
Last edit: January 07, 2018, 03:19:03 PM by fr4nkthetank
 #1

Hi everyone. 

I have been doing some automated trading for a long time now, and actually used to do this for a living before.  Before crypto.  In any case, a few words of warning.  If you do trade with code, then monitor your stuff.  Dont wake up in 2 weeks, oh my balance is 0 ?!?.  Check it all the time.  Remember you are competing against others who have algo code, and they will notice, and they will adapt.  Thats the game.  When I say algo trading, I usually mean arbitrage trading.  In crypto land its a little different.  Since pools and others auto sell coins, you can manage to always buy on the bid or under, then automatically sell and dump if the price goes down.  On relatively stable coins this is very profitable.  If you do 3%, or even 1% profit after fees per trade, and 100 trades a day, well....after a few months it adds up you see.  But its actually hard work too.  

So.  A lot of people want to learn how to do this, and want to learn how to code.  Here is an example that you can use, inspire yourself, and understand from.  Good luck.  Its written in python, 2.7.x, and the code IS ABSOLUTELY DISGUSTING I AM WARNING YOU.  If you are a programmer you will be shaking your head so violently that you may get a brain aneurysm but I am NOT, and this is one of the first algos I wrote so it is what it is.  The beauty of it is this :  When you write it, you will notice many things that can be put in 1 line vs 50 lines of code.  Then you can learn how to do it and improve yourself.

This snippet will connect to cryptopia exchange.  Recently I have been away a lot and stopped it since I cannot monitor it.  Last time I had some rejected api calls errors, etc, so you'll have to figure it out too.  it will auto buy and sell ONION based on your inputs - price, size, and the size you are searching for in the market.  You want to "position" yourself well compared to other orders.  Obligatory donation address if this helped you learn coding a bit.  1ACkmSnoVPTCHiWAAvmQigwoofu55XfRVj  (btc).  Remember to set fees very low if you dont care how fast it gets there...

If you are a person who trades like this and is mad because im putting code out there for free, maybe you need to re-evaluate how much you think you and your work are worth.  
If you want to post how much my code is shit, please do.  But also post how to make it better.  

EDIT:  posted on cryptominingtalk.com because I cant here.



Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
fr4nkthetank (OP)
Legendary
*
Offline Offline

Activity: 2294
Merit: 1182


Now the money is free, and so the people will be


View Profile
January 05, 2018, 01:06:25 AM
 #2

It seems I cant post code here Sad  Anybody know how to help ?
faanigee
Member
**
Offline Offline

Activity: 95
Merit: 10


View Profile
January 05, 2018, 04:41:24 AM
 #3

There is no way to help you without code...Huh
Do if you want to get some help to modify your code then you will have to share it...!!!
Sorry for my bad English...!!!
fr4nkthetank (OP)
Legendary
*
Offline Offline

Activity: 2294
Merit: 1182


Now the money is free, and so the people will be


View Profile
January 07, 2018, 03:18:37 PM
 #4

There is no way to help you without code...Huh
Do if you want to get some help to modify your code then you will have to share it...!!!
Sorry for my bad English...!!!

Yeah I meant the forum does not allow code posting automatically.  In any case, I uploaded it on my website for all to use.
www.cryptominingtalk.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!