We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4874af5 commit b92bf55Copy full SHA for b92bf55
gtt.go
@@ -109,12 +109,17 @@ type GTTParams struct {
109
Exchange string
110
LastPrice float64
111
TransactionType string
112
+ Product string
113
Trigger Trigger
114
}
115
116
func newGTT(o GTTParams) GTT {
117
var orders Orders
118
119
+ if o.Product == "" {
120
+ o.Product = ProductCNC
121
+ }
122
+
123
for i := range o.Trigger.TriggerValues() {
124
orders = append(orders, Order{
125
Exchange: o.Exchange,
@@ -123,7 +128,7 @@ func newGTT(o GTTParams) GTT {
128
Quantity: o.Trigger.Quantities()[i],
129
Price: o.Trigger.LimitPrices()[i],
130
OrderType: OrderTypeLimit,
126
- Product: ProductCNC,
131
+ Product: o.Product,
127
132
})
133
134
return GTT{
0 commit comments