-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtest.py
80 lines (54 loc) · 1.66 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from coinex.coinex import CoinEx, CoinExApiError
# Fill these in
COINEX_ACCESS_ID=''
COINEX_SECRET=''
coinex = CoinEx(COINEX_ACCESS_ID, COINEX_SECRET)
print(coinex.currency_rate())
info = coinex.market_info()
print(info)
list = coinex.market_list()
print(list)
ticker = coinex.market_ticker('BCHBTC')
print(ticker)
ticker_all = coinex.market_ticker_all()
print(ticker_all)
depth = coinex.market_depth('BCHBTC')
print(depth)
deals = coinex.market_deals('BTCUSDT')
print(deals)
balance = coinex.balance_info()
print(balance)
bch_available = balance['BCH']['available']
wd_list = coinex.balance_coin_withdraw_list()
print(wd_list)
#wd_res = coinex.balance_coin_withdraw('BCH', 'qzjtuuc9nafvfhmwt47z84awltp9gmx7wyma3kvy9v', 0.001)
#print(wd_res)
#wd_id = wd_res['coin_withdraw_id']
#wd_list = coinex.balance_coin_withdraw_list(coin_withdraw_id=wd_id)
#print(wd_list)
#wd_res = coinex.balance_coin_withdraw_cancel(coin_withdraw_id=wd_id)
#print(wd_res)
#od_res = coinex.order_limit('CETBCH', 'sell', 100.0, 10.0)
#print(od_res)
#od_id = od_res['id']
#od_res = coinex.order_pending_cancel('CETBCH', od_id)
#print(od_res)
#od_res = coinex.order_market('CETBCH', 'buy', bch_available)
#print(od_res)
#od_id = od_res['id']
#od_res = coinex.order_status('CETBCH', od_id)
#print(od_res)
#od_res = coinex.order_ioc('CETBCH', 'sell', 100.0, 10.0)
#print(od_res)
#od_id = od_res['id']
od_res = coinex.order_pending('CETBCH')
print(od_res)
od_res = coinex.order_finished('CETBCH')
print(od_res)
#od_id = od_res['data'][0]['id']
#od_res = coinex.order_deals(od_id)
#print(od_res)
od_res = coinex.order_user_deals('CETBCH')
print(od_res)
od_res = coinex.order_mining_difficulty()
print(od_res)