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
| package com.xcong.excoin.utils;
|
| /**
| * 接受参数 类型判断
| *
| * @author wzy
| * @date 2020-05-27
| **/
| public class TypeJudgeUtils {
|
| /**
| * 委托类型 1开多 2开空 3平多 4平空
| *
| * @param type
| * @return
| */
| public static boolean entrustType(int type) {
| switch (type) {
| case 1:
| case 2:
| case 3:
| case 4:
| return true;
| default:
| return false;
| }
| }
|
| /**
| * 判断k线区间
| *
| * @param period
| * @return
| */
| public static boolean klinePeriod(String period) {
| switch (period) {
| case "1min":
| case "5min":
| case "30min":
| case "60min":
| case "4hour":
| case "1day":
| case "1week":
| return true;
| default:
| return false;
| }
|
| }
| }
|
|