Bitcoin Forum
April 27, 2024, 01:14:59 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is BTC-China's API broken or is it just me?  (Read 663 times)
Shiboshiwoofamoto (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
June 24, 2014, 09:13:43 PM
 #1

It might be that their API is broken, I have the btcchina file in my folder along with this:

  " import okcoin import csv import re import btcchina

    """API KEYS"""

    access_key= "XXXXXXX" secret_key= "XXXXXXX"

    bc = btcchina.BTCChina(access_key,secret_key)

    "BTC-CHINA FETCHING"

    result = bc.get_account_info()"

I always get the error:

    "C:\Python27\python.exe C:/Python27/OKCoin-API-master/examples.py Traceback (most recent call last): File "C:/Python27/OKCoin-API-master/examples.py", line 15, in <module> result = bc.get_account_info() File "C:\Python27\OKCoin-API-master\btcchina.py", line 94, in get_account_info return self._private_request(post_data) File "C:\Python27\OKCoin-API-master\btcchina.py", line 68, in _private_request self.conn.request("POST",'/api_trade_v1.php',json.dumps(post_data),headers) File "C:\Python27\lib\httplib.py", line 946, in request self._send_request(method, url, body, headers) File "C:\Python27\lib\httplib.py", line 986, in _send_request self.putheader(hdr, value) File "C:\Python27\lib\httplib.py", line 924, in putheader str = '%s: %s' % (header, '\r\n\t'.join(values))

    TypeError: sequence item 0: expected string, long found"

Link to their API: https://github.com/BTCChina/btcchina-api-python[1]

I'd be glad if someone could help me out!


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!