mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
spellcheck: fix and update (#1359)
* spellcheck: fix and update * spellcheck: add exclude line for gateio_types
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -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{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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
|
||||
@@ -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")
|
||||
)
|
||||
|
||||
|
||||
@@ -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"`
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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`),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user