mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 07:26:48 +00:00
Binance,OKx: Implement fetching funding rates (#1239)
* adds basic groundwork for rates on binance * more into rates on binance * rm redudant redundancy, add payments * mini commit before merging with testnet ability branch * changes function signature and fixes resulting build * gets billing data too * funding rates package, features use, testnet reimpl * new endpoint, refinements and tests * cli fix, rpc impl, testing, payments * fixups from looking at code * typo fix * niteroos * merge fixes * adds test, fixes cli issues * woah nelly
This commit is contained in:
@@ -24,6 +24,7 @@ import (
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/account"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/asset"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/deposit"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/fundingrate"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/kline"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/margin"
|
||||
"github.com/thrasher-corp/gocryptotrader/exchanges/order"
|
||||
@@ -512,13 +513,13 @@ func testWrappers(e exchange.IBotExchange, base *exchange.Base, config *Config)
|
||||
Response: jsonifyInterface([]interface{}{""}),
|
||||
})
|
||||
|
||||
fundingRateRequest := &order.FundingRatesRequest{
|
||||
fundingRateRequest := &fundingrate.RatesRequest{
|
||||
Asset: assetTypes[i],
|
||||
Pairs: currency.Pairs{p},
|
||||
Pair: p,
|
||||
StartDate: time.Now().Add(-time.Hour),
|
||||
EndDate: time.Now(),
|
||||
}
|
||||
var fundingRateResponse []order.FundingRates
|
||||
var fundingRateResponse *fundingrate.Rates
|
||||
fundingRateResponse, err = e.GetFundingRates(context.TODO(), fundingRateRequest)
|
||||
msg = ""
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user