-
Notifications
You must be signed in to change notification settings - Fork 1
/
futures_params.go
65 lines (57 loc) · 1.72 KB
/
futures_params.go
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
package okex
/*
OKEX futures contract api request params
@author Tony Tian
@date 2018-03-17
@version 1.0.0
*/
/*
Create a new order
ClientOid: You setting order id.(optional)
Type: The execution type @see file: futures_constants.go
InstrumentId: The id of the futures, eg: BTC_USD_0331
Price: The order price: Maximum 1 million
Amount: The order amount: Maximum 1 million
MatchPrice: Match best counter party price (BBO)? 0: No 1: Yes If yes, the 'price' field is ignored
LeverRate: lever, default 10.
*/
type FuturesNewOrderParams struct {
InstrumentId string `json:"instrument_id"`
Leverage string `json:"leverage"`
FuturesBatchNewOrderItem
}
/*
OrdersData: Batch create new orders json string.(Max of 5 orders are allowed per request))
*/
type FuturesBatchNewOrderParams struct {
InstrumentId string `json:"instrument_id"`
Leverage string `json:"leverage"`
OrdersData string `json:"orders_data"`
}
type FuturesBatchNewOrderItem struct {
ClientOid string `json:"client_oid"`
Type string `json:"type"`
Price string `json:"price"`
Size string `json:"size"`
MatchPrice string `json:"match_price"`
}
type FuturesClosePositionParams struct {
ClosePositionData []ClosePositionData
}
type ClosePositionData struct {
InstrumentId string `json:"instrument_id"`
Type string `json:"type"`
LeverRate string `json:"lever_rate"`
}
/*
Order status: 0: waiting for transaction 1: 1: part of the deal 2: all transactions 3: cancelling 4: canceled.
Currency: futures currencies @see file: futures_constants.go
*/
type FuturesOrdersParams struct {
Currency string
Status int
}
type FuturesFillsParams struct {
OrderId string `json:"order_id"`
InstrumentId string `json:"instrument_id"`
}