mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
qa/spelling: Add Codespell support (#1121)
* Add codespell support * Fix paths * Add HTML files to exclusion list
This commit is contained in:
@@ -32,7 +32,7 @@ type Okx struct {
|
||||
WsResponseMultiplexer wsRequestDataChannelsMultiplexer
|
||||
|
||||
// WsRequestSemaphore channel is used to block write operation on the websocket connection to reduce contention; a kind of bounded parallelism.
|
||||
// it is made to hold upto 20 integers so that up to 20 write operations can be called over the websocket connection at a time.
|
||||
// it is made to hold up to 20 integers so that up to 20 write operations can be called over the websocket connection at a time.
|
||||
// and when the operation is completed the thread releases (consumes) one value from the channel so that the other waiting operation can enter.
|
||||
// ok.WsRequestSemaphore <- 1
|
||||
// defer func() { <-ok.WsRequestSemaphore }()
|
||||
@@ -2648,7 +2648,7 @@ func (ok *Okx) GetGridAlgoOrdersList(ctx context.Context, algoOrderType, algoID,
|
||||
after, before, gridAlgoOrders, limit)
|
||||
}
|
||||
|
||||
// GetGridAlgoOrderHistory retrieves list of grid algo orders with the complete data including the stoped orders.
|
||||
// GetGridAlgoOrderHistory retrieves list of grid algo orders with the complete data including the stopped orders.
|
||||
func (ok *Okx) GetGridAlgoOrderHistory(ctx context.Context, algoOrderType, algoID,
|
||||
instrumentID, instrumentType,
|
||||
after, before string, limit int64) ([]GridAlgoOrderResponse, error) {
|
||||
@@ -2984,7 +2984,7 @@ func (ok *Okx) GetTickers(ctx context.Context, instType, uly, instID string) ([]
|
||||
case instID != "":
|
||||
params.Set("instId", instID)
|
||||
default:
|
||||
return nil, errors.New("missing required variable instType (instrument type) or insId( Instrument ID )")
|
||||
return nil, errors.New("missing required variable instType (instrument type) or instId( Instrument ID )")
|
||||
}
|
||||
var response []TickerResponse
|
||||
return response, ok.SendHTTPRequest(ctx, exchange.RestSpot, getTickersEPL, http.MethodGet, common.EncodeURLValues(marketTickers, params), nil, &response, false)
|
||||
@@ -2996,7 +2996,7 @@ func (ok *Okx) GetTicker(ctx context.Context, instrumentID string) (*TickerRespo
|
||||
if instrumentID != "" {
|
||||
params.Set("instId", instrumentID)
|
||||
} else {
|
||||
return nil, errors.New("missing required variable instType(instruction type) or insId( Instrument ID )")
|
||||
return nil, errors.New("missing required variable instType(instruction type) or instId( Instrument ID )")
|
||||
}
|
||||
var response []TickerResponse
|
||||
err := ok.SendHTTPRequest(ctx, exchange.RestSpot, getTickersEPL, http.MethodGet, common.EncodeURLValues(marketTicker, params), nil, &response, false)
|
||||
@@ -3374,7 +3374,6 @@ func (ok *Okx) GetDeliveryHistory(ctx context.Context, instrumentType, underlyin
|
||||
if underlying == "" {
|
||||
return nil, errMissingRequiredUnderlying
|
||||
}
|
||||
params.Set("Underlying", underlying)
|
||||
params.Set("uly", underlying)
|
||||
if !after.IsZero() {
|
||||
params.Set("after", strconv.FormatInt(after.UnixMilli(), 10))
|
||||
|
||||
@@ -1097,7 +1097,7 @@ type LendingRate struct {
|
||||
Rate float64 `json:"rate,string"`
|
||||
}
|
||||
|
||||
// LendingHistory holds lending hostory responses
|
||||
// LendingHistory holds lending history responses
|
||||
type LendingHistory struct {
|
||||
Currency string `json:"ccy"`
|
||||
Amount float64 `json:"amt,string"`
|
||||
@@ -1490,7 +1490,7 @@ type InterestAccruedData struct {
|
||||
Currency string `json:"ccy"`
|
||||
InstrumentID string `json:"instId"`
|
||||
Interest string `json:"interest"`
|
||||
InterestRate string `json:"interestRate"` // intereset rate in an hour.
|
||||
InterestRate string `json:"interestRate"` // Interest rate in an hour.
|
||||
Liability string `json:"liab"`
|
||||
MarginMode string `json:"mgnMode"` // Margin mode "cross" "isolated"
|
||||
Timestamp okxUnixMilliTime `json:"ts"`
|
||||
@@ -1860,7 +1860,7 @@ type SubaccountInfo struct {
|
||||
SubaccountLabel string `json:"label"`
|
||||
MobileNumber string `json:"mobile"` // Mobile number that linked with the sub-account.
|
||||
GoogleAuth bool `json:"gAuth"` // If the sub-account switches on the Google Authenticator for login authentication.
|
||||
CanTransferOut bool `json:"canTransOut"` // If can tranfer out, false: can not tranfer out, true: can transfer.
|
||||
CanTransferOut bool `json:"canTransOut"` // If can transfer out, false: can not transfer out, true: can transfer.
|
||||
Timestamp okxUnixMilliTime `json:"ts"`
|
||||
}
|
||||
|
||||
@@ -2414,7 +2414,7 @@ func (a *WsOrderActionResponse) populateFromIncomingData(incoming *wsIncomingDat
|
||||
return nil
|
||||
}
|
||||
|
||||
// SubscriptionOperationInput represents the account channel input datas
|
||||
// SubscriptionOperationInput represents the account channel input data
|
||||
type SubscriptionOperationInput struct {
|
||||
Operation string `json:"op"`
|
||||
Arguments []SubscriptionInfo `json:"args"`
|
||||
@@ -2642,12 +2642,12 @@ type WsQuoteData struct {
|
||||
|
||||
// WsStructureBlocTrade represents websocket push data for "struc-block-trades" subscription
|
||||
type WsStructureBlocTrade struct {
|
||||
Argument SubscriptionInfo `json:"arg"`
|
||||
Data []WsBlocTradeResponse `json:"data"`
|
||||
Argument SubscriptionInfo `json:"arg"`
|
||||
Data []WsBlockTradeResponse `json:"data"`
|
||||
}
|
||||
|
||||
// WsBlocTradeResponse represents a structure bloc order information
|
||||
type WsBlocTradeResponse struct {
|
||||
// WsBlockTradeResponse represents a structure block order information
|
||||
type WsBlockTradeResponse struct {
|
||||
CreationTime okxUnixMilliTime `json:"cTime"`
|
||||
RfqID string `json:"rfqId"`
|
||||
ClientSuppliedRfqID string `json:"clRfqId"`
|
||||
@@ -2892,7 +2892,7 @@ type WsSystemStatusResponse struct {
|
||||
Data []SystemStatusResponse `json:"data"`
|
||||
}
|
||||
|
||||
// WsPublicTradesResponse represents websocket push data of structured bloc trades as a result of subscription to "public-struc-block-trades"
|
||||
// WsPublicTradesResponse represents websocket push data of structured block trades as a result of subscription to "public-struc-block-trades"
|
||||
type WsPublicTradesResponse struct {
|
||||
Argument SubscriptionInfo `json:"arg"`
|
||||
Data []PublicTradesResponse `json:"data"`
|
||||
|
||||
@@ -669,7 +669,7 @@ func (ok *Okx) GetRecentTrades(ctx context.Context, p currency.Pair, assetType a
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetHistoricTrades retrives historic trade data within the timeframe provided
|
||||
// GetHistoricTrades retrieves historic trade data within the timeframe provided
|
||||
func (ok *Okx) GetHistoricTrades(ctx context.Context, p currency.Pair, assetType asset.Item, timestampStart, timestampEnd time.Time) ([]trade.Data, error) {
|
||||
if timestampStart.Before(time.Now().Add(-kline.ThreeMonth.Duration())) {
|
||||
return nil, errOnlyThreeMonthsSupported
|
||||
|
||||
Reference in New Issue
Block a user