예제 #1
0
# print ("交易货币对为",pairs.get('gtc_usdt'))

# 交易对 gtc_usdt

# print (gate.pairs('btc_usdt'))

# 市场订单参数
# print (gate.marketinfo())

# print (gate.marketinfo()['pairs']['gtc_usdt']['fee'])

gtc_market_info_firstCatch = 0

# 获取gtc手续费
if gtc_market_info_firstCatch == 0:
    for i in gate.marketinfo()['pairs']:
        if i.get("gtc_usdt") != None:
            # print (i['gtc_usdt']["fee"])
            gtc_trade_Fee = i['gtc_usdt']['fee']
            gtc_min_trade_amount = i['gtc_usdt']['min_amount']
            print('gtc手续费为', gtc_trade_Fee)
            print('最小交易量为', gtc_min_trade_amount)
            gtc_market_info_firstCatch = 1
            break

# 交易市场详细行情
# print (gate.marketlist())


# 所有交易行情
# print (gate.tickers())
예제 #2
0
파일: Client.py 프로젝트: wangxuancong/work
## Create a gate class instance

gate_query = GateIO(API_QUERY_URL, apiKey, secretKey)
gate_trade = GateIO(API_TRADE_URL, apiKey, secretKey)


# Trading Pairs
print("返回所有系统支持的交易对")
print(gate_query.pairs())


## Below, use general methods that query the exchange

#  Market Info
print("返回所有系统支持的交易市场的参数信息,包括交易费,最小下单量,价格精度等")
print(gate_query.marketinfo())

# Market Details
print("返回所有系统支持的交易市场的详细行情和币种信息,包括币种名,市值,供应量,最新价格,涨跌趋势,价格曲线等")
print(gate_query.marketlist())

# Tickers
print("返回系统支持的所有交易对的 最新,最高,最低 交易行情和交易量,每10秒钟更新,如果后面添加具体的参数就是单个的币种的具体详情")
print(gate_query.tickers())
# Depth
print("返回系统支持的所有交易对的市场深度(委托挂单),其中 asks 是委卖单, bids 是委买单,如果后面有具体的参数则是具体币种的深度详情")
print(gate_query.orderBooks())

# orders
print("获取我的当前挂单列表API")
print(gate_query.openOrders())