-
Notifications
You must be signed in to change notification settings - Fork 42
/
model_batch_futures_order.go
70 lines (68 loc) · 4.79 KB
/
model_batch_futures_order.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
66
67
68
69
70
/*
* Gate API v4
*
* Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf.
*
* Contact: [email protected]
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package gateapi
// Futures order details
type BatchFuturesOrder struct {
// Whether the batch of orders succeeded
Succeeded bool `json:"succeeded,omitempty"`
// Error label, only exists if execution fails
Label string `json:"label,omitempty"`
// Error detail, only present if execution failed and details need to be given
Detail string `json:"detail,omitempty"`
// Futures order ID
Id int64 `json:"id,omitempty"`
// User ID
User int32 `json:"user,omitempty"`
// Creation time of order
CreateTime float64 `json:"create_time,omitempty"`
// Order finished time. Not returned if order is open
FinishTime float64 `json:"finish_time,omitempty"`
// How the order was finished. - filled: all filled - cancelled: manually cancelled - liquidated: cancelled because of liquidation - ioc: time in force is `IOC`, finish immediately - auto_deleveraged: finished by ADL - reduce_only: cancelled because of increasing position while `reduce-only` set- position_closed: cancelled because of position close - position_closed: canceled because the position was closed - reduce_out: only reduce positions by excluding hard-to-fill orders - stp: cancelled because self trade prevention
FinishAs string `json:"finish_as,omitempty"`
// Order status - `open`: waiting to be traded - `finished`: finished
Status string `json:"status,omitempty"`
// Futures contract
Contract string `json:"contract,omitempty"`
// Order size. Specify positive number to make a bid, and negative number to ask
Size int64 `json:"size,omitempty"`
// Display size for iceberg order. 0 for non-iceberg. Note that you will have to pay the taker fee for the hidden size
Iceberg int64 `json:"iceberg,omitempty"`
// Order price. 0 for market order with `tif` set as `ioc`
Price string `json:"price,omitempty"`
// Set as `true` to close the position, with `size` set to 0
Close bool `json:"close,omitempty"`
// Is the order to close position
IsClose bool `json:"is_close,omitempty"`
// Set as `true` to be reduce-only order
ReduceOnly bool `json:"reduce_only,omitempty"`
// Is the order reduce-only
IsReduceOnly bool `json:"is_reduce_only,omitempty"`
// Is the order for liquidation
IsLiq bool `json:"is_liq,omitempty"`
// Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee - fok: FillOrKill, fill either completely or none
Tif string `json:"tif,omitempty"`
// Size left to be traded
Left int64 `json:"left,omitempty"`
// Fill price of the order
FillPrice string `json:"fill_price,omitempty"`
// User defined information. If not empty, must follow the rules below: 1. prefixed with `t-` 2. no longer than 28 bytes without `t-` prefix 3. can only include 0-9, A-Z, a-z, underscore(_), hyphen(-) or dot(.) Besides user defined information, reserved contents are listed below, denoting how the order is created: - web: from web - api: from API - app: from mobile phones - auto_deleveraging: from ADL - liquidation: from liquidation - insurance: from insurance
Text string `json:"text,omitempty"`
// Taker fee
Tkfr string `json:"tkfr,omitempty"`
// Maker fee
Mkfr string `json:"mkfr,omitempty"`
// Reference user ID
Refu int32 `json:"refu,omitempty"`
// Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0
AutoSize string `json:"auto_size,omitempty"`
// Self-Trading Prevention Action. Users can use this field to set self-trade prevetion strategies 1. After users join the `STP Group`, he can pass `stp_act` to limit the user's self-trade prevetion strategy. If `stp_act` is not passed, the default is `cn` strategy。 2. When the user does not join the `STP group`, an error will be returned when passing the `stp_act` parameter。 3. If the user did not use 'stp_act' when placing the order, 'stp_act' will return '-' - cn: Cancel newest, Cancel new orders and keep old ones - co: Cancel oldest, Cancel old orders and keep new ones - cb: Cancel both, Both old and new orders will be cancelled
StpAct string `json:"stp_act,omitempty"`
// Orders between users in the same `stp_id` group are not allowed to be self-traded 1. If the `stp_id` of two orders being matched is non-zero and equal, they will not be executed. Instead, the corresponding strategy will be executed based on the `stp_act` of the taker. 2. `stp_id` returns `0` by default for orders that have not been set for `STP group`
StpId int32 `json:"stp_id,omitempty"`
}