The official website API does not show examples, quite nonsense
#-*-coding=utf-8-*-' function: Get all kinds of information from poly currency 1, bitcoin (BTC) 2, Ether Square (ETH) 6, other ' import requests ' function: Real_time_ticker function: Get a currency Real-time Price return value content: high-highest price low-lowest price buy-one price sell-sell a price last-most recent transaction Price Vol.-Turnover volume-turnover ' Def real_time_ticker (coin)
: url = ' https://www.jubi.com/api/v1/ticker/' try:data = requests.post (url,data = {' Coin ': coin}). JSON () Except:print ("No way to get to the currency price ticker") return data ' function name; real_time_depth feature: Get Purchase and sale order price and quantity of a certain currency returned value content: asks-pay [price,
Committee order Quantity], the price from high to low sort bids-sell single [price, committee order quantity], price from high to low sort ' def real_time_depth (coin): url = ' https://www.jubi.com/api/v1/depth/' data = Requests.post (Url,data = {' Coin ': coin}). JSON () Data_bids = data[' bids '] data_asks = data[' asks '] for
I in Data_bids:print (I[0]) print ("") print (I[1]) to J in Data_asks:print (J[0)) Print ("") print (j[1]) ' function name: Real_time_order function: Returns the last 100 transactions, in reverse order return content: Date-Timestamp price-transaction prices Amount- Number of transactions tid-transaction ID Type-Transaction type ' Def real_time_order (coin): url = ' https://www.jubi.com/api/v1/orders/' try:request = requests.ge T (url,params = {' Coin ': coin}) Except:print ("Failed to get order") data = Request.json () return data