forked from Kucoin/kucoin-futures-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunding.go
28 lines (24 loc) · 906 Bytes
/
funding.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package kumex
import "net/http"
// A FundingModel represents a funding record.
type FundingModel struct {
Id int64 `json:"id"`
Symbol string `json:"symbol"`
TimePoint int64 `json:"timePoint"`
FundingRate float64 `json:"fundingRate"`
MarkPrice float64 `json:"markPrice"`
PositionQty float32 `json:"positionQty"`
PositionCost float64 `json:"positionCost"`
Funding float64 `json:"funding"`
SettleCurrency string `json:"settleCurrency"`
}
// A FundingListModel is the set of *FundingModel.
type FundingListModel struct {
HasMore bool `json:"hasMore"`
DataList []*FundingModel `json:"dataList"` // delay parsing
}
// FundingHistory Get Funding History.
func (as *ApiService) FundingHistory(params map[string]string) (*ApiResponse, error) {
req := NewRequest(http.MethodGet, "/api/v1/funding-history", params)
return as.Call(req)
}