Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Enable additional ccxt params and http headers #140

Merged
merged 28 commits into from
Apr 12, 2019
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2a799e7
add ccxt params and exchange headers
Reidmcc Mar 30, 2019
1c60a7f
remove diagnostic prints
Reidmcc Mar 31, 2019
86930f9
update ccxt_test
Reidmcc Mar 31, 2019
0a7626a
update naming conventions
Reidmcc Apr 1, 2019
d75a040
update config.go
Reidmcc Apr 1, 2019
4fb9ba8
remove added testOrderConstraints pair
Reidmcc Apr 1, 2019
258f1d6
use better assetConverter for KrakenExchange#GetOpenOrders, closes #1…
nikhilsaraf Apr 2, 2019
df70efa
ccxt testing progress
Reidmcc Apr 2, 2019
bee889f
Merge branch 'enable-ccxt-params' of https://github.com/Reidmcc/kelp …
Reidmcc Apr 2, 2019
57fcda5
remove coinbase from precision checks
Reidmcc Apr 2, 2019
6e879e2
update go version used in travis CI
nikhilsaraf Apr 3, 2019
82e58b4
turn off minBaseVolume checks in mirror strategy when offsetTrades=fa…
nikhilsaraf Apr 4, 2019
d21a75f
Use app name and version headers from horizon client in Go SDKs (#147)
nikhilsaraf Apr 5, 2019
96c9e88
update Running Kelp section of README.md
nikhilsaraf Apr 5, 2019
50b5053
update Kelp headers message
nikhilsaraf Apr 5, 2019
6d989c8
Add Overrides for remaining orderConstraints via config, closes #141,…
nikhilsaraf Apr 10, 2019
860d76b
google auth for /metrics endpoint should depend on config values, fix…
nikhilsaraf Apr 11, 2019
7edc99c
update comment on api.ExchangeParams
nikhilsaraf Apr 11, 2019
f42d832
update comment on sample_mirror.cfg
nikhilsaraf Apr 11, 2019
caa9fec
update sample trader cfg
nikhilsaraf Apr 11, 2019
967f5c3
Update ccxtExchange_test.go
nikhilsaraf Apr 11, 2019
1a912c0
Update factory.go
nikhilsaraf Apr 11, 2019
a88cb34
CXT_PARAMS -> EXCHANGE_PARAMS in mirror config
nikhilsaraf Apr 11, 2019
46d2869
follow toml var name convention in mirrorStrategy
nikhilsaraf Apr 11, 2019
2b1a180
code style ccxt.go
nikhilsaraf Apr 11, 2019
db16ab0
hide exchange params and headers in mirror config output
nikhilsaraf Apr 11, 2019
0b573f2
Merge branch 'enable-ccxt-params' of https://github.com/Reidmcc/kelp …
nikhilsaraf Apr 11, 2019
af79342
rename parameter to param and PARAMETER to PARAM
nikhilsaraf Apr 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ccxt testing progress
Reidmcc committed Apr 2, 2019
commit df70efabae01be08bf2fc0210e28048b9050b631
25 changes: 12 additions & 13 deletions plugins/ccxtExchange_test.go
Original file line number Diff line number Diff line change
@@ -15,10 +15,9 @@ import (
var supportedExchanges = []string{"binance"}
var emptyAPIKey = api.ExchangeAPIKey{}
var emptyParams = api.ExchangeParam{}
var emptyHeader = api.ExchangeHeader{}
var supportedTradingExchanges = map[string]api.ExchangeAPIKey{
"binance": {},
"coinbasepro": {},
"binance": {},
// "coinbasepro": {},
}

var testOrderConstraints = map[model.TradingPair]model.OrderConstraints{
@@ -34,7 +33,7 @@ func TestGetTickerPrice_Ccxt(t *testing.T) {

for _, exchangeName := range supportedExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -61,7 +60,7 @@ func TestGetOrderBook_Ccxt(t *testing.T) {

for _, exchangeName := range supportedExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -94,7 +93,7 @@ func TestGetTrades_Ccxt(t *testing.T) {

for _, exchangeName := range supportedExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -119,7 +118,7 @@ func TestGetTradeHistory_Ccxt(t *testing.T) {

for exchangeName, apiKey := range supportedTradingExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -177,7 +176,7 @@ func validateTrades(t *testing.T, pair model.TradingPair, trades []model.Trade)
func TestGetLatestTradeCursor_Ccxt(t *testing.T) {
for exchangeName, apiKey := range supportedTradingExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -216,7 +215,7 @@ func TestGetAccountBalances_Ccxt(t *testing.T) {

for exchangeName, apiKey := range supportedTradingExchanges {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -261,7 +260,7 @@ func TestGetOpenOrders_Ccxt(t *testing.T) {
for exchangeName, apiKey := range supportedTradingExchanges {
for _, pair := range tradingPairs {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -376,7 +375,7 @@ func TestAddOrder_Ccxt(t *testing.T) {
},
} {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -426,7 +425,7 @@ func TestCancelOrder_Ccxt(t *testing.T) {
},
} {
t.Run(exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(exchangeName, testOrderConstraints, []api.ExchangeAPIKey{apiKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}
@@ -483,7 +482,7 @@ func TestGetOrderConstraints_Ccxt_Precision(t *testing.T) {

for _, kase := range testCases {
t.Run(kase.exchangeName, func(t *testing.T) {
testCcxtExchange, e := makeCcxtExchange(kase.exchangeName, nil, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{emptyHeader}, false)
testCcxtExchange, e := makeCcxtExchange(kase.exchangeName, nil, []api.ExchangeAPIKey{emptyAPIKey}, []api.ExchangeParam{emptyParams}, []api.ExchangeHeader{}, false)
if !assert.NoError(t, e) {
return
}