Exemplo n.º 1
0
def test_close():
    r = APIClient(api_key="dWbkgDeLIzLavnYs", secret_key="dePW2XslyzFYnTuc41yRhqHIUWEVco4W",
                  host="192.168.50.172").close_order(exchange="BITMEX", contract="XBTUSD", price_type="market",
                                                     entrust_vol="1",
                                                     entrust_bs="sell",
                                                     close_rule="time")
    print(r)
Exemplo n.º 2
0
def test_trade():
    r = APIClient(host="market.coinceres.com").trade("HUOBI", "BTC/USDT", '1546985600000', '1560130387000')
    print(r)
Exemplo n.º 3
0
def test_tick():
    r = APIClient(host="market.coinceres.com").tick("HUOBI", "BTC/USDT")
    print(r)
Exemplo n.º 4
0
def test_depth():
    r = APIClient(host="market.coinceres.com").depth("HUOBI", "BTC/USDT")
    print(r)
Exemplo n.º 5
0
def test_delete_order():
    r = APIClient(api_key="dWbkgDeLIzLavnYs", secret_key="dePW2XslyzFYnTuc41yRhqHIUWEVco4W",
                   host="192.168.50.172").delete_order('123')
    print(r)
Exemplo n.º 6
0
def test_order():
    r = APIClient(api_key="dWbkgDeLIzLavnYs", secret_key="dePW2XslyzFYnTuc41yRhqHIUWEVco4W",
                  host="192.168.50.172").limit_order(exchange="BITMEX", contract="XBTH19", entrust_price="3500",
                                                     future_dir="open", entrust_vol="1", entrust_bs="sell", lever="1")
    print(r)
    return r
Exemplo n.º 7
0
def test_account():
    r = APIClient(api_key="dWbkgDeLIzLavnYs", secret_key="dePW2XslyzFYnTuc41yRhqHIUWEVco4W",
                  host="192.168.50.172").account()
    print(r)
Exemplo n.º 8
0
def test_contract():
    r = APIClient(api_key="dWbkgDeLIzLavnYs", secret_key="dePW2XslyzFYnTuc41yRhqHIUWEVco4W",
                  host="192.168.50.172").contract_info("BITMEX")
    print(r)