File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 88const (
99 OrderFlagHidden int = 64
1010 OrderFlagClose int = 512
11+ OrderFlagReduceOnly int = 1024
1112 OrderFlagPostOnly int = 4096
1213 OrderFlagOCO int = 16384
1314 Checksum int = 131072
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ type NewRequest struct {
2222 PriceOcoStop float64 `json:"price_oco_stop,string,omitempty"`
2323 Hidden bool `json:"hidden,omitempty"`
2424 PostOnly bool `json:"postonly,omitempty"`
25+ ReduceOnly bool `json:"reduceonly,omitempty"`
2526 Close bool `json:"close,omitempty"`
2627 OcoOrder bool `json:"oco_order,omitempty"`
2728 TimeInForce string `json:"tif,omitempty"`
@@ -77,6 +78,10 @@ func (nr *NewRequest) EnrichedPayload() interface{} {
7778 pld .Flags = pld .Flags + common .OrderFlagPostOnly
7879 }
7980
81+ if nr .ReduceOnly {
82+ pld .Flags = pld .Flags + common .OrderFlagReduceOnly
83+ }
84+
8085 if nr .OcoOrder {
8186 pld .Flags = pld .Flags + common .OrderFlagOCO
8287 }
Original file line number Diff line number Diff line change @@ -52,7 +52,6 @@ type Client struct {
5252 Pulse PulseService
5353 Invoice InvoiceService
5454 Market MarketService
55-
5655 Synchronous
5756}
5857
@@ -100,11 +99,11 @@ func NewClientWithURL(url string) *Client {
10099
101100// Create a new Rest client with a synchronous HTTP handler and a custom nonce generaotr
102101func NewClientWithSynchronousNonce (sync Synchronous , nonce utils.NonceGenerator ) * Client {
103- return NewClientWithSynchronousURLNonce (sync , productionBaseURL , nonce )
102+ return NewClientWithSynchronousURLNonce (sync , nonce )
104103}
105104
106105// Create a new Rest client with a synchronous HTTP handler and a custom base url and nonce generator
107- func NewClientWithSynchronousURLNonce (sync Synchronous , url string , nonce utils.NonceGenerator ) * Client {
106+ func NewClientWithSynchronousURLNonce (sync Synchronous , nonce utils.NonceGenerator ) * Client {
108107 c := & Client {
109108 Synchronous : sync ,
110109 nonce : nonce ,
You can’t perform that action at this time.
0 commit comments