#!/usr/bin/env python
# -*- coding:utf-8 -*-
import hashlib,hmac
import urllib.request
import urllib.parse
import time
import json
import random
import re
import sys
class Bter:
def __init__(self, key, secret):
self.__key = key
self.__secret = secret
self.__url = 'http://data.bter.com/api2/1/'
self.__privateurl = 'https://api.bter.com/api2/1/private/'
# 所有交易对
def pairs(self):
url = self.__url + "pairs"
return self.http_request(url)
# 交易市场详细行情
def marketlist(self):
url = self.__url + "marketlist"
return self.http_request(url)
# 获取帐号资金余额
def balances(self):
params = {
'nonce' : int(time.time()),
}
params['signature'] = self.signature(params)
url = self.__privateurl + "balances"
return self.http_request(ur
Bter比特儿交易所SDK-Python版
最新推荐文章于 2023-04-10 19:54:42 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)