-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add portfolio apis for binance
- Loading branch information
Showing
6 changed files
with
125 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright (c) 2023, LinstoHu | ||
* All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package types | ||
|
||
type Account struct { | ||
UniMMR string `json:"uniMMR"` | ||
AccountEquity string `json:"accountEquity"` | ||
ActualEquity string `json:"actualEquity"` | ||
AccountInitialMargin string `json:"accountInitialMargin"` | ||
AccountMaintMargin string `json:"accountMaintMargin"` | ||
AccountStatus string `json:"accountStatus"` | ||
VirtualMaxWithdrawAmount string `json:"virtualMaxWithdrawAmount"` | ||
TotalAvailableBalance string `json:"totalAvailableBalance"` | ||
TotalMarginOpenLoss string `json:"totalMarginOpenLoss"` | ||
UpdateTime int64 `json:"updateTime"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2023, LinstoHu | ||
* All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package types | ||
|
||
type CMAccount struct { | ||
Assets []struct { | ||
Asset string `json:"asset"` | ||
CrossWalletBalance string `json:"crossWalletBalance"` | ||
CrossUnPnl string `json:"crossUnPnl"` | ||
MaintMargin string `json:"maintMargin"` | ||
InitialMargin string `json:"initialMargin"` | ||
PositionInitialMargin string `json:"positionInitialMargin"` | ||
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` | ||
UpdateTime int64 `json:"updateTime"` | ||
} `json:"assets"` | ||
Positions []struct { | ||
Symbol string `json:"symbol"` | ||
PositionAmt string `json:"positionAmt"` | ||
InitialMargin string `json:"initialMargin"` | ||
MaintMargin string `json:"maintMargin"` | ||
UnrealizedProfit string `json:"unrealizedProfit"` | ||
PositionInitialMargin string `json:"positionInitialMargin"` | ||
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` | ||
Leverage string `json:"leverage"` | ||
PositionSide string `json:"positionSide"` | ||
EntryPrice string `json:"entryPrice"` | ||
MaxQty string `json:"maxQty"` | ||
UpdateTime int64 `json:"updateTime"` | ||
} `json:"positions"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* Copyright (c) 2023, LinstoHu | ||
* All rights reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package types | ||
|
||
type UMAccount struct { | ||
Assets []struct { | ||
Asset string `json:"asset"` | ||
CrossWalletBalance string `json:"crossWalletBalance"` | ||
CrossUnPnl string `json:"crossUnPnl"` | ||
MaintMargin string `json:"maintMargin"` | ||
InitialMargin string `json:"initialMargin"` | ||
PositionInitialMargin string `json:"positionInitialMargin"` | ||
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` | ||
UpdateTime int64 `json:"updateTime"` | ||
} `json:"assets"` | ||
Positions []struct { | ||
Symbol string `json:"symbol"` | ||
InitialMargin string `json:"initialMargin"` | ||
MaintMargin string `json:"maintMargin"` | ||
UnrealizedProfit string `json:"unrealizedProfit"` | ||
PositionInitialMargin string `json:"positionInitialMargin"` | ||
OpenOrderInitialMargin string `json:"openOrderInitialMargin"` | ||
Leverage string `json:"leverage"` | ||
EntryPrice string `json:"entryPrice"` | ||
MaxNotional string `json:"maxNotional"` | ||
BidNotional string `json:"bidNotional"` | ||
AskNotional string `json:"askNotional"` | ||
PositionSide string `json:"positionSide"` | ||
PositionAmt string `json:"positionAmt"` | ||
UpdateTime int64 `json:"updateTime"` | ||
} `json:"positions"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters