forked from Kucoin/kucoin-futures-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
risk_limit_level.go
31 lines (26 loc) · 1.1 KB
/
risk_limit_level.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
29
30
31
package kumex
import (
"net/http"
)
// RiskLimitLevelModel represents a Contract risk limit level info.
type RiskLimitLevelModel struct {
Symbol string `json:"symbol"`
Level int64 `json:"level"`
MaxRiskLimit int64 `json:"maxRiskLimit"`
MinRiskLimit int64 `json:"minRiskLimit"`
MaxLeverage int64 `json:"maxLeverage"`
InitialMargin float64 `json:"initialMargin"`
MaintainMargin float64 `json:"maintainMargin"`
}
// ContractRiskLimitLevelModel represents a Contract risk limit level info.
type ContractsRiskLimitLevelModel []*RiskLimitLevelModel
// ContractsRiskLimitLevel obtain information about risk limit level of a specific contract
func (as *ApiService) ContractsRiskLimitLevel(symbol string) (*ApiResponse, error) {
req := NewRequest(http.MethodGet, "/api/v1/contracts/risk-limit/"+symbol, nil)
return as.Call(req)
}
// ContractsRiskLimit adjust contract risk limit level
func (as *ApiService) ChangeRiskLimitLevel(params map[string]string) (*ApiResponse, error) {
req := NewRequest(http.MethodPost, "/api/v1/position/risk-limit-level/change", params)
return as.Call(req)
}