Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions api_spot.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ package gateapi

import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"

"github.com/antihax/optional"
)

// Linger please
Expand Down Expand Up @@ -1676,6 +1677,7 @@ func (a *SpotApiService) ListOrders(ctx context.Context, currencyPair string, st
// CreateOrderOpts Optional parameters for the method 'CreateOrder'
type CreateOrderOpts struct {
XGateExptime optional.Int64
ChannelID optional.String // rebates for API broker
}

/*
Expand Down Expand Up @@ -1721,8 +1723,13 @@ func (a *SpotApiService) CreateOrder(ctx context.Context, order Order, localVarO
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
if localVarOptionals != nil && localVarOptionals.XGateExptime.IsSet() {
localVarHeaderParams["x-gate-exptime"] = parameterToString(localVarOptionals.XGateExptime.Value(), "")
if localVarOptionals != nil {
if localVarOptionals.XGateExptime.IsSet() {
localVarHeaderParams["x-gate-exptime"] = parameterToString(localVarOptionals.XGateExptime.Value(), "")
}
if localVarOptionals.ChannelID.IsSet() {
localVarHeaderParams["X-Gate-Channel-Id"] = parameterToString(localVarOptionals.ChannelID.Value(), "")
}
}
// body params
localVarPostBody = &order
Expand Down