Search content
Sort by

Showing 12 of 12 results by Takkun
Post
Topic
Board Goods
Re: [WTS] Steam Games Below Market Value
by
Takkun
on 30/07/2012, 21:48:24 UTC
Why sell SR3 keys for the equivalent of $18 USD when you can get $30 USD for it if you sell it on ebay?
Post
Topic
Board Bitcoin Technical Support
Re: Req: Python MtGox auth example
by
Takkun
on 03/04/2012, 20:07:57 UTC
Here is a full API v0 example using the authentication code posted earlier, if anyone is interested...
It's only missing withdraw, btcAddress, and history_[CUR].

Code:
from urllib import urlencode
import urllib2
import time
from hashlib import sha512
from hmac import HMAC
import base64
import json
from pprint import pprint

class MtGox:
def __init__(self):
self.key = 'x'
self.secret = 'x'
self.auth = Authenticate(self.key,self.secret)

def getTrades(self, since):
path = "getTrades.php"
args = {'since': since}
return self.auth.run(path,args)

def getDepth(self):
path = "data/getDepth.php"
args = {'Currency': 'USD'}
return self.auth.run(path,args)

def getFunds(self):
path = "getFunds.php"
args = {}
return self.auth.run(path,args)

def buyBTC(self, amount, price):
path = "buyBTC.php"
args = {'amount': amount, 'price': price, 'Currency':'USD'}
return self.auth.run(path,args)

def sellBTC(self, amount, price):
path = "sellBTC.php"
args = {'amount': amount, 'price': price, 'Currency':'USD'}
return self.auth.run(path,args)

def getOrders(self):
path = "getOrders.php"
args = {}
return self.auth.run(path,args)

def cancelOrder(self, oid, type):
path = "cancelOrder.php"
args = {'oid': oid, 'type': type}
return self.auth.run(path,args)

def redeemCode(self, code):
path = "redeemCode.php"
args = {'code': code}
return self.auth.run(path,args)

def getInfo(self):
path = "info.php"
args = {}
return self.auth.run(path,args)

def getTicker(self):
path = "data/ticker.php"
args = {}
return self.auth.run(path,args)

def printDic(self, dic):
pprint(dic)
#MtGox End


def get_nonce():
    return int(time.time()*100000)

def sign_data(secret, data):
    return base64.b64encode(str(HMAC(secret, data, sha512).digest()))
     
class Authenticate:
    def __init__(self, auth_key, auth_secret):
        self.auth_key = auth_key
        self.auth_secret = base64.b64decode(auth_secret)
       
    def build_query(self, req={}):
        req["nonce"] = get_nonce()
        post_data = urlencode(req)
        headers = {}
        headers["User-Agent"] = "GoxApi"
        headers["Rest-Key"] = self.auth_key
        headers["Rest-Sign"] = sign_data(self.auth_secret, post_data)
        return (post_data, headers)
       
    def run(self, path, args):
        data, headers = self.build_query(args)
        req = urllib2.Request("https://mtgox.com/api/0/"+path, data, headers)
        res = urllib2.urlopen(req, data)
        return json.load(res)
#Authenticate End
Post
Topic
Board Bitcoin Discussion
Re: Shopping Online - Now EVERY Store Accepts Bitcoin
by
Takkun
on 05/08/2011, 19:06:20 UTC
Note the date of OP
Post
Topic
Board Speculation
Re: BTC price will hit 5$ this week
by
Takkun
on 03/08/2011, 14:38:46 UTC
And the difficulty will keep increasing  Cheesy
Post
Topic
Board Bitcoin Discussion
Topic OP
Phone Call From Dwolla
by
Takkun
on 28/07/2011, 19:30:28 UTC
Someone from Dwolla just called me asking to verify my name and address.
Anyone else get a call? Think it has to do with the reversed transactions?
Post
Topic
Board Bitcoin Discussion
Re: TRADEHILL COMPROMISED - HACKER ATTACK IMMINENT
by
Takkun
on 20/06/2011, 20:02:36 UTC
Post
Topic
Board Mining
Re: ATI 6970 Optimization
by
Takkun
on 20/06/2011, 02:33:07 UTC
Why is it that as soon as I go over 900 core clock, I drop like 70 Mh/s?
Post
Topic
Board Beginners & Help
Re: Bandwidth Usage of bitcoind
by
Takkun
on 17/06/2011, 17:05:03 UTC
Almost none
Post
Topic
Board Beginners & Help
Re: Want 0.10 Bitcoin Free? BitcoinBoom is Looking for ...
by
Takkun
on 17/06/2011, 17:04:12 UTC
1DMKDnq4MoefsJanX5YpxRtca1JWnpgJqU

http://twitter.com/#!/takkun88
Post
Topic
Board Beginners & Help
Re: BTC for Steak and Ramen
by
Takkun
on 17/06/2011, 17:02:25 UTC
Lol Buy it every day
Post
Topic
Board Beginners & Help
Re: I'm out
by
Takkun
on 17/06/2011, 17:01:44 UTC
Have fun
Post
Topic
Board Beginners & Help
Re: Please sell me BTC via paypal
by
Takkun
on 17/06/2011, 17:00:54 UTC
There are some sites setup for something like this.
I dont know if they are still up.