-
Notifications
You must be signed in to change notification settings - Fork 18
/
constant.js
85 lines (82 loc) · 1.5 KB
/
constant.js
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
80
81
82
83
84
85
const ORDER = {
MIN_USD: 10,
EXECUTION_TYPE: {
CANCELED: 'CANCELED',
NEW:'NEW',
TRADE:'TRADE',
},
TYPE: {
LIMIT: 'LIMIT',
MARKET: 'MARKET',
STOP: 'STOP',
OCO: 'OCO',
STOP_MARKET: 'STOP_MARKET',
TAKE_PROFIT: 'TAKE_PROFIT',
LIMIT_MAKER: 'LIMIT_MAKER',
STOP_LOSS_LIMIT: 'STOP_LOSS_LIMIT',
TAKE_PROFIT_MARKET: 'TAKE_PROFIT_MARKET',
TRAILING_STOP_MARKET: 'TRAILING_STOP_MARKET',
},
STATUS: {
NEW: 'NEW',
PARTIALLY_FILLED: 'PARTIALLY_FILLED',
FILLED: 'FILLED',
CANCELED: 'CANCELED',
PENDING_CANCEL: 'PENDING_CANCEL',
REJECTED: 'REJECTED',
EXPIRED: 'EXPIRED',
},
SIDE: {
BUY: 'BUY',
SELL: 'SELL',
},
SIDE_DUAL: {
LONG: 'LONG',
SHORT: 'SHORT',
BOTH: 'BOTH',
},
TIME_IN_FORCE: {
GTC: 'GTC',// - Good Till Cancel
IOC: 'IOC',// - Immediate or Cancel
FOK: 'FOK',// - Fill or Kill
GTX: 'GTX',// - Post only or kill
},
WORKING_TYPE: {
MARK_PRICE: 'MARK_PRICE',
CONTRACT_PRICE: 'CONTRACT_PRICE',
},
}
const K_LINE = {
'1m': '1m',
'3m': '3m',
'5m': '5m',
'15m': '15m',
'30m': '30m',
'1h': '1h',
'2h': '2h',
'4h': '4h',
'6h': '6h',
'8h': '8h',
'12h': '12h',
'1d': '1d',
'3d': '3d',
'1w': '1w',
'1M': '1M',
}
const SYMBOL = {
ETHUSDT: 'ETHUSDT',
BTCUSDT: 'BTCUSDT',
}
const STRATEGY = {
STATUS:{
WAIT_ENTRY_POINT:'WAIT_ENTRY_POINT',
IN_PROGRESS:'IN_PROGRESS',
COMPLETED:'COMPLETED'
}
}
module.exports = {
ORDER,
K_LINE,
SYMBOL,
STRATEGY
}