Skip to content

Commit

Permalink
update binance positionRisk api to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
anywhy committed Oct 29, 2024
1 parent 58133d9 commit 5b3f8b5
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,29 @@ import (

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"`

BreakEvenPrice fixedpoint.Value `json:"breakEvenPrice"`
MarginAsset fixedpoint.Value `json:"marginAsset"`
InitialMargin fixedpoint.Value `json:"initialMargin"`
MaintMargin fixedpoint.Value `json:"maintMargin"`
PositionInitialMargin fixedpoint.Value `json:"positionInitialMargin"`
OpenOrderInitialMargin fixedpoint.Value `json:"openOrderInitialMargin"`
Adl fixedpoint.Value `json:"adl"`
BidNotional fixedpoint.Value `json:"bidNotional"`
AskNotional fixedpoint.Value `json:"askNotional"`
}

//go:generate requestgen -method GET -url "/fapi/v2/positionRisk" -type FuturesGetPositionRisksRequest -responseType []FuturesPositionRisk
//go:generate requestgen -method GET -url "/fapi/v3/positionRisk" -type FuturesGetPositionRisksRequest -responseType []FuturesPositionRisk
type FuturesGetPositionRisksRequest struct {
client requestgen.AuthenticatedAPIClient

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5b3f8b5

Please sign in to comment.