Bitcoin Forum
June 24, 2024, 06:10:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Project Development / Re: Trying to create BTC-e Trading bot using google scripts on: March 18, 2015, 03:00:20 PM
What language are you using?

Here's a good example with PHP straight from btc-e

http://pastebin.com/8fbMCguM

Just put in your info and uncomment the last line by removing the forward slashes.
Comment
Code:
//$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 1, 'rate' => 100));
Uncomment: This will buy $1 USD worth when BTC is worth $100
Code:
$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 1, 'rate' => 100));

This will buy $5 USD worth when BTC is worth $300
Code:
$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 5, 'rate' => 300));



Thanks for the reply. I am using Javascript. Sorry I guess I should have mentioned that. I don't really know how to translate that code to javascript though which is the biggest issue I've been having with all the examples.

Could I just get an example url that the bot would be sending? What in an example situation would go after "https://btc-e.com/tapi/"?

BTC-e's trade API requires you to do a HMAC SHA512 hash of your post data. As far as I know javascript does not do HMAC SHA512 hashes. Did you look at some of the language examples available? https://btc-e.com/api/documentation

Oh okay. Well that's disappointing. The reason I wanted to do it with javascript was because I wanted to make it in google sheets because it allows you to set up a timer that will trigger the script every set interval of time which would mean it would run off of google's servers for free and I wouldn't have to keep my computer running it. Also Since it's google sheets I could have it store the data in a spreadsheet. Damn so there is no way to get it to work in javascript?
2  Bitcoin / Project Development / Re: Trying to create BTC-e Trading bot using google scripts on: March 18, 2015, 01:48:17 AM
What language are you using?

Here's a good example with PHP straight from btc-e

http://pastebin.com/8fbMCguM

Just put in your info and uncomment the last line by removing the forward slashes.
Comment
Code:
//$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 1, 'rate' => 100));
Uncomment: This will buy $1 USD worth when BTC is worth $100
Code:
$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 1, 'rate' => 100));

This will buy $5 USD worth when BTC is worth $300
Code:
$result = btce_query('Trade', array('pair' => 'btc_usd', 'type' => 'buy', 'amount' => 5, 'rate' => 300));



Thanks for the reply. I am using Javascript. Sorry I guess I should have mentioned that. I don't really know how to translate that code to javascript though which is the biggest issue I've been having with all the examples.

Could I just get an example url that the bot would be sending? What in an example situation would go after "https://btc-e.com/tapi/"?
3  Bitcoin / Project Development / Trying to create BTC-e Trading bot using google scripts on: March 17, 2015, 03:35:17 AM
Hello. I am interested in creating my own trading bot for the btc-e exchange. I can program a little but let me worry about that. The thing I don't understand is how the api works. The documentation gives you this:
"https://btc-e.com/tapi" (I'm just showing you the url, I'm not trying to link you to anywhere)

I was able to create a small script in google sheets that retrieves the info from that page and inserts it into a cell so actually getting the info won't be a problem. I just don't understand what else I am supposed to put in the URL. I don't understand the documentation on btc-e. How do insert the key/secret? How do I give Parameters?

I would assume it would be as simple as giving me a sample URL with a made up key and secret, but the fact that they didn't do that tells me that it isn't that simple. Is this correct? If not, could someone give me an example?

Disclaimer: I don't expect this bot to actually be good, I just thought it would be a fun project. Also programming the actual algorithm won't be a problem. I do have experience with that. I just don't know how to get it to communicate with the api.

Thank you for reading!

Edit: I am using javascript
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!