mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-17 15:09:59 +00:00
ftx: add greek field support for GetFutureStats function (#864)
* ftx: update with greeks @romano thankyou * ftx: fix nits
This commit is contained in:
@@ -230,6 +230,15 @@ func TestGetFutureStats(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
future, err := f.GetFutureStats(context.Background(), "BTC-MOVE-2021Q4")
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if future.Greeks == nil {
|
||||
t.Fatal("no greeks returned for futures contract")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetFundingRates(t *testing.T) {
|
||||
|
||||
@@ -163,6 +163,11 @@ type FutureStatsData struct {
|
||||
PredictedExpirationPrice float64 `json:"predictedExpirationPrice"`
|
||||
OpenInterest float64 `json:"openInterest"`
|
||||
StrikePrice float64 `json:"strikePrice"`
|
||||
Greeks *struct {
|
||||
ImpliedVolatility float64 `json:"impliedVolatility"`
|
||||
Delta float64 `json:"delta"`
|
||||
Gamma float64 `json:"gamma"`
|
||||
} `json:"greeks"`
|
||||
}
|
||||
|
||||
// FundingRatesData stores data on funding rates
|
||||
|
||||
Reference in New Issue
Block a user