Skip to content

Commit

Permalink
Add method to fetch available currencies from Poloniex, fix available…
Browse files Browse the repository at this point in the history
… currency bug in poloniex and update config_example.json
  • Loading branch information
thrasher- committed Jan 9, 2018
1 parent 0b00ea8 commit 16629c6
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 12 deletions.
47 changes: 35 additions & 12 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@
"Name": "Skynet",
"EncryptConfig": 0,
"Cryptocurrencies": "BTC,LTC,ETH,XRP,NMC,NVC,PPC,XBT,DOGE,DASH",
"CurrencyExchangeProvider": "fixer",
"CurrencyPairFormat": {
"Uppercase": true,
"Delimiter": "-"
},
"FiatDisplayCurrency": "USD",
"PortfolioAddresses": {
"Addresses": [
{
"Address": "1JCe8z4jJVNXSjohjM4i9Hh813dLCNx2Sy",
"CoinType": "BTC",
"Balance": 124178.00647714,
"Balance": 124178.00354266,
"Description": ""
},
{
"Address": "3Nxwenay9Z8Lc9JBiywExpnEFiLp6Afp8v",
"CoinType": "BTC",
"Balance": 107843.84030984,
"Balance": 123439.8370977,
"Description": ""
},
{
"Address": "LgY8ahfHRhvjVQC1zJnBhFMG5pCTMuKRqh",
"CoinType": "LTC",
"Balance": 100000.052,
"Balance": 0.03665026,
"Description": ""
},
{
Expand All @@ -40,24 +42,27 @@
"Password": "Password",
"Contacts": [
{
"Name": "Bob",
"Number": "12345",
"Enabled": false
"name": "Bob",
"number": "12345",
"enabled": false
}
]
},
"Webserver": {
"Enabled": false,
"AdminUsername": "admin",
"AdminPassword": "Password",
"ListenAddress": ":9050"
"ListenAddress": ":9050",
"WebsocketConnectionLimit": 0,
"WebsocketAllowInsecureOrigin": false
},
"Exchanges": [
{
"Name": "ANX",
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -80,11 +85,12 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "BTCUSD,LTCUSD,LTCBTC,ETHUSD,ETHBTC,ETCBTC,ETCUSD,RRTUSD,RRTBTC,ZECUSD,ZECBTC,XMRUSD,XMRBTC,DSHUSD,DSHBTC,BCCBTC,BCUBTC,BCCUSD,BCUUSD,XRPUSD,XRPBTC,IOTUSD,IOTBTC,IOTETH,EOSUSD,EOSBTC,EOSETH,SANUSD,SANBTC,SANETH,OMGUSD,OMGBTC,OMGETH,BCHUSD,BCHBTC,BCHETH",
"AvailablePairs": "BTCUSD,LTCUSD,LTCBTC,ETHUSD,ETHBTC,ETCBTC,ETCUSD,RRTUSD,RRTBTC,ZECUSD,ZECBTC,XMRUSD,XMRBTC,DSHUSD,DSHBTC,BTCEUR,XRPUSD,XRPBTC,IOTUSD,IOTBTC,IOTETH,EOSUSD,EOSBTC,EOSETH,SANUSD,SANBTC,SANETH,OMGUSD,OMGBTC,OMGETH,BCHUSD,BCHBTC,BCHETH,NEOUSD,NEOBTC,NEOETH,ETPUSD,ETPBTC,ETPETH,QTMUSD,QTMBTC,QTMETH,AVTUSD,AVTBTC,AVTETH,EDOUSD,EDOBTC,EDOETH,BTGUSD,BTGBTC,DATUSD,DATBTC,DATETH,QSHUSD,QSHBTC,QSHETH,YYWUSD,YYWBTC,YYWETH,GNTUSD,GNTBTC,GNTETH,SNTUSD,SNTBTC,SNTETH,IOTEUR,BATUSD,BATBTC,BATETH,MNAUSD,MNABTC,MNAETH,FUNUSD,FUNBTC,FUNETH,ZRXUSD,ZRXBTC,ZRXETH,TNBUSD,TNBBTC,TNBETH,SPKUSD,SPKBTC,SPKETH",
"EnabledPairs": "BTCUSD,LTCUSD,LTCBTC,ETHUSD,ETHBTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
Expand All @@ -100,6 +106,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -121,11 +128,12 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "BTC-LTC,BTC-DOGE,BTC-VTC,BTC-PPC,BTC-FTC,BTC-RDD,BTC-NXT,BTC-DASH,BTC-POT,BTC-BLK,BTC-EMC2,BTC-XMY,BTC-AUR,BTC-EFL,BTC-GLD,BTC-SLR,BTC-PTC,BTC-GRS,BTC-NLG,BTC-RBY,BTC-XWC,BTC-MONA,BTC-THC,BTC-ENRG,BTC-ERC,BTC-VRC,BTC-CURE,BTC-XBB,BTC-XMR,BTC-CLOAK,BTC-START,BTC-KORE,BTC-XDN,BTC-TRUST,BTC-NAV,BTC-XST,BTC-BTCD,BTC-VIA,BTC-UNO,BTC-PINK,BTC-IOC,BTC-CANN,BTC-SYS,BTC-NEOS,BTC-DGB,BTC-BURST,BTC-EXCL,BTC-SWIFT,BTC-DOPE,BTC-BLOCK,BTC-ABY,BTC-BYC,BTC-XMG,BTC-BLITZ,BTC-BAY,BTC-BTS,BTC-FAIR,BTC-SPR,BTC-VTR,BTC-XRP,BTC-GAME,BTC-COVAL,BTC-NXS,BTC-XCP,BTC-BITB,BTC-GEO,BTC-FLDC,BTC-GRC,BTC-FLO,BTC-NBT,BTC-MUE,BTC-XEM,BTC-CLAM,BTC-DMD,BTC-GAM,BTC-SPHR,BTC-OK,BTC-SNRG,BTC-PKB,BTC-CPC,BTC-AEON,BTC-ETH,BTC-GCR,BTC-TX,BTC-BCY,BTC-EXP,BTC-INFX,BTC-OMNI,BTC-AMP,BTC-AGRS,BTC-XLM,BTC-BTA,USDT-BTC,BTC-CLUB,BTC-VOX,BTC-EMC,BTC-FCT,BTC-MAID,BTC-EGC,BTC-SLS,BTC-RADS,BTC-DCR,BTC-SAFEX,BTC-BSD,BTC-XVG,B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C,USDT-XRP,BTC-OMG,ETH-OMG,BTC-CVC,ETH-CVC,BTC-PART,BTC-QTUM,ETH-QTUM,ETH-XMR,ETH-XEM,ETH-XLM,ETH-NEO,USDT-XMR,USDT-DASH,ETH-BCC,USDT-BCC,BTC-BCC,BTC-DNT,ETH-DNT,USDT-NEO,ETH-WAVES,ETH-STRAT,ETH-DGB,ETH-FCT,USDT-OMG,BTC-ADA,BTC-MANA,ETH-MANA,BTC-SALT,ETH-SALT,BTC-TIX,ETH-TIX,BTC-RCN,ETH-RCN,BTC-VIB,ETH-VIB,BTC-MER,BTC-POWR,ETH-POWR,BTC-BTG,ETH-BTG,USDT-BTG,ETH-ADA,BTC-ENG,ETH-ENG,USDT-ADA,USDT-XVG,USDT-NXT,BTC-UKG,ETH-UKG",
"EnabledPairs": "USDT-BTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
Expand All @@ -143,6 +151,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -163,6 +172,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -183,6 +193,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -204,12 +215,13 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"ClientID": "ClientID",
"AvailablePairs": "LTCEUR,LTCBTC,BTCGBP,BTCEUR,ETHEUR,ETHBTC,LTCUSD,BTCUSD,ETHUSD",
"AvailablePairs": "BCHUSD,LTCEUR,LTCUSD,LTCBTC,ETHEUR,ETHUSD,ETHBTC,BTCGBP,BTCEUR,BTCUSD",
"EnabledPairs": "BTCUSD,BTCGBP,BTCEUR",
"BaseCurrencies": "USD,GBP,EUR",
"AssetTypes": "SPOT",
Expand All @@ -226,6 +238,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -246,6 +259,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -266,6 +280,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -287,6 +302,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -308,6 +324,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -328,11 +345,12 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "LUN_BTC,BCAP_ETH,NET_USDT,WAVES_ETH,GNO_ETH,CVC_ETH,GNO_BTC,XID_BTC,TAAS_BTC,MGO_ETH,STORJ_BTC,ADX_USDT,BCC_BTC,ICN_ETH,ETH_USDT,LUN_ETH,SNGLS_BTC,OMG_USDT,STX_BTC,RLC_USDT,TRST_BTC,STX_USDT,INCNT_ETH,EOS_BTC,CVC_USDT,NET_ETH,DGD_BTC,OAX_ETH,DNT_ETH,DASH_USDT,QTUM_BTC,TKN_USDT,SNM_USDT,MCO_ETH,SAN_ETH,TNT_ETH,ROUND_BTC,VSL_ETH,SAN_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G_ETH,TIME_USDT,BAT_USDT,MYST_BTC,STORJ_BTC,CVC_BTC,LTC_USDT,TKN_ETH,EOS_USDT,TKN_USDT,CFI_USDT,IND_ETH,TRST_USDT,CFI_ETH,NET_USDT,SNGLS_ETH,OMG_BTC,SRN_BTC,GUP_BTC,ZRX_ETH,TRX_USDT,STX_ETH,RLC_BTC,SALT_ETH,ICN_BTC,MANA_BTC,GNO_ETH,WINGS_USDT,TNT_ETH,VEN_ETH,KNC_USDT,SALT_BTC,ADX_USDT,PAY_USDT,DGD_ETH,BCC_BTC,DNT_BTC,SNT_BTC,CVC_USDT,BNT_ETH,EOS_ETH,WAVES_BTC,NEU_ETH,MLN_USDT,MGO_USDT,OAX_USDT,ENG_BTC,GNT_ETH,CVC_ETH",
"EnabledPairs": "ETH_BTC,LTC_BTC,DASH_BTC",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
Expand All @@ -351,6 +369,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -371,6 +390,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -392,6 +412,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand All @@ -413,11 +434,12 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
"APISecret": "Secret",
"AvailablePairs": "BTC_XUSD,BTC_FCT,BTC_MMNXT,BTC_NMC,BTC_BITUSD,BTC_RDD,BTC_XMR,BTC_XST,BTC_DSH,BTC_MAID,BTC_DGB,BTC_NEOS,BTC_BLK,BTC_NAUT,BTC_NBT,BTC_XCP,BTC_ST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BTC_SC,ETH_ETC,USDT_ETC,BTC_SBD,BTC_GRC,BTC_STR,BTC_XBC,XMR_BLK,XMR_NXT,BTC_FCT,BTC_DCR,BTC_GNO,BTC_MAID,BTC_NMC,BTC_VIA,BTC_XEM,USDT_LTC,USDT_BCH,BTC_OMG,BTC_GAS,BTC_STORJ,BTC_BCH,BTC_GAME,BTC_XPM,USDT_XMR,BTC_LSK,BTC_ARDR,BTC_OMNI,BTC_NXT,USDT_DASH,BTC_PASC,ETH_GNO,USDT_NXT,USDT_ETH,BTC_LBC,BTC_BLK,BTC_BURST,BTC_DOGE,BTC_FLO,BTC_XMR,BTC_STEEM,ETH_REP,ETH_ZEC,BTC_BTM,BTC_PPC,BTC_VTC,BTC_STRAT,BTC_ZRX,ETH_GNT,BTC_BTCD,BTC_NAV,BTC_BCY,BTC_AMP,BTC_GNT,USDT_STR,BTC_RADS,BTC_ETC,BTC_EMC2,BTC_LTC,BTC_NEOS,BTC_RIC,BTC_SYS,BTC_ZEC,BTC_NXC,BTC_EXP,ETH_STEEM,USDT_REP,ETH_ZRX,BTC_BTS,BTC_CVC,ETH_GAS,XMR_DASH,ETH_LSK,ETH_BCH,BTC_BELA,BTC_FLDC,BTC_XVC,BTC_XRP,XMR_BCN,XMR_BTCD,BTC_REP,ETH_CVC,BTC_DGB,BTC_POT,XMR_MAID,XMR_ZEC,BTC_PINK,BTC_XCP,USDT_BTC,USDT_ZEC,USDT_XRP,ETH_OMG,BTC_BCN,BTC_CLAM,BTC_DASH,BTC_HUC,BTC_VRC",
"EnabledPairs": "BTC_LTC,BTC_ETH,BTC_DOGE,BTC_DASH,BTC_XRP",
"BaseCurrencies": "USD",
"AssetTypes": "SPOT",
Expand All @@ -435,6 +457,7 @@
"Enabled": true,
"Verbose": false,
"Websocket": false,
"UseSandbox": false,
"RESTPollingDelay": 10,
"AuthenticatedAPISupport": false,
"APIKey": "Key",
Expand Down
16 changes: 16 additions & 0 deletions exchanges/poloniex/poloniex.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,22 @@ func (p *Poloniex) GetCurrencies() (map[string]PoloniexCurrencies, error) {
return resp.Data, common.SendHTTPGetRequest(path, true, p.Verbose, &resp.Data)
}

// GetExchangeCurrencies returns a list of currencies using the GetTicker API
// as the GetExchangeCurrencies information doesn't return currency pair information
func (p *Poloniex) GetExchangeCurrencies() ([]string, error) {
response, err := p.GetTicker()
if err != nil {
return nil, err
}

var currencies []string
for x := range response {
currencies = append(currencies, x)
}

return currencies, nil
}

// GetLoanOrders returns the list of loan offers and demands for a given
// currency, specified by the "currency" GET parameter.
func (p *Poloniex) GetLoanOrders(currency string) (PoloniexLoanOrders, error) {
Expand Down
16 changes: 16 additions & 0 deletions exchanges/poloniex/poloniex_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ func (p *Poloniex) Run() {
if p.Websocket {
go p.WebsocketClient()
}

exchangeCurrencies, err := p.GetExchangeCurrencies()
if err != nil {
log.Printf("%s Failed to get available symbols.\n", p.GetName())
} else {
forceUpdate := false
if common.DataContains(p.AvailablePairs, "BTC_USDT") {
log.Printf("%s contains invalid pair, forcing upgrade of available currencies.\n",
p.GetName())
forceUpdate = true
}
err = p.UpdateAvailableCurrencies(exchangeCurrencies, forceUpdate)
if err != nil {
log.Printf("%s Failed to update available currencies %s.\n", p.GetName(), err)
}
}
}

// UpdateTicker updates and returns the ticker for a currency pair
Expand Down

0 comments on commit 16629c6

Please sign in to comment.