mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-06 23:16:53 +00:00
futures: add GetFuturesContractDetails wrapper function (#1274)
* all in a days work * cleanup * cleanup for real, also stop it binance.json * minor coverage * adds gateio to the slurry * cleanup of types * verbose verbose verbose verbose verbose verbose * fixes huobi parsing issue * fix bybit contract identification * cleanup * merge fixes * addresses many big problems raised by SHAZ * tracking errors and fixes * funding rate if avail, fixes currency formatting * Addresses nits and sneaks in extra fixes * lint * minor fixes after rebase * better contract splitter for currencies like T-USDT * forgot to add the exchange name like a fool * merge fixes x1 * kucoin, direction, contract size * rn direction, fix kucoin time * WHOOPS * Update exchanges/kucoin/kucoin_wrapper.go Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io> * misdirection --------- Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/thrasher-corp/gocryptotrader/common"
|
||||
"github.com/thrasher-corp/gocryptotrader/currency"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/collateral"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/futures"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/margin"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
"github.com/thrasher-corp/gocryptotrader/gctrpc"
|
||||
@@ -568,7 +569,7 @@ func getManagedPosition(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
err = order.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries)
|
||||
err = futures.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -646,7 +647,7 @@ func getAllManagedPositions(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
err = order.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries)
|
||||
err = futures.CheckFundingRatePrerequisites(getFundingData, includePredictedRate, includeFundingEntries)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/futures"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -29,7 +29,7 @@ func isFuturesAsset(a string) error {
|
||||
return err
|
||||
}
|
||||
if !i.IsFutures() {
|
||||
return fmt.Errorf("%w '%s'", order.ErrNotFuturesAsset, a)
|
||||
return fmt.Errorf("%w '%s'", futures.ErrNotFuturesAsset, a)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user