forked from gateio/gateapi-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_order.go
60 lines (58 loc) · 2.47 KB
/
model_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
/*
* Gate API v4
*
* 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: support@mail.gate.io
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package gateapi
// Spot order details
type Order struct {
// Order ID
Id string `json:"id,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(.)
Text string `json:"text,omitempty"`
// Order creation time
CreateTime string `json:"create_time,omitempty"`
// Order last modification time
UpdateTime string `json:"update_time,omitempty"`
// Order status - `open`: to be filled - `closed`: filled - `cancelled`: cancelled
Status string `json:"status,omitempty"`
// Currency pair
CurrencyPair string `json:"currency_pair"`
// Order type. limit - limit order
Type string `json:"type,omitempty"`
// Account type. spot - use spot account; margin - use margin account
Account string `json:"account,omitempty"`
// Order side
Side string `json:"side"`
// Trade amount
Amount string `json:"amount"`
// Order price
Price string `json:"price"`
// Time in force - gtc: GoodTillCancelled - ioc: ImmediateOrCancelled, taker only - poc: PendingOrCancelled, makes a post-only order that always enjoys a maker fee
TimeInForce string `json:"time_in_force,omitempty"`
// Used in margin trading(i.e. `account` is `margin`) to allow automatic loan of insufficient part if balance is not enough.
AutoBorrow bool `json:"auto_borrow,omitempty"`
// Amount left to fill
Left string `json:"left,omitempty"`
// Total filled in quote currency. Deprecated in favor of `filled_total`
FillPrice string `json:"fill_price,omitempty"`
// Total filled in quote currency
FilledTotal string `json:"filled_total,omitempty"`
// Fee deducted
Fee string `json:"fee,omitempty"`
// Fee currency unit
FeeCurrency string `json:"fee_currency,omitempty"`
// Point used to deduct fee
PointFee string `json:"point_fee,omitempty"`
// GT used to deduct fee
GtFee string `json:"gt_fee,omitempty"`
// Whether GT fee discount is used
GtDiscount bool `json:"gt_discount,omitempty"`
// Rebated fee
RebatedFee string `json:"rebated_fee,omitempty"`
// Rebated fee currency unit
RebatedFeeCurrency string `json:"rebated_fee_currency,omitempty"`
}