Skip to content

Commit

Permalink
Unify db functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tolyo committed Dec 6, 2023
1 parent c01f3c3 commit 93729ae
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 79 deletions.
13 changes: 13 additions & 0 deletions pkg/db/db.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package db

import (
"context"
log2 "log"
"open-outcry/pkg/conf"
"reflect"

Expand Down Expand Up @@ -67,3 +69,14 @@ func QueryList[T interface{}](query string, args ...any) []T {
}

}

func GetCount(tableName string) int {
return QueryVal[int]("SELECT COUNT(*) FROM " + tableName)
}

func DeleteAll(tableName string) {
_, err := Instance().ExecContext(context.Background(), "DELETE FROM "+tableName)
if err != nil {
log2.Fatal(err)
}
}
6 changes: 4 additions & 2 deletions pkg/models/application_entity_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package models

import "open-outcry/pkg/utils"
import (
"open-outcry/pkg/db"
)

func (assert *ModelsTestSuite) TestMasterEntity() {
// expect master entity to exist
assert.Equal(1, utils.GetCount("app_entity"))
assert.Equal(1, db.GetCount("app_entity"))
assert.Equal(AppEntityId(Master), FindAppEntityExternalId("MASTER"))
}
38 changes: 19 additions & 19 deletions pkg/services/matching_service_stop_limit_order_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package services

import (
"open-outcry/pkg/db"
"open-outcry/pkg/models"
"open-outcry/pkg/utils"
)

func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderSave() {
Expand All @@ -11,7 +11,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderSave() {

// then:
assert.NotNil(res)
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))

Expand All @@ -27,7 +27,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderBuy() {

// then:

assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -43,7 +43,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivate() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 1, "GTC")
// then: the order becomes activated

assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{{10.0, 2.0}}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -57,7 +57,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivate() {
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 10, 1, "GTC")

// then: the order becomes activated
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetBuyBookOrderCount())
assert.Equal([]PriceVolume{{10.0, 2.0}}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -71,7 +71,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 11, 1, "GTC")

// then: the order remains deactivated
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -81,7 +81,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 9, 1, "GTC")

// then: it becomes activated
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{{10.0, 2.0}}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -95,7 +95,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 11, 1, "GTC")

// then: the order remains deactivated
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -105,7 +105,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 9, 1, "GTC")

// then: it becomes activated
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetBuyBookOrderCount())
assert.Equal([]PriceVolume{{10.0, 2.0}}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -119,7 +119,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivateAndSettle()
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -134,7 +134,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivateAndSettle() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Sell, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -148,7 +148,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivateAndSettleOpp
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 10, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -162,7 +162,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivateAndSettleOppo
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Buy, 10, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -178,7 +178,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivateAndSettleBef

// then: the order becomes activated and settled
assert.Equal([]float64{10.0, 10.0, 11.0}, GetTradePrices())
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -194,7 +194,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivateAndSettleBefo
//
// then: the order becomes activated and settled
assert.Equal([]float64{10.0, 10.0, 9.0}, GetTradePrices())
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -208,7 +208,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivateByMarketAndS
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -219,7 +219,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitSellOrderActivateByMarketAndS
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", models.Market, models.Sell, 0, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -233,7 +233,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivateByMarketAndSe
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Sell, 10, 3, "GTC")
//
// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -244,7 +244,7 @@ func (assert *ServiceTestSuite) TestCreateStopLimitBuyOrderActivateByMarketAndSe
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", models.Market, models.Buy, 0, 10, "GTC")
//
// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))

assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
Expand Down
38 changes: 19 additions & 19 deletions pkg/services/matching_service_stop_loss_order_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package services

import (
"open-outcry/pkg/db"
"open-outcry/pkg/models"
"open-outcry/pkg/utils"
)

func (assert *ServiceTestSuite) TestCreateStopLossSellOrderSave() {
Expand All @@ -12,7 +12,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderSave() {

// then:
assert.NotNil(res)
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))

Expand All @@ -26,7 +26,7 @@ func (assert *ServiceTestSuite) TestCreateStoLossBuyOrderBuy() {

// then:
assert.NotNil(res)
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetBuyBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal(1000.00, models.FindPaymentAccountByAppEntityIdAndCurrencyName(assert.appEntity1, "EUR").AmountReserved)
Expand All @@ -43,7 +43,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivate() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 1, "GTC")

// then: the order becomes activated as a market order which is invisible to the order book
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))

Expand All @@ -61,7 +61,7 @@ func (assert *ServiceTestSuite) TestCreateStopLosBuyOrderActivate() {
assert.Equal(20.0, models.FindPaymentAccountByAppEntityIdAndCurrencyName(assert.appEntity1, "EUR").AmountReserved)

// then: the order becomes activated as a market order which is invisible to the order book
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetBuyBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))

Expand All @@ -76,7 +76,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 11, 1, "GTC")

// then: the order remains deactivated
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))

Expand All @@ -85,7 +85,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 9, 1, "GTC")

// then: it becomes activated
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
}
Expand All @@ -98,7 +98,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 11, 1, "GTC")

// then: the order remains deactivated
assert.Equal(1, utils.GetCount("stop_order"))
assert.Equal(1, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))

Expand All @@ -107,7 +107,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderNonCrossing() {
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 9, 1, "GTC")

// then: it becomes activated
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(1, GetBuyBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
}
Expand All @@ -120,7 +120,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivateAndSettle() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -134,7 +134,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderActivateAndSettle() {
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Sell, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -148,7 +148,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivateAndSettleOppo
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Sell, 10, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -162,7 +162,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderActivateAndSettleOppos
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", "LIMIT", models.Buy, 10, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -178,7 +178,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivateAndSettleBefo

// then: the order becomes activated and settled at last trade price which is 10
assert.Equal([]float64{10.0, 10.0, 11.0}, GetTradePrices())
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -194,7 +194,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderActivateAndSettleBefor

// then: the order becomes activated and settled
assert.Equal([]float64{10.0, 10.0, 9.0}, GetTradePrices())
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -208,7 +208,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivateByMarketAndSe
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Buy, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -219,7 +219,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossSellOrderActivateByMarketAndSe
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", models.Market, models.Sell, 0, 1, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -233,7 +233,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderActivateByMarketAndSet
ProcessTradeOrder(assert.tradingAccount2, "BTC_EUR", "LIMIT", models.Sell, 10, 3, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand All @@ -244,7 +244,7 @@ func (assert *ServiceTestSuite) TestCreateStopLossBuyOrderActivateByMarketAndSet
ProcessTradeOrder(assert.tradingAccount1, "BTC_EUR", models.Market, models.Buy, 0, 10, "GTC")

// then: the order becomes activated and settled
assert.Equal(0, utils.GetCount("stop_order"))
assert.Equal(0, db.GetCount("stop_order"))
assert.Equal(0, GetSellBookOrderCount())
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Buy))
assert.Equal([]PriceVolume{}, GetVolumes("BTC_EUR", models.Sell))
Expand Down
Loading

0 comments on commit 93729ae

Please sign in to comment.