qbtrade/pkg/exchange/binance/binanceapi/futures_get_position_risks_request.go

38 lines
1.6 KiB
Go
Raw Normal View History

2024-06-27 14:42:38 +00:00
package binanceapi
import (
"github.com/c9s/requestgen"
"git.qtrade.icu/lychiyu/qbtrade/pkg/fixedpoint"
"git.qtrade.icu/lychiyu/qbtrade/pkg/types"
)
type FuturesPositionRisk struct {
EntryPrice fixedpoint.Value `json:"entryPrice"`
MarginType string `json:"marginType"`
IsAutoAddMargin string `json:"isAutoAddMargin"`
IsolatedMargin string `json:"isolatedMargin"`
Leverage fixedpoint.Value `json:"leverage"`
LiquidationPrice fixedpoint.Value `json:"liquidationPrice"`
MarkPrice fixedpoint.Value `json:"markPrice"`
MaxNotionalValue fixedpoint.Value `json:"maxNotionalValue"`
PositionAmount fixedpoint.Value `json:"positionAmt"`
Notional fixedpoint.Value `json:"notional"`
IsolatedWallet string `json:"isolatedWallet"`
Symbol string `json:"symbol"`
UnRealizedProfit fixedpoint.Value `json:"unRealizedProfit"`
PositionSide string `json:"positionSide"`
UpdateTime types.MillisecondTimestamp `json:"updateTime"`
}
//go:generate requestgen -method GET -url "/fapi/v2/positionRisk" -type FuturesGetPositionRisksRequest -responseType []FuturesPositionRisk
type FuturesGetPositionRisksRequest struct {
client requestgen.AuthenticatedAPIClient
symbol string `param:"symbol"`
}
func (c *FuturesRestClient) NewFuturesGetPositionRisksRequest() *FuturesGetPositionRisksRequest {
return &FuturesGetPositionRisksRequest{client: c}
}