Skip to content

Commit

Permalink
spellcheck: fix and update (thrasher-corp#1359)
Browse files Browse the repository at this point in the history
* spellcheck: fix and update

* spellcheck: add exclude line for gateio_types
  • Loading branch information
shazbert authored Oct 3, 2023
1 parent 7f0faf7 commit ecf0a5b
Show file tree
Hide file tree
Showing 31 changed files with 42 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [Currency Converter API](https://free.currencyconverterapi.com/)
+ Fetches up to date currency data from [Currency Converter API](https://free.currencyconverterapi.com/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion cmd/documentation/currency_templates/fx_currencylayer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [Currency Layer](https://currencylayer.com/)
+ Fetches up to date currency data from [Currency Layer](https://currencylayer.com/)

### How to enable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [ExchangeRate.host API]("https://exchangerate.host")
+ Fetches up to date currency data from [ExchangeRate.host API]("https://exchangerate.host")

### How to enable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [Exchange rates API]("http://exchangeratesapi.io")
+ Fetches up to date currency data from [Exchange rates API]("http://exchangeratesapi.io")

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion cmd/documentation/currency_templates/fx_fixer.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [Fixer.io](https://fixer.io/)
+ Fetches up to date currency data from [Fixer.io](https://fixer.io/)

### How to enable

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{template "header" .}}
## Current Features for {{.Name}}

+ Fetches up to date curency data from [Open Exchange Rates](https://openexchangerates.org/)
+ Fetches up to date currency data from [Open Exchange Rates](https://openexchangerates.org/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ func migrateConfig(configFile, targetDir string) (string, error) {
// ReadConfigFromFile reads the configuration from the given file
// if target file is encrypted, prompts for encryption key
// Also - if not in dryrun mode - it checks if the configuration needs to be encrypted
// and stores the file as encrypted, if necessary (prompting for enryption key)
// and stores the file as encrypted, if necessary (prompting for encryption key)
func (c *Config) ReadConfigFromFile(configPath string, dryrun bool) error {
defaultPath, _, err := GetFilePath(configPath)
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions contrib/spellcheck/exclude_lines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@
wsBalanceUpdate = "bu"
"59512": errors.New("unable to set up this permission for ND brokers sub accounts. by default, all ND sub accounts can transfer funds out"),
currency.MIS: 0.002,
SHFT = NewCode("SHFT")
currency.SHFT: 84,
2 changes: 1 addition & 1 deletion currency/forexprovider/currencyconverterapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for currencyconverterapi

+ Fetches up to date curency data from [Currency Converter API](https://free.currencyconverterapi.com/)
+ Fetches up to date currency data from [Currency Converter API](https://free.currencyconverterapi.com/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/forexprovider/currencylayer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for currencylayer

+ Fetches up to date curency data from [Currency Layer](https://currencylayer.com/)
+ Fetches up to date currency data from [Currency Layer](https://currencylayer.com/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/forexprovider/exchangerate.host/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for exchangerate.host

+ Fetches up to date curency data from [ExchangeRate.host API]("https://exchangerate.host")
+ Fetches up to date currency data from [ExchangeRate.host API]("https://exchangerate.host")

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/forexprovider/exchangeratesapi.io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for exchangeratesapi.io

+ Fetches up to date curency data from [Exchange rates API]("http://exchangeratesapi.io")
+ Fetches up to date currency data from [Exchange rates API]("http://exchangeratesapi.io")

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/forexprovider/fixer.io/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for fixer.io

+ Fetches up to date curency data from [Fixer.io](https://fixer.io/)
+ Fetches up to date currency data from [Fixer.io](https://fixer.io/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/forexprovider/openexchangerates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Join our slack to discuss all things related to GoCryptoTrader! [GoCryptoTrader

## Current Features for openexchangerates

+ Fetches up to date curency data from [Open Exchange Rates](https://openexchangerates.org/)
+ Fetches up to date currency data from [Open Exchange Rates](https://openexchangerates.org/)

### How to enable

Expand Down
2 changes: 1 addition & 1 deletion currency/storage_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Storage struct {
defaultBaseCurrency Code
// DefaultFiatCurrencies has the default minimum of FIAT values
defaultFiatCurrencies Currencies
// DefaultCryptoCurrencies has the default minimum of crytpocurrency values
// DefaultCryptoCurrencies has the default minimum of cryptocurrency values
defaultCryptoCurrencies Currencies
// FiatExchangeMarkets defines an interface to access FX data for fiat
// currency rates
Expand Down
2 changes: 1 addition & 1 deletion exchanges/binance/binance_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ func (o *orderbookManager) completeInitialSync(pair currency.Pair) error {
asset.Spot)
}
if !state.initialSync {
return fmt.Errorf("initital sync already set to false for %s %s",
return fmt.Errorf("initial sync already set to false for %s %s",
pair,
asset.Spot)
}
Expand Down
2 changes: 1 addition & 1 deletion exchanges/binanceus/binanceus_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ func (o *orderbookManager) completeInitialSync(pair currency.Pair) error {
asset.Spot)
}
if !state.initialSync {
return fmt.Errorf("initital sync already set to false for %s %s",
return fmt.Errorf("initial sync already set to false for %s %s",
pair,
asset.Spot)
}
Expand Down
2 changes: 1 addition & 1 deletion exchanges/bithumb/bithumb_ws_orderbook.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func (o *orderbookManager) completeInitialSync(pair currency.Pair) error {
asset.Spot)
}
if !state.initialSync {
return fmt.Errorf("initital sync already set to false for %s %s",
return fmt.Errorf("initial sync already set to false for %s %s",
pair,
asset.Spot)
}
Expand Down
2 changes: 1 addition & 1 deletion exchanges/bitmex/bitmex.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ func (b *Bitmex) ConfirmWithdrawal(ctx context.Context, token string) (Transacti
&info)
}

// GetCryptoDepositAddress returns a deposit address for a cryptocurency
// GetCryptoDepositAddress returns a deposit address for a cryptocurrency
func (b *Bitmex) GetCryptoDepositAddress(ctx context.Context, cryptoCurrency string) (string, error) {
var address string
if !strings.EqualFold(cryptoCurrency, currency.XBT.String()) {
Expand Down
6 changes: 3 additions & 3 deletions exchanges/bitstamp/bitstamp_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,9 +1002,9 @@ func (b *Bitstamp) GetHistoricCandlesExtended(ctx context.Context, pair currency
}

for i := range candles.Data.OHLCV {
timstamp := time.Unix(candles.Data.OHLCV[i].Timestamp, 0)
if timstamp.Before(req.RangeHolder.Ranges[x].Start.Time) ||
timstamp.After(req.RangeHolder.Ranges[x].End.Time) {
timestamp := time.Unix(candles.Data.OHLCV[i].Timestamp, 0)
if timestamp.Before(req.RangeHolder.Ranges[x].Start.Time) ||
timestamp.After(req.RangeHolder.Ranges[x].End.Time) {
continue
}
timeSeries = append(timeSeries, kline.Candle{
Expand Down
2 changes: 1 addition & 1 deletion exchanges/coinut/coinut_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (
// wss://wsapi-na.coinut.com
// wss://wsapi-eu.coinut.com

// WsConnect intiates a websocket connection
// WsConnect initiates a websocket connection
func (c *COINUT) WsConnect() error {
if !c.Websocket.IsEnabled() || !c.IsEnabled() {
return errors.New(stream.WebsocketNotEnabled)
Expand Down
2 changes: 1 addition & 1 deletion exchanges/gateio/gateio_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ type MarginAccountItem struct {
Quote AccountBalanceInformation `json:"quote"`
}

// AccountBalanceInformation represents currency account balace information.
// AccountBalanceInformation represents currency account balance information.
type AccountBalanceInformation struct {
Available convert.StringToFloat64 `json:"available"`
Borrowed convert.StringToFloat64 `json:"borrowed"`
Expand Down
2 changes: 1 addition & 1 deletion exchanges/gateio/gateio_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ func (g *Gateio) generatePayload(event string, channelsToSubscribe []stream.Chan
if channelsToSubscribe[i].Channel == "spot.book_ticker" {
// To get all orderbook assets subscribed it needs to be batched and
// only spot.book_ticker can be batched, if not it will take about
// half an hour for initital sync.
// half an hour for initial sync.
if batch != nil {
*batch = append(*batch, params...)
} else {
Expand Down
2 changes: 1 addition & 1 deletion exchanges/gemini/gemini_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ type WithdrawalAddress struct {
Reason string `json:"reason"`
}

// ErrorCapture is a generlized error response from the server
// ErrorCapture is a generalized error response from the server
type ErrorCapture struct {
Result string `json:"result"`
Reason string `json:"reason"`
Expand Down
4 changes: 2 additions & 2 deletions exchanges/huobi/huobi_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ type MarginAccountBalance struct {
// SpotNewOrderRequestParams holds the params required to place
// an order
type SpotNewOrderRequestParams struct {
AccountID int `json:"account-id,string"` // Account ID, obtained using the accounts method. Curency trades use the accountid of the ‘spot’ account; for loan asset transactions, please use the accountid of the ‘margin’ account.
AccountID int `json:"account-id,string"` // Account ID, obtained using the accounts method. Currency trades use the accountid of the ‘spot’ account; for loan asset transactions, please use the accountid of the ‘margin’ account.
Amount float64 `json:"amount"` // The limit price indicates the quantity of the order, the market price indicates how much to buy when the order is paid, and the market price indicates how much the coin is sold when the order is sold.
Price float64 `json:"price"` // Order price, market price does not use this parameter
Source string `json:"source"` // Order source, api: API call, margin-api: loan asset transaction
Expand Down Expand Up @@ -769,7 +769,7 @@ var (
// SpotNewOrderRequestTypeBuyLimit buy limit order
SpotNewOrderRequestTypeBuyLimit = SpotNewOrderRequestParamsType("buy-limit")

// SpotNewOrderRequestTypeSellLimit sell lmit order
// SpotNewOrderRequestTypeSellLimit sell limit order
SpotNewOrderRequestTypeSellLimit = SpotNewOrderRequestParamsType("sell-limit")
)

Expand Down
2 changes: 1 addition & 1 deletion exchanges/kucoin/kucoin_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ type WsSpotTicker struct {
}

// WsSpotTickerDetail represents the detail of a spot ticker data.
// This represents all websocket ticker information pushed as a result of susbcription to /market/snapshot:{symbol}, and /market/snapshot:{currency,market}
// This represents all websocket ticker information pushed as a result of subscription to /market/snapshot:{symbol}, and /market/snapshot:{currency,market}
type WsSpotTickerDetail struct {
AveragePrice float64 `json:"averagePrice"`
BaseCurrency string `json:"baseCurrency"`
Expand Down
2 changes: 1 addition & 1 deletion exchanges/kucoin/kucoin_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ func (o *orderbookManager) completeInitialSync(pair currency.Pair, assetType ass
assetType)
}
if !state.initialSync {
return fmt.Errorf("initital sync already set to false for %s %s",
return fmt.Errorf("initial sync already set to false for %s %s",
pair,
assetType)
}
Expand Down
16 changes: 8 additions & 8 deletions exchanges/okcoin/okcoin_errors_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ func (o *Okcoin) SetErrorDefaults() {
"51349": errors.New(`stop profit price should be greater than the highest price in the range`),
"51350": errors.New(`no recommended parameters`),
"51351": errors.New(`single income must be greater than 0`),
"51400": errors.New(`cancelation failed as the order does not exist`),
"51401": errors.New(`cancelation failed as the order is already canceled`),
"51402": errors.New(`cancelation failed as the order is already completed`),
"51403": errors.New(`cancelation failed as the order type does not support cancelation`),
"51400": errors.New(`cancellation failed as the order does not exist`),
"51401": errors.New(`cancellation failed as the order is already canceled`),
"51402": errors.New(`cancellation failed as the order is already completed`),
"51403": errors.New(`cancellation failed as the order type does not support cancellation`),
"51404": errors.New(`order cancellation unavailable during the second phase of call auction`),
"51405": errors.New(`cancelation failed as you do not have any pending orders`),
"51405": errors.New(`cancellation failed as you do not have any pending orders`),
"51407": errors.New(`either order ID or client order ID is required`),
"51408": errors.New(`pair id or name does not match the order info`),
"51409": errors.New(`either pair id or pair name id is required`),
"51410": errors.New(`cancelation pending. duplicate order rejected`),
"51411": errors.New(`account does not have permission for mass cancelation`),
"51410": errors.New(`cancellation pending. duplicate order rejected`),
"51411": errors.New(`account does not have permission for mass cancellation`),
"51412": errors.New(`the order has been triggered and cannot be canceled`),
"51413": errors.New(`cancelation failed as the order type is not supported by endpoint`),
"51413": errors.New(`cancellation failed as the order type is not supported by endpoint`),
"51415": errors.New(`unable to place order. spot trading only supports using the last price as trigger price. please select "Last" and try again`),
"51500": errors.New(`either order price or amount is required`),
"51503": errors.New(`order modification failed as the order does not exist`),
Expand Down
2 changes: 1 addition & 1 deletion exchanges/orderbook/linked_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (ll *linkedList) load(items Items, stack *stack, tn time.Time) {
}

// Push has references to dangling nodes that need to be removed and pushed
// back onto stack for re-use
// back onto stack for reuse
var push *Node
// Cleave unused reference chain from main chain
if prev == nil {
Expand Down
2 changes: 1 addition & 1 deletion exchanges/stream/websocket_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (w *WebsocketConnection) GenerateMessageID(highPrec bool) int64 {
max = 2e12
min = 1e12
}
// utlization of hard coded positive numbers and default crypto/rand
// utilization of hard coded positive numbers and default crypto/rand
// io.reader will panic on error instead of returning
randomNumber, err := rand.Int(rand.Reader, big.NewInt(max-min+1))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion exchanges/yobit/yobit_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type TradeHistory struct {
Timestamp float64 `json:"timestamp"`
}

// DepositAddress stores a curency deposit address
// DepositAddress stores a currency deposit address
type DepositAddress struct {
Success int `json:"success"`
Return struct {
Expand Down

0 comments on commit ecf0a5b

Please sign in to comment.