7
7
import javax .ws .rs .GET ;
8
8
import javax .ws .rs .HeaderParam ;
9
9
import javax .ws .rs .Path ;
10
+ import javax .ws .rs .PathParam ;
10
11
import javax .ws .rs .Produces ;
11
12
import javax .ws .rs .QueryParam ;
12
13
import javax .ws .rs .core .MediaType ;
16
17
import org .knowm .xchange .bitmex .dto .account .BitmexTicker ;
17
18
import org .knowm .xchange .bitmex .dto .account .BitmexWallet ;
18
19
import org .knowm .xchange .bitmex .dto .account .BitmexWalletTransaction ;
20
+ import org .knowm .xchange .bitmex .dto .marketdata .BitmexPublicOrder ;
21
+ import org .knowm .xchange .bitmex .dto .marketdata .BitmexPublicTrade ;
22
+ import org .knowm .xchange .bitmex .dto .marketdata .results .BitmexSymbolsAndPromptsResult ;
19
23
import org .knowm .xchange .bitmex .dto .trade .BitmexPosition ;
20
- import org .knowm .xchange .bitmex .dto .trade .BitmexTrade ;
21
24
22
25
import si .mazi .rescu .ParamsDigest ;
23
26
import si .mazi .rescu .SynchronizedValueFactory ;
@@ -28,82 +31,67 @@ public interface Bitmex {
28
31
29
32
@ GET
30
33
@ Path ("user" )
31
- BitmexAccount getAccount (@ HeaderParam ("API-KEY" ) String apiKey ,
32
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
33
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ) throws IOException ;
34
+ BitmexAccount getAccount (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce , @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest )
35
+ throws IOException ;
34
36
35
37
@ GET
36
38
@ Path ("user/wallet" )
37
- BitmexWallet getWallet (@ HeaderParam ("API-KEY" ) String apiKey ,
38
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
39
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
40
- @ Nullable @ QueryParam ("currency" ) String currency ) throws IOException ;
39
+ BitmexWallet getWallet (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce , @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
40
+ @ Nullable @ PathParam ("currency" ) String currency ) throws IOException ;
41
41
42
- //Get a history of all of your wallet transactions (deposits, withdrawals, PNL)
42
+ // Get a history of all of your wallet transactions (deposits, withdrawals, PNL)
43
43
@ GET
44
44
@ Path ("user/walletHistory" )
45
- List <BitmexWalletTransaction > getWalletHistory (@ HeaderParam ("API-KEY" ) String apiKey ,
46
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
47
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
48
- @ Nullable @ QueryParam ("currency" ) String currency ) throws IOException ;
45
+ List <BitmexWalletTransaction > getWalletHistory (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
46
+ @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest , @ Nullable @ PathParam ("currency" ) String currency ) throws IOException ;
49
47
50
- //Get a summary of all of your wallet transactions (deposits, withdrawals, PNL)
48
+ // Get a summary of all of your wallet transactions (deposits, withdrawals, PNL)
51
49
@ GET
52
50
@ Path ("user/walletSummary" )
53
- List <BitmexWalletTransaction > getWalletSummary (@ HeaderParam ("API-KEY" ) String apiKey ,
54
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
55
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
56
- @ Nullable @ QueryParam ("currency" ) String currency ) throws IOException ;
51
+ List <BitmexWalletTransaction > getWalletSummary (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
52
+ @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest , @ Nullable @ PathParam ("currency" ) String currency ) throws IOException ;
57
53
58
54
@ GET
59
55
@ Path ("user/margin" )
60
- BitmexMarginAccount getMarginAccountStatus (@ HeaderParam ("API-KEY" ) String apiKey ,
61
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
62
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
63
- @ Nullable @ QueryParam ("currency" ) String currency ) throws IOException ;
56
+ BitmexMarginAccount getMarginAccountStatus (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
57
+ @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest , @ Nullable @ PathParam ("currency" ) String currency ) throws IOException ;
64
58
65
59
@ GET
66
60
@ Path ("user/margin?currency=all" )
67
- List <BitmexMarginAccount > getMarginAccountsStatus (@ HeaderParam ("API-KEY" ) String apiKey ,
68
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
61
+ List <BitmexMarginAccount > getMarginAccountsStatus (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
69
62
@ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ) throws IOException ;
70
63
71
64
@ GET
72
65
@ Path ("trade" )
73
- List <BitmexTrade > getTrades (@ HeaderParam ("API-KEY" ) String apiKey ,
74
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
75
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ) throws IOException ;
66
+ BitmexPublicTrade [] getTrades (@ QueryParam ("symbol" ) String currencyPair , @ QueryParam ("reverse" ) Boolean reverse ) throws IOException ;
76
67
77
68
@ GET
78
- @ Path ("trade" )
79
- List <BitmexTrade > getTrades (@ HeaderParam ("API-KEY" ) String apiKey ,
80
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
81
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
82
- @ QueryParam ("symbol" ) String symbol ) throws IOException ;
69
+ @ Path ("orderBook/L2" )
70
+ BitmexPublicOrder [] getDepth (@ QueryParam ("symbol" ) String currencyPair , @ QueryParam ("depth" ) Double depth ) throws IOException ;
83
71
84
72
@ GET
85
73
@ Path ("position" )
86
- List <BitmexPosition > getPositions (@ HeaderParam ("API-KEY" ) String apiKey ,
87
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
88
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ) throws IOException ;
74
+ List <BitmexPosition > getPositions (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce , @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest )
75
+ throws IOException ;
89
76
90
77
@ GET
91
78
@ Path ("position" )
92
- List <BitmexPosition > getPositions (@ HeaderParam ("API-KEY" ) String apiKey ,
93
- @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce ,
94
- @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
95
- @ Nullable @ QueryParam ("symbol" ) String symbol ,
96
- @ Nullable @ QueryParam ("filter" ) String filter ) throws IOException ;
79
+ List <BitmexPosition > getPositions (@ HeaderParam ("API-KEY" ) String apiKey , @ HeaderParam ("API-NONCE" ) SynchronizedValueFactory <Long > nonce , @ HeaderParam ("API-SIGNATURE" ) ParamsDigest paramsDigest ,
80
+ @ Nullable @ QueryParam ("symbol" ) String symbol , @ Nullable @ QueryParam ("filter" ) String filter ) throws IOException ;
97
81
98
82
@ GET
99
83
@ Path ("instrument" )
100
84
List <BitmexTicker > getTickers () throws IOException , BitmexException ;
101
85
102
86
@ GET
103
87
@ Path ("instrument" )
104
- List <BitmexTicker > getTicker (@ QueryParam ("symbol" ) String symbol ) throws IOException , BitmexException ;
88
+ List <BitmexTicker > getTicker (@ PathParam ("symbol" ) String symbol ) throws IOException , BitmexException ;
105
89
106
90
@ GET
107
91
@ Path ("instrument/active" )
108
92
List <BitmexTicker > getActiveTickers () throws IOException , BitmexException ;
93
+
94
+ @ GET
95
+ @ Path ("instrument/activeIntervals" )
96
+ BitmexSymbolsAndPromptsResult getPromptsAndSymbols () throws IOException , BitmexException ;
109
97
}
0 commit comments