aboutsummaryrefslogtreecommitdiff
path: root/markets/poloniex.go
diff options
context:
space:
mode:
Diffstat (limited to 'markets/poloniex.go')
-rw-r--r--markets/poloniex.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/markets/poloniex.go b/markets/poloniex.go
index 5e1ec64..34ebb7e 100644
--- a/markets/poloniex.go
+++ b/markets/poloniex.go
@@ -13,6 +13,7 @@ var (
13 ErrorFlagCounter utils.Counter = 0 13 ErrorFlagCounter utils.Counter = 0
14 CurrencyPairNotInTicker = utils.InitFlag(&ErrorFlagCounter, "CurrencyPairNotInTicker") 14 CurrencyPairNotInTicker = utils.InitFlag(&ErrorFlagCounter, "CurrencyPairNotInTicker")
15 InvalidCredentials = utils.InitFlag(&ErrorFlagCounter, "InvalidCredentials") 15 InvalidCredentials = utils.InitFlag(&ErrorFlagCounter, "InvalidCredentials")
16 IPRestricted = utils.InitFlag(&ErrorFlagCounter, "IPRestricted")
16) 17)
17 18
18func poloniexInvalidCredentialsError(err error) bool { 19func poloniexInvalidCredentialsError(err error) bool {
@@ -22,6 +23,13 @@ func poloniexInvalidCredentialsError(err error) bool {
22 return strings.Contains(err.Error(), "Invalid API key/secret pair") 23 return strings.Contains(err.Error(), "Invalid API key/secret pair")
23} 24}
24 25
26func poloniexRestrictedIPError(err error) bool {
27 if err == nil {
28 return false
29 }
30 return strings.Contains(err.Error(), "Permission denied")
31}
32
25type CurrencyPair struct { 33type CurrencyPair struct {
26 Name string 34 Name string
27 Rate decimal.Decimal 35 Rate decimal.Decimal