binance

package
v0.2.54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const (
	HostDApiPublic    = "dapiPublic"
	HostDApiPrivate   = "dapiPrivate"
	HostDApiPrivateV2 = "dapiPrivateV2"
	HostFApiPublic    = "fapiPublic"
	HostFApiPublicV2  = "fapiPublicV2"
	HostFApiPrivate   = "fapiPrivate"
	HostFApiPrivateV2 = "fapiPrivateV2"
	HostPublic        = "public"
	HostPrivate       = "private"
	HostV1            = "v1"
	HostSApi          = "sapi"
	HostSApiV2        = "sapiV2"
	HostSApiV3        = "sapiV3"
	HostSApiV4        = "sapiV4"
	HostEApiPublic    = "eapiPublic"
	HostEApiPrivate   = "eapiPrivate"
	HostDApiData      = "dapiData"
	HostFApiData      = "fapiData"
	HostPApi          = "papi"
	WssApi            = "ws"
)
View Source
const (
	OdStatusNew             = "NEW"
	OdStatusPartiallyFilled = "PARTIALLY_FILLED"
	OdStatusAccept          = "ACCEPTED"
	OdStatusFilled          = "FILLED"
	OdStatusCanceled        = "CANCELED"
	OdStatusCancelled       = "CANCELLED"
	OdStatusPendingCancel   = "PENDING_CANCEL"
	OdStatusReject          = "REJECTED"
	OdStatusExpired         = "EXPIRED"
	OdStatusExpiredInMatch  = "EXPIRED_IN_MATCH"
)
View Source
const (
	MethodSapiGetSystemStatus                                         = "sapiGetSystemStatus"
	MethodSapiGetAccountSnapshot                                      = "sapiGetAccountSnapshot"
	MethodSapiGetMarginAsset                                          = "sapiGetMarginAsset"
	MethodSapiGetMarginPair                                           = "sapiGetMarginPair"
	MethodSapiGetMarginAllAssets                                      = "sapiGetMarginAllAssets"
	MethodSapiGetMarginAllPairs                                       = "sapiGetMarginAllPairs"
	MethodSapiGetMarginPriceIndex                                     = "sapiGetMarginPriceIndex"
	MethodSapiGetAssetAssetDividend                                   = "sapiGetAssetAssetDividend"
	MethodSapiGetAssetDribblet                                        = "sapiGetAssetDribblet"
	MethodSapiGetAssetTransfer                                        = "sapiGetAssetTransfer"
	MethodSapiGetAssetAssetDetail                                     = "sapiGetAssetAssetDetail"
	MethodSapiGetAssetTradeFee                                        = "sapiGetAssetTradeFee"
	MethodSapiGetAssetLedgerTransferCloudMiningQueryByPage            = "sapiGetAssetLedgerTransferCloudMiningQueryByPage"
	MethodSapiGetAssetConvertTransferQueryByPage                      = "sapiGetAssetConvertTransferQueryByPage"
	MethodSapiGetAssetWalletBalance                                   = "sapiGetAssetWalletBalance"
	MethodSapiGetAssetCustodyTransferHistory                          = "sapiGetAssetCustodyTransferHistory"
	MethodSapiGetMarginLoan                                           = "sapiGetMarginLoan"
	MethodSapiGetMarginRepay                                          = "sapiGetMarginRepay"
	MethodSapiGetMarginAccount                                        = "sapiGetMarginAccount"
	MethodSapiGetMarginTransfer                                       = "sapiGetMarginTransfer"
	MethodSapiGetMarginInterestHistory                                = "sapiGetMarginInterestHistory"
	MethodSapiGetMarginForceLiquidationRec                            = "sapiGetMarginForceLiquidationRec"
	MethodSapiGetMarginOrder                                          = "sapiGetMarginOrder"
	MethodSapiGetMarginOpenOrders                                     = "sapiGetMarginOpenOrders"
	MethodSapiGetMarginAllOrders                                      = "sapiGetMarginAllOrders"
	MethodSapiGetMarginMyTrades                                       = "sapiGetMarginMyTrades"
	MethodSapiGetMarginMaxBorrowable                                  = "sapiGetMarginMaxBorrowable"
	MethodSapiGetMarginMaxTransferable                                = "sapiGetMarginMaxTransferable"
	MethodSapiGetMarginTradeCoeff                                     = "sapiGetMarginTradeCoeff"
	MethodSapiGetMarginIsolatedTransfer                               = "sapiGetMarginIsolatedTransfer"
	MethodSapiGetMarginIsolatedAccount                                = "sapiGetMarginIsolatedAccount"
	MethodSapiGetMarginIsolatedPair                                   = "sapiGetMarginIsolatedPair"
	MethodSapiGetMarginIsolatedAllPairs                               = "sapiGetMarginIsolatedAllPairs"
	MethodSapiGetMarginIsolatedAccountLimit                           = "sapiGetMarginIsolatedAccountLimit"
	MethodSapiGetMarginInterestRateHistory                            = "sapiGetMarginInterestRateHistory"
	MethodSapiGetMarginOrderList                                      = "sapiGetMarginOrderList"
	MethodSapiGetMarginAllOrderList                                   = "sapiGetMarginAllOrderList"
	MethodSapiGetMarginOpenOrderList                                  = "sapiGetMarginOpenOrderList"
	MethodSapiGetMarginCrossMarginData                                = "sapiGetMarginCrossMarginData"
	MethodSapiGetMarginIsolatedMarginData                             = "sapiGetMarginIsolatedMarginData"
	MethodSapiGetMarginIsolatedMarginTier                             = "sapiGetMarginIsolatedMarginTier"
	MethodSapiGetMarginRateLimitOrder                                 = "sapiGetMarginRateLimitOrder"
	MethodSapiGetMarginDribblet                                       = "sapiGetMarginDribblet"
	MethodSapiGetMarginDust                                           = "sapiGetMarginDust"
	MethodSapiGetMarginCrossMarginCollateralRatio                     = "sapiGetMarginCrossMarginCollateralRatio"
	MethodSapiGetMarginExchangeSmallLiability                         = "sapiGetMarginExchangeSmallLiability"
	MethodSapiGetMarginExchangeSmallLiabilityHistory                  = "sapiGetMarginExchangeSmallLiabilityHistory"
	MethodSapiGetMarginNextHourlyInterestRate                         = "sapiGetMarginNextHourlyInterestRate"
	MethodSapiGetMarginCapitalFlow                                    = "sapiGetMarginCapitalFlow"
	MethodSapiGetMarginDelistSchedule                                 = "sapiGetMarginDelistSchedule"
	MethodSapiGetMarginAvailableInventory                             = "sapiGetMarginAvailableInventory"
	MethodSapiGetMarginLeverageBracket                                = "sapiGetMarginLeverageBracket"
	MethodSapiGetLoanVipLoanableData                                  = "sapiGetLoanVipLoanableData"
	MethodSapiGetLoanVipCollateralData                                = "sapiGetLoanVipCollateralData"
	MethodSapiGetLoanVipRequestData                                   = "sapiGetLoanVipRequestData"
	MethodSapiGetLoanVipRequestInterestRate                           = "sapiGetLoanVipRequestInterestRate"
	MethodSapiGetLoanIncome                                           = "sapiGetLoanIncome"
	MethodSapiGetLoanOngoingOrders                                    = "sapiGetLoanOngoingOrders"
	MethodSapiGetLoanLtvAdjustmentHistory                             = "sapiGetLoanLtvAdjustmentHistory"
	MethodSapiGetLoanBorrowHistory                                    = "sapiGetLoanBorrowHistory"
	MethodSapiGetLoanRepayHistory                                     = "sapiGetLoanRepayHistory"
	MethodSapiGetLoanLoanableData                                     = "sapiGetLoanLoanableData"
	MethodSapiGetLoanCollateralData                                   = "sapiGetLoanCollateralData"
	MethodSapiGetLoanRepayCollateralRate                              = "sapiGetLoanRepayCollateralRate"
	MethodSapiGetLoanFlexibleOngoingOrders                            = "sapiGetLoanFlexibleOngoingOrders"
	MethodSapiGetLoanFlexibleBorrowHistory                            = "sapiGetLoanFlexibleBorrowHistory"
	MethodSapiGetLoanFlexibleRepayHistory                             = "sapiGetLoanFlexibleRepayHistory"
	MethodSapiGetLoanFlexibleLtvAdjustmentHistory                     = "sapiGetLoanFlexibleLtvAdjustmentHistory"
	MethodSapiGetLoanFlexibleLoanableData                             = "sapiGetLoanFlexibleLoanableData"
	MethodSapiGetLoanFlexibleCollateralData                           = "sapiGetLoanFlexibleCollateralData"
	MethodSapiGetLoanVipOngoingOrders                                 = "sapiGetLoanVipOngoingOrders"
	MethodSapiGetLoanVipRepayHistory                                  = "sapiGetLoanVipRepayHistory"
	MethodSapiGetLoanVipCollateralAccount                             = "sapiGetLoanVipCollateralAccount"
	MethodSapiGetFiatOrders                                           = "sapiGetFiatOrders"
	MethodSapiGetFiatPayments                                         = "sapiGetFiatPayments"
	MethodSapiGetFuturesTransfer                                      = "sapiGetFuturesTransfer"
	MethodSapiGetFuturesHistDataLink                                  = "sapiGetFuturesHistDataLink"
	MethodSapiGetRebateTaxQuery                                       = "sapiGetRebateTaxQuery"
	MethodSapiGetCapitalConfigGetall                                  = "sapiGetCapitalConfigGetall"
	MethodSapiGetCapitalDepositAddress                                = "sapiGetCapitalDepositAddress"
	MethodSapiGetCapitalDepositAddressList                            = "sapiGetCapitalDepositAddressList"
	MethodSapiGetCapitalDepositHisrec                                 = "sapiGetCapitalDepositHisrec"
	MethodSapiGetCapitalDepositSubAddress                             = "sapiGetCapitalDepositSubAddress"
	MethodSapiGetCapitalDepositSubHisrec                              = "sapiGetCapitalDepositSubHisrec"
	MethodSapiGetCapitalWithdrawHistory                               = "sapiGetCapitalWithdrawHistory"
	MethodSapiGetCapitalContractConvertibleCoins                      = "sapiGetCapitalContractConvertibleCoins"
	MethodSapiGetConvertTradeFlow                                     = "sapiGetConvertTradeFlow"
	MethodSapiGetConvertExchangeInfo                                  = "sapiGetConvertExchangeInfo"
	MethodSapiGetConvertAssetInfo                                     = "sapiGetConvertAssetInfo"
	MethodSapiGetConvertOrderStatus                                   = "sapiGetConvertOrderStatus"
	MethodSapiGetAccountStatus                                        = "sapiGetAccountStatus"
	MethodSapiGetAccountApiTradingStatus                              = "sapiGetAccountApiTradingStatus"
	MethodSapiGetAccountApiRestrictionsIpRestriction                  = "sapiGetAccountApiRestrictionsIpRestriction"
	MethodSapiGetBnbBurn                                              = "sapiGetBnbBurn"
	MethodSapiGetSubAccountFuturesAccount                             = "sapiGetSubAccountFuturesAccount"
	MethodSapiGetSubAccountFuturesAccountSummary                      = "sapiGetSubAccountFuturesAccountSummary"
	MethodSapiGetSubAccountFuturesPositionRisk                        = "sapiGetSubAccountFuturesPositionRisk"
	MethodSapiGetSubAccountFuturesInternalTransfer                    = "sapiGetSubAccountFuturesInternalTransfer"
	MethodSapiGetSubAccountList                                       = "sapiGetSubAccountList"
	MethodSapiGetSubAccountMarginAccount                              = "sapiGetSubAccountMarginAccount"
	MethodSapiGetSubAccountMarginAccountSummary                       = "sapiGetSubAccountMarginAccountSummary"
	MethodSapiGetSubAccountSpotSummary                                = "sapiGetSubAccountSpotSummary"
	MethodSapiGetSubAccountStatus                                     = "sapiGetSubAccountStatus"
	MethodSapiGetSubAccountSubTransferHistory                         = "sapiGetSubAccountSubTransferHistory"
	MethodSapiGetSubAccountTransferSubUserHistory                     = "sapiGetSubAccountTransferSubUserHistory"
	MethodSapiGetSubAccountUniversalTransfer                          = "sapiGetSubAccountUniversalTransfer"
	MethodSapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList = "sapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList"
	MethodSapiGetSubAccountTransactionStatistics                      = "sapiGetSubAccountTransactionStatistics"
	MethodSapiGetSubAccountSubAccountApiIpRestriction                 = "sapiGetSubAccountSubAccountApiIpRestriction"
	MethodSapiGetManagedSubaccountAsset                               = "sapiGetManagedSubaccountAsset"
	MethodSapiGetManagedSubaccountAccountSnapshot                     = "sapiGetManagedSubaccountAccountSnapshot"
	MethodSapiGetManagedSubaccountQueryTransLogForInvestor            = "sapiGetManagedSubaccountQueryTransLogForInvestor"
	MethodSapiGetManagedSubaccountQueryTransLogForTradeParent         = "sapiGetManagedSubaccountQueryTransLogForTradeParent"
	MethodSapiGetManagedSubaccountFetchFutureAsset                    = "sapiGetManagedSubaccountFetchFutureAsset"
	MethodSapiGetManagedSubaccountMarginAsset                         = "sapiGetManagedSubaccountMarginAsset"
	MethodSapiGetManagedSubaccountInfo                                = "sapiGetManagedSubaccountInfo"
	MethodSapiGetManagedSubaccountDepositAddress                      = "sapiGetManagedSubaccountDepositAddress"
	MethodSapiGetManagedSubaccountQueryTransLog                       = "sapiGetManagedSubaccountQueryTransLog"
	MethodSapiGetLendingDailyProductList                              = "sapiGetLendingDailyProductList"
	MethodSapiGetLendingDailyUserLeftQuota                            = "sapiGetLendingDailyUserLeftQuota"
	MethodSapiGetLendingDailyUserRedemptionQuota                      = "sapiGetLendingDailyUserRedemptionQuota"
	MethodSapiGetLendingDailyTokenPosition                            = "sapiGetLendingDailyTokenPosition"
	MethodSapiGetLendingUnionAccount                                  = "sapiGetLendingUnionAccount"
	MethodSapiGetLendingUnionPurchaseRecord                           = "sapiGetLendingUnionPurchaseRecord"
	MethodSapiGetLendingUnionRedemptionRecord                         = "sapiGetLendingUnionRedemptionRecord"
	MethodSapiGetLendingUnionInterestHistory                          = "sapiGetLendingUnionInterestHistory"
	MethodSapiGetLendingProjectList                                   = "sapiGetLendingProjectList"
	MethodSapiGetLendingProjectPositionList                           = "sapiGetLendingProjectPositionList"
	MethodSapiGetMiningPubAlgoList                                    = "sapiGetMiningPubAlgoList"
	MethodSapiGetMiningPubCoinList                                    = "sapiGetMiningPubCoinList"
	MethodSapiGetMiningWorkerDetail                                   = "sapiGetMiningWorkerDetail"
	MethodSapiGetMiningWorkerList                                     = "sapiGetMiningWorkerList"
	MethodSapiGetMiningPaymentList                                    = "sapiGetMiningPaymentList"
	MethodSapiGetMiningStatisticsUserStatus                           = "sapiGetMiningStatisticsUserStatus"
	MethodSapiGetMiningStatisticsUserList                             = "sapiGetMiningStatisticsUserList"
	MethodSapiGetMiningPaymentUid                                     = "sapiGetMiningPaymentUid"
	MethodSapiGetBswapPools                                           = "sapiGetBswapPools"
	MethodSapiGetBswapLiquidity                                       = "sapiGetBswapLiquidity"
	MethodSapiGetBswapLiquidityOps                                    = "sapiGetBswapLiquidityOps"
	MethodSapiGetBswapQuote                                           = "sapiGetBswapQuote"
	MethodSapiGetBswapSwap                                            = "sapiGetBswapSwap"
	MethodSapiGetBswapPoolConfigure                                   = "sapiGetBswapPoolConfigure"
	MethodSapiGetBswapAddLiquidityPreview                             = "sapiGetBswapAddLiquidityPreview"
	MethodSapiGetBswapRemoveLiquidityPreview                          = "sapiGetBswapRemoveLiquidityPreview"
	MethodSapiGetBswapUnclaimedRewards                                = "sapiGetBswapUnclaimedRewards"
	MethodSapiGetBswapClaimedHistory                                  = "sapiGetBswapClaimedHistory"
	MethodSapiGetBlvtTokenInfo                                        = "sapiGetBlvtTokenInfo"
	MethodSapiGetBlvtSubscribeRecord                                  = "sapiGetBlvtSubscribeRecord"
	MethodSapiGetBlvtRedeemRecord                                     = "sapiGetBlvtRedeemRecord"
	MethodSapiGetBlvtUserLimit                                        = "sapiGetBlvtUserLimit"
	MethodSapiGetApiReferralIfNewUser                                 = "sapiGetApiReferralIfNewUser"
	MethodSapiGetApiReferralCustomization                             = "sapiGetApiReferralCustomization"
	MethodSapiGetApiReferralUserCustomization                         = "sapiGetApiReferralUserCustomization"
	MethodSapiGetApiReferralRebateRecentRecord                        = "sapiGetApiReferralRebateRecentRecord"
	MethodSapiGetApiReferralRebateHistoricalRecord                    = "sapiGetApiReferralRebateHistoricalRecord"
	MethodSapiGetApiReferralKickbackRecentRecord                      = "sapiGetApiReferralKickbackRecentRecord"
	MethodSapiGetApiReferralKickbackHistoricalRecord                  = "sapiGetApiReferralKickbackHistoricalRecord"
	MethodSapiGetBrokerSubAccountApi                                  = "sapiGetBrokerSubAccountApi"
	MethodSapiGetBrokerSubAccount                                     = "sapiGetBrokerSubAccount"
	MethodSapiGetBrokerSubAccountApiCommissionFutures                 = "sapiGetBrokerSubAccountApiCommissionFutures"
	MethodSapiGetBrokerSubAccountApiCommissionCoinFutures             = "sapiGetBrokerSubAccountApiCommissionCoinFutures"
	MethodSapiGetBrokerInfo                                           = "sapiGetBrokerInfo"
	MethodSapiGetBrokerTransfer                                       = "sapiGetBrokerTransfer"
	MethodSapiGetBrokerTransferFutures                                = "sapiGetBrokerTransferFutures"
	MethodSapiGetBrokerRebateRecentRecord                             = "sapiGetBrokerRebateRecentRecord"
	MethodSapiGetBrokerRebateHistoricalRecord                         = "sapiGetBrokerRebateHistoricalRecord"
	MethodSapiGetBrokerSubAccountBnbBurnStatus                        = "sapiGetBrokerSubAccountBnbBurnStatus"
	MethodSapiGetBrokerSubAccountDepositHist                          = "sapiGetBrokerSubAccountDepositHist"
	MethodSapiGetBrokerSubAccountSpotSummary                          = "sapiGetBrokerSubAccountSpotSummary"
	MethodSapiGetBrokerSubAccountMarginSummary                        = "sapiGetBrokerSubAccountMarginSummary"
	MethodSapiGetBrokerSubAccountFuturesSummary                       = "sapiGetBrokerSubAccountFuturesSummary"
	MethodSapiGetBrokerRebateFuturesRecentRecord                      = "sapiGetBrokerRebateFuturesRecentRecord"
	MethodSapiGetBrokerSubAccountApiIpRestriction                     = "sapiGetBrokerSubAccountApiIpRestriction"
	MethodSapiGetBrokerUniversalTransfer                              = "sapiGetBrokerUniversalTransfer"
	MethodSapiGetAccountApiRestrictions                               = "sapiGetAccountApiRestrictions"
	MethodSapiGetC2cOrderMatchListUserOrderHistory                    = "sapiGetC2cOrderMatchListUserOrderHistory"
	MethodSapiGetNftHistoryTransactions                               = "sapiGetNftHistoryTransactions"
	MethodSapiGetNftHistoryDeposit                                    = "sapiGetNftHistoryDeposit"
	MethodSapiGetNftHistoryWithdraw                                   = "sapiGetNftHistoryWithdraw"
	MethodSapiGetNftUserGetAsset                                      = "sapiGetNftUserGetAsset"
	MethodSapiGetPayTransactions                                      = "sapiGetPayTransactions"
	MethodSapiGetGiftcardVerify                                       = "sapiGetGiftcardVerify"
	MethodSapiGetGiftcardCryptographyRsaPublicKey                     = "sapiGetGiftcardCryptographyRsaPublicKey"
	MethodSapiGetGiftcardBuyCodeTokenLimit                            = "sapiGetGiftcardBuyCodeTokenLimit"
	MethodSapiGetAlgoSpotOpenOrders                                   = "sapiGetAlgoSpotOpenOrders"
	MethodSapiGetAlgoSpotHistoricalOrders                             = "sapiGetAlgoSpotHistoricalOrders"
	MethodSapiGetAlgoSpotSubOrders                                    = "sapiGetAlgoSpotSubOrders"
	MethodSapiGetAlgoFuturesOpenOrders                                = "sapiGetAlgoFuturesOpenOrders"
	MethodSapiGetAlgoFuturesHistoricalOrders                          = "sapiGetAlgoFuturesHistoricalOrders"
	MethodSapiGetAlgoFuturesSubOrders                                 = "sapiGetAlgoFuturesSubOrders"
	MethodSapiGetPortfolioAccount                                     = "sapiGetPortfolioAccount"
	MethodSapiGetPortfolioCollateralRate                              = "sapiGetPortfolioCollateralRate"
	MethodSapiGetPortfolioPmLoan                                      = "sapiGetPortfolioPmLoan"
	MethodSapiGetPortfolioInterestHistory                             = "sapiGetPortfolioInterestHistory"
	MethodSapiGetPortfolioAssetIndexPrice                             = "sapiGetPortfolioAssetIndexPrice"
	MethodSapiGetPortfolioRepayFuturesSwitch                          = "sapiGetPortfolioRepayFuturesSwitch"
	MethodSapiGetPortfolioMarginAssetLeverage                         = "sapiGetPortfolioMarginAssetLeverage"
	MethodSapiGetStakingProductList                                   = "sapiGetStakingProductList"
	MethodSapiGetStakingPosition                                      = "sapiGetStakingPosition"
	MethodSapiGetStakingStakingRecord                                 = "sapiGetStakingStakingRecord"
	MethodSapiGetStakingPersonalLeftQuota                             = "sapiGetStakingPersonalLeftQuota"
	MethodSapiGetLendingAutoInvestTargetAssetList                     = "sapiGetLendingAutoInvestTargetAssetList"
	MethodSapiGetLendingAutoInvestTargetAssetRoiList                  = "sapiGetLendingAutoInvestTargetAssetRoiList"
	MethodSapiGetLendingAutoInvestAllAsset                            = "sapiGetLendingAutoInvestAllAsset"
	MethodSapiGetLendingAutoInvestSourceAssetList                     = "sapiGetLendingAutoInvestSourceAssetList"
	MethodSapiGetLendingAutoInvestPlanList                            = "sapiGetLendingAutoInvestPlanList"
	MethodSapiGetLendingAutoInvestPlanId                              = "sapiGetLendingAutoInvestPlanId"
	MethodSapiGetLendingAutoInvestHistoryList                         = "sapiGetLendingAutoInvestHistoryList"
	MethodSapiGetLendingAutoInvestIndexInfo                           = "sapiGetLendingAutoInvestIndexInfo"
	MethodSapiGetLendingAutoInvestIndexUserSummary                    = "sapiGetLendingAutoInvestIndexUserSummary"
	MethodSapiGetLendingAutoInvestOneOffStatus                        = "sapiGetLendingAutoInvestOneOffStatus"
	MethodSapiGetLendingAutoInvestRedeemHistory                       = "sapiGetLendingAutoInvestRedeemHistory"
	MethodSapiGetLendingAutoInvestRebalanceHistory                    = "sapiGetLendingAutoInvestRebalanceHistory"
	MethodSapiGetSimpleEarnFlexibleList                               = "sapiGetSimpleEarnFlexibleList"
	MethodSapiGetSimpleEarnLockedList                                 = "sapiGetSimpleEarnLockedList"
	MethodSapiGetSimpleEarnFlexiblePersonalLeftQuota                  = "sapiGetSimpleEarnFlexiblePersonalLeftQuota"
	MethodSapiGetSimpleEarnLockedPersonalLeftQuota                    = "sapiGetSimpleEarnLockedPersonalLeftQuota"
	MethodSapiGetSimpleEarnFlexibleSubscriptionPreview                = "sapiGetSimpleEarnFlexibleSubscriptionPreview"
	MethodSapiGetSimpleEarnLockedSubscriptionPreview                  = "sapiGetSimpleEarnLockedSubscriptionPreview"
	MethodSapiGetSimpleEarnFlexibleHistoryRateHistory                 = "sapiGetSimpleEarnFlexibleHistoryRateHistory"
	MethodSapiGetSimpleEarnFlexiblePosition                           = "sapiGetSimpleEarnFlexiblePosition"
	MethodSapiGetSimpleEarnLockedPosition                             = "sapiGetSimpleEarnLockedPosition"
	MethodSapiGetSimpleEarnAccount                                    = "sapiGetSimpleEarnAccount"
	MethodSapiGetSimpleEarnFlexibleHistorySubscriptionRecord          = "sapiGetSimpleEarnFlexibleHistorySubscriptionRecord"
	MethodSapiGetSimpleEarnLockedHistorySubscriptionRecord            = "sapiGetSimpleEarnLockedHistorySubscriptionRecord"
	MethodSapiGetSimpleEarnFlexibleHistoryRedemptionRecord            = "sapiGetSimpleEarnFlexibleHistoryRedemptionRecord"
	MethodSapiGetSimpleEarnLockedHistoryRedemptionRecord              = "sapiGetSimpleEarnLockedHistoryRedemptionRecord"
	MethodSapiGetSimpleEarnFlexibleHistoryRewardsRecord               = "sapiGetSimpleEarnFlexibleHistoryRewardsRecord"
	MethodSapiGetSimpleEarnLockedHistoryRewardsRecord                 = "sapiGetSimpleEarnLockedHistoryRewardsRecord"
	MethodSapiGetSimpleEarnFlexibleHistoryCollateralRecord            = "sapiGetSimpleEarnFlexibleHistoryCollateralRecord"
	MethodSapiPostAssetDust                                           = "sapiPostAssetDust"
	MethodSapiPostAssetDustBtc                                        = "sapiPostAssetDustBtc"
	MethodSapiPostAssetTransfer                                       = "sapiPostAssetTransfer"
	MethodSapiPostAssetGetFundingAsset                                = "sapiPostAssetGetFundingAsset"
	MethodSapiPostAssetConvertTransfer                                = "sapiPostAssetConvertTransfer"
	MethodSapiPostAccountDisableFastWithdrawSwitch                    = "sapiPostAccountDisableFastWithdrawSwitch"
	MethodSapiPostAccountEnableFastWithdrawSwitch                     = "sapiPostAccountEnableFastWithdrawSwitch"
	MethodSapiPostCapitalWithdrawApply                                = "sapiPostCapitalWithdrawApply"
	MethodSapiPostCapitalContractConvertibleCoins                     = "sapiPostCapitalContractConvertibleCoins"
	MethodSapiPostCapitalDepositCreditApply                           = "sapiPostCapitalDepositCreditApply"
	MethodSapiPostMarginTransfer                                      = "sapiPostMarginTransfer"
	MethodSapiPostMarginLoan                                          = "sapiPostMarginLoan"
	MethodSapiPostMarginRepay                                         = "sapiPostMarginRepay"
	MethodSapiPostMarginOrder                                         = "sapiPostMarginOrder"
	MethodSapiPostMarginOrderOco                                      = "sapiPostMarginOrderOco"
	MethodSapiPostMarginDust                                          = "sapiPostMarginDust"
	MethodSapiPostMarginExchangeSmallLiability                        = "sapiPostMarginExchangeSmallLiability"
	MethodSapiPostMarginIsolatedTransfer                              = "sapiPostMarginIsolatedTransfer"
	MethodSapiPostMarginIsolatedAccount                               = "sapiPostMarginIsolatedAccount"
	MethodSapiPostMarginMaxLeverage                                   = "sapiPostMarginMaxLeverage"
	MethodSapiPostBnbBurn                                             = "sapiPostBnbBurn"
	MethodSapiPostSubAccountVirtualSubAccount                         = "sapiPostSubAccountVirtualSubAccount"
	MethodSapiPostSubAccountMarginTransfer                            = "sapiPostSubAccountMarginTransfer"
	MethodSapiPostSubAccountMarginEnable                              = "sapiPostSubAccountMarginEnable"
	MethodSapiPostSubAccountFuturesEnable                             = "sapiPostSubAccountFuturesEnable"
	MethodSapiPostSubAccountFuturesTransfer                           = "sapiPostSubAccountFuturesTransfer"
	MethodSapiPostSubAccountFuturesInternalTransfer                   = "sapiPostSubAccountFuturesInternalTransfer"
	MethodSapiPostSubAccountTransferSubToSub                          = "sapiPostSubAccountTransferSubToSub"
	MethodSapiPostSubAccountTransferSubToMaster                       = "sapiPostSubAccountTransferSubToMaster"
	MethodSapiPostSubAccountUniversalTransfer                         = "sapiPostSubAccountUniversalTransfer"
	MethodSapiPostSubAccountOptionsEnable                             = "sapiPostSubAccountOptionsEnable"
	MethodSapiPostManagedSubaccountDeposit                            = "sapiPostManagedSubaccountDeposit"
	MethodSapiPostManagedSubaccountWithdraw                           = "sapiPostManagedSubaccountWithdraw"
	MethodSapiPostUserDataStream                                      = "sapiPostUserDataStream"
	MethodSapiPostUserDataStreamIsolated                              = "sapiPostUserDataStreamIsolated"
	MethodSapiPostFuturesTransfer                                     = "sapiPostFuturesTransfer"
	MethodSapiPostLendingCustomizedFixedPurchase                      = "sapiPostLendingCustomizedFixedPurchase"
	MethodSapiPostLendingDailyPurchase                                = "sapiPostLendingDailyPurchase"
	MethodSapiPostLendingDailyRedeem                                  = "sapiPostLendingDailyRedeem"
	MethodSapiPostBswapLiquidityAdd                                   = "sapiPostBswapLiquidityAdd"
	MethodSapiPostBswapLiquidityRemove                                = "sapiPostBswapLiquidityRemove"
	MethodSapiPostBswapSwap                                           = "sapiPostBswapSwap"
	MethodSapiPostBswapClaimRewards                                   = "sapiPostBswapClaimRewards"
	MethodSapiPostBlvtSubscribe                                       = "sapiPostBlvtSubscribe"
	MethodSapiPostBlvtRedeem                                          = "sapiPostBlvtRedeem"
	MethodSapiPostApiReferralCustomization                            = "sapiPostApiReferralCustomization"
	MethodSapiPostApiReferralUserCustomization                        = "sapiPostApiReferralUserCustomization"
	MethodSapiPostApiReferralRebateHistoricalRecord                   = "sapiPostApiReferralRebateHistoricalRecord"
	MethodSapiPostApiReferralKickbackHistoricalRecord                 = "sapiPostApiReferralKickbackHistoricalRecord"
	MethodSapiPostBrokerSubAccount                                    = "sapiPostBrokerSubAccount"
	MethodSapiPostBrokerSubAccountMargin                              = "sapiPostBrokerSubAccountMargin"
	MethodSapiPostBrokerSubAccountFutures                             = "sapiPostBrokerSubAccountFutures"
	MethodSapiPostBrokerSubAccountApi                                 = "sapiPostBrokerSubAccountApi"
	MethodSapiPostBrokerSubAccountApiPermission                       = "sapiPostBrokerSubAccountApiPermission"
	MethodSapiPostBrokerSubAccountApiCommission                       = "sapiPostBrokerSubAccountApiCommission"
	MethodSapiPostBrokerSubAccountApiCommissionFutures                = "sapiPostBrokerSubAccountApiCommissionFutures"
	MethodSapiPostBrokerSubAccountApiCommissionCoinFutures            = "sapiPostBrokerSubAccountApiCommissionCoinFutures"
	MethodSapiPostBrokerTransfer                                      = "sapiPostBrokerTransfer"
	MethodSapiPostBrokerTransferFutures                               = "sapiPostBrokerTransferFutures"
	MethodSapiPostBrokerRebateHistoricalRecord                        = "sapiPostBrokerRebateHistoricalRecord"
	MethodSapiPostBrokerSubAccountBnbBurnSpot                         = "sapiPostBrokerSubAccountBnbBurnSpot"
	MethodSapiPostBrokerSubAccountBnbBurnMarginInterest               = "sapiPostBrokerSubAccountBnbBurnMarginInterest"
	MethodSapiPostBrokerSubAccountBlvt                                = "sapiPostBrokerSubAccountBlvt"
	MethodSapiPostBrokerSubAccountApiIpRestriction                    = "sapiPostBrokerSubAccountApiIpRestriction"
	MethodSapiPostBrokerSubAccountApiIpRestrictionIpList              = "sapiPostBrokerSubAccountApiIpRestrictionIpList"
	MethodSapiPostBrokerUniversalTransfer                             = "sapiPostBrokerUniversalTransfer"
	MethodSapiPostBrokerSubAccountApiPermissionUniversalTransfer      = "sapiPostBrokerSubAccountApiPermissionUniversalTransfer"
	MethodSapiPostBrokerSubAccountApiPermissionVanillaOptions         = "sapiPostBrokerSubAccountApiPermissionVanillaOptions"
	MethodSapiPostGiftcardCreateCode                                  = "sapiPostGiftcardCreateCode"
	MethodSapiPostGiftcardRedeemCode                                  = "sapiPostGiftcardRedeemCode"
	MethodSapiPostGiftcardBuyCode                                     = "sapiPostGiftcardBuyCode"
	MethodSapiPostAlgoSpotNewOrderTwap                                = "sapiPostAlgoSpotNewOrderTwap"
	MethodSapiPostAlgoFuturesNewOrderVp                               = "sapiPostAlgoFuturesNewOrderVp"
	MethodSapiPostAlgoFuturesNewOrderTwap                             = "sapiPostAlgoFuturesNewOrderTwap"
	MethodSapiPostStakingPurchase                                     = "sapiPostStakingPurchase"
	MethodSapiPostStakingRedeem                                       = "sapiPostStakingRedeem"
	MethodSapiPostStakingSetAutoStaking                               = "sapiPostStakingSetAutoStaking"
	MethodSapiPostPortfolioRepay                                      = "sapiPostPortfolioRepay"
	MethodSapiPostLoanVipRenew                                        = "sapiPostLoanVipRenew"
	MethodSapiPostLoanVipBorrow                                       = "sapiPostLoanVipBorrow"
	MethodSapiPostLoanBorrow                                          = "sapiPostLoanBorrow"
	MethodSapiPostLoanRepay                                           = "sapiPostLoanRepay"
	MethodSapiPostLoanAdjustLtv                                       = "sapiPostLoanAdjustLtv"
	MethodSapiPostLoanCustomizeMarginCall                             = "sapiPostLoanCustomizeMarginCall"
	MethodSapiPostLoanFlexibleBorrow                                  = "sapiPostLoanFlexibleBorrow"
	MethodSapiPostLoanFlexibleRepay                                   = "sapiPostLoanFlexibleRepay"
	MethodSapiPostLoanFlexibleAdjustLtv                               = "sapiPostLoanFlexibleAdjustLtv"
	MethodSapiPostLoanVipRepay                                        = "sapiPostLoanVipRepay"
	MethodSapiPostConvertGetQuote                                     = "sapiPostConvertGetQuote"
	MethodSapiPostConvertAcceptQuote                                  = "sapiPostConvertAcceptQuote"
	MethodSapiPostPortfolioAutoCollection                             = "sapiPostPortfolioAutoCollection"
	MethodSapiPostPortfolioAssetCollection                            = "sapiPostPortfolioAssetCollection"
	MethodSapiPostPortfolioBnbTransfer                                = "sapiPostPortfolioBnbTransfer"
	MethodSapiPostPortfolioRepayFuturesSwitch                         = "sapiPostPortfolioRepayFuturesSwitch"
	MethodSapiPostPortfolioRepayFuturesNegativeBalance                = "sapiPostPortfolioRepayFuturesNegativeBalance"
	MethodSapiPostLendingAutoInvestPlanAdd                            = "sapiPostLendingAutoInvestPlanAdd"
	MethodSapiPostLendingAutoInvestPlanEdit                           = "sapiPostLendingAutoInvestPlanEdit"
	MethodSapiPostLendingAutoInvestPlanEditStatus                     = "sapiPostLendingAutoInvestPlanEditStatus"
	MethodSapiPostLendingAutoInvestOneOff                             = "sapiPostLendingAutoInvestOneOff"
	MethodSapiPostLendingAutoInvestRedeem                             = "sapiPostLendingAutoInvestRedeem"
	MethodSapiPostSimpleEarnFlexibleSubscribe                         = "sapiPostSimpleEarnFlexibleSubscribe"
	MethodSapiPostSimpleEarnLockedSubscribe                           = "sapiPostSimpleEarnLockedSubscribe"
	MethodSapiPostSimpleEarnFlexibleRedeem                            = "sapiPostSimpleEarnFlexibleRedeem"
	MethodSapiPostSimpleEarnLockedRedeem                              = "sapiPostSimpleEarnLockedRedeem"
	MethodSapiPostSimpleEarnFlexibleSetAutoSubscribe                  = "sapiPostSimpleEarnFlexibleSetAutoSubscribe"
	MethodSapiPostSimpleEarnLockedSetAutoSubscribe                    = "sapiPostSimpleEarnLockedSetAutoSubscribe"
	MethodSapiPutUserDataStream                                       = "sapiPutUserDataStream"
	MethodSapiPutUserDataStreamIsolated                               = "sapiPutUserDataStreamIsolated"
	MethodSapiDeleteMarginOpenOrders                                  = "sapiDeleteMarginOpenOrders"
	MethodSapiDeleteMarginOrder                                       = "sapiDeleteMarginOrder"
	MethodSapiDeleteMarginOrderList                                   = "sapiDeleteMarginOrderList"
	MethodSapiDeleteMarginIsolatedAccount                             = "sapiDeleteMarginIsolatedAccount"
	MethodSapiDeleteUserDataStream                                    = "sapiDeleteUserDataStream"
	MethodSapiDeleteUserDataStreamIsolated                            = "sapiDeleteUserDataStreamIsolated"
	MethodSapiDeleteBrokerSubAccountApi                               = "sapiDeleteBrokerSubAccountApi"
	MethodSapiDeleteBrokerSubAccountApiIpRestrictionIpList            = "sapiDeleteBrokerSubAccountApiIpRestrictionIpList"
	MethodSapiDeleteAlgoSpotOrder                                     = "sapiDeleteAlgoSpotOrder"
	MethodSapiDeleteAlgoFuturesOrder                                  = "sapiDeleteAlgoFuturesOrder"
	MethodSapiDeleteSubAccountSubAccountApiIpRestrictionIpList        = "sapiDeleteSubAccountSubAccountApiIpRestrictionIpList"
	MethodSapiV2GetSubAccountFuturesAccount                           = "sapiV2GetSubAccountFuturesAccount"
	MethodSapiV2GetSubAccountFuturesAccountSummary                    = "sapiV2GetSubAccountFuturesAccountSummary"
	MethodSapiV2GetSubAccountFuturesPositionRisk                      = "sapiV2GetSubAccountFuturesPositionRisk"
	MethodSapiV2PostSubAccountSubAccountApiIpRestriction              = "sapiV2PostSubAccountSubAccountApiIpRestriction"
	MethodSapiV3GetSubAccountAssets                                   = "sapiV3GetSubAccountAssets"
	MethodSapiV3PostAssetGetUserAsset                                 = "sapiV3PostAssetGetUserAsset"
	MethodSapiV4GetSubAccountAssets                                   = "sapiV4GetSubAccountAssets"
	MethodDapiPublicGetPing                                           = "dapiPublicGetPing"
	MethodDapiPublicGetTime                                           = "dapiPublicGetTime"
	MethodDapiPublicGetExchangeInfo                                   = "dapiPublicGetExchangeInfo"
	MethodDapiPublicGetDepth                                          = "dapiPublicGetDepth"
	MethodDapiPublicGetTrades                                         = "dapiPublicGetTrades"
	MethodDapiPublicGetHistoricalTrades                               = "dapiPublicGetHistoricalTrades"
	MethodDapiPublicGetAggTrades                                      = "dapiPublicGetAggTrades"
	MethodDapiPublicGetPremiumIndex                                   = "dapiPublicGetPremiumIndex"
	MethodDapiPublicGetFundingRate                                    = "dapiPublicGetFundingRate"
	MethodDapiPublicGetKlines                                         = "dapiPublicGetKlines"
	MethodDapiPublicGetContinuousKlines                               = "dapiPublicGetContinuousKlines"
	MethodDapiPublicGetIndexPriceKlines                               = "dapiPublicGetIndexPriceKlines"
	MethodDapiPublicGetMarkPriceKlines                                = "dapiPublicGetMarkPriceKlines"
	MethodDapiPublicGetPremiumIndexKlines                             = "dapiPublicGetPremiumIndexKlines"
	MethodDapiPublicGetTicker24hr                                     = "dapiPublicGetTicker24hr"
	MethodDapiPublicGetTickerPrice                                    = "dapiPublicGetTickerPrice"
	MethodDapiPublicGetTickerBookTicker                               = "dapiPublicGetTickerBookTicker"
	MethodDapiPublicGetConstituents                                   = "dapiPublicGetConstituents"
	MethodDapiPublicGetOpenInterest                                   = "dapiPublicGetOpenInterest"
	MethodDapiDataGetDeliveryPrice                                    = "dapiDataGetDeliveryPrice"
	MethodDapiDataGetOpenInterestHist                                 = "dapiDataGetOpenInterestHist"
	MethodDapiDataGetTopLongShortAccountRatio                         = "dapiDataGetTopLongShortAccountRatio"
	MethodDapiDataGetTopLongShortPositionRatio                        = "dapiDataGetTopLongShortPositionRatio"
	MethodDapiDataGetGlobalLongShortAccountRatio                      = "dapiDataGetGlobalLongShortAccountRatio"
	MethodDapiDataGetTakerBuySellVol                                  = "dapiDataGetTakerBuySellVol"
	MethodDapiDataGetBasis                                            = "dapiDataGetBasis"
	MethodDapiPrivateGetPositionSideDual                              = "dapiPrivateGetPositionSideDual"
	MethodDapiPrivateGetOrderAmendment                                = "dapiPrivateGetOrderAmendment"
	MethodDapiPrivateGetOrder                                         = "dapiPrivateGetOrder"
	MethodDapiPrivateGetOpenOrder                                     = "dapiPrivateGetOpenOrder"
	MethodDapiPrivateGetOpenOrders                                    = "dapiPrivateGetOpenOrders"
	MethodDapiPrivateGetAllOrders                                     = "dapiPrivateGetAllOrders"
	MethodDapiPrivateGetBalance                                       = "dapiPrivateGetBalance"
	MethodDapiPrivateGetAccount                                       = "dapiPrivateGetAccount"
	MethodDapiPrivateGetPositionMarginHistory                         = "dapiPrivateGetPositionMarginHistory"
	MethodDapiPrivateGetPositionRisk                                  = "dapiPrivateGetPositionRisk"
	MethodDapiPrivateGetUserTrades                                    = "dapiPrivateGetUserTrades"
	MethodDapiPrivateGetIncome                                        = "dapiPrivateGetIncome"
	MethodDapiPrivateGetLeverageBracket                               = "dapiPrivateGetLeverageBracket"
	MethodDapiPrivateGetForceOrders                                   = "dapiPrivateGetForceOrders"
	MethodDapiPrivateGetAdlQuantile                                   = "dapiPrivateGetAdlQuantile"
	MethodDapiPrivateGetCommissionRate                                = "dapiPrivateGetCommissionRate"
	MethodDapiPrivateGetIncomeAsyn                                    = "dapiPrivateGetIncomeAsyn"
	MethodDapiPrivateGetIncomeAsynId                                  = "dapiPrivateGetIncomeAsynId"
	MethodDapiPrivateGetPmExchangeInfo                                = "dapiPrivateGetPmExchangeInfo"
	MethodDapiPrivateGetPmAccountInfo                                 = "dapiPrivateGetPmAccountInfo"
	MethodDapiPrivatePostPositionSideDual                             = "dapiPrivatePostPositionSideDual"
	MethodDapiPrivatePostOrder                                        = "dapiPrivatePostOrder"
	MethodDapiPrivatePostBatchOrders                                  = "dapiPrivatePostBatchOrders"
	MethodDapiPrivatePostCountdownCancelAll                           = "dapiPrivatePostCountdownCancelAll"
	MethodDapiPrivatePostLeverage                                     = "dapiPrivatePostLeverage"
	MethodDapiPrivatePostMarginType                                   = "dapiPrivatePostMarginType"
	MethodDapiPrivatePostPositionMargin                               = "dapiPrivatePostPositionMargin"
	MethodDapiPrivatePostListenKey                                    = "dapiPrivatePostListenKey"
	MethodDapiPrivatePutListenKey                                     = "dapiPrivatePutListenKey"
	MethodDapiPrivatePutOrder                                         = "dapiPrivatePutOrder"
	MethodDapiPrivatePutBatchOrders                                   = "dapiPrivatePutBatchOrders"
	MethodDapiPrivateDeleteOrder                                      = "dapiPrivateDeleteOrder"
	MethodDapiPrivateDeleteAllOpenOrders                              = "dapiPrivateDeleteAllOpenOrders"
	MethodDapiPrivateDeleteBatchOrders                                = "dapiPrivateDeleteBatchOrders"
	MethodDapiPrivateDeleteListenKey                                  = "dapiPrivateDeleteListenKey"
	MethodDapiPrivateV2GetLeverageBracket                             = "dapiPrivateV2GetLeverageBracket"
	MethodFapiPublicGetPing                                           = "fapiPublicGetPing"
	MethodFapiPublicGetTime                                           = "fapiPublicGetTime"
	MethodFapiPublicGetExchangeInfo                                   = "fapiPublicGetExchangeInfo"
	MethodFapiPublicGetDepth                                          = "fapiPublicGetDepth"
	MethodFapiPublicGetTrades                                         = "fapiPublicGetTrades"
	MethodFapiPublicGetHistoricalTrades                               = "fapiPublicGetHistoricalTrades"
	MethodFapiPublicGetAggTrades                                      = "fapiPublicGetAggTrades"
	MethodFapiPublicGetKlines                                         = "fapiPublicGetKlines"
	MethodFapiPublicGetContinuousKlines                               = "fapiPublicGetContinuousKlines"
	MethodFapiPublicGetMarkPriceKlines                                = "fapiPublicGetMarkPriceKlines"
	MethodFapiPublicGetIndexPriceKlines                               = "fapiPublicGetIndexPriceKlines"
	MethodFapiPublicGetFundingRate                                    = "fapiPublicGetFundingRate"
	MethodFapiPublicGetFundingInfo                                    = "fapiPublicGetFundingInfo"
	MethodFapiPublicGetPremiumIndex                                   = "fapiPublicGetPremiumIndex"
	MethodFapiPublicGetTicker24hr                                     = "fapiPublicGetTicker24hr"
	MethodFapiPublicGetTickerPrice                                    = "fapiPublicGetTickerPrice"
	MethodFapiPublicGetTickerBookTicker                               = "fapiPublicGetTickerBookTicker"
	MethodFapiPublicGetOpenInterest                                   = "fapiPublicGetOpenInterest"
	MethodFapiPublicGetIndexInfo                                      = "fapiPublicGetIndexInfo"
	MethodFapiPublicGetAssetIndex                                     = "fapiPublicGetAssetIndex"
	MethodFapiPublicGetConstituents                                   = "fapiPublicGetConstituents"
	MethodFapiPublicGetApiTradingStatus                               = "fapiPublicGetApiTradingStatus"
	MethodFapiPublicGetLvtKlines                                      = "fapiPublicGetLvtKlines"
	MethodFapiDataGetDeliveryPrice                                    = "fapiDataGetDeliveryPrice"
	MethodFapiDataGetOpenInterestHist                                 = "fapiDataGetOpenInterestHist"
	MethodFapiDataGetTopLongShortAccountRatio                         = "fapiDataGetTopLongShortAccountRatio"
	MethodFapiDataGetTopLongShortPositionRatio                        = "fapiDataGetTopLongShortPositionRatio"
	MethodFapiDataGetGlobalLongShortAccountRatio                      = "fapiDataGetGlobalLongShortAccountRatio"
	MethodFapiDataGetTakerlongshortRatio                              = "fapiDataGetTakerlongshortRatio"
	MethodFapiDataGetBasis                                            = "fapiDataGetBasis"
	MethodFapiPrivateGetForceOrders                                   = "fapiPrivateGetForceOrders"
	MethodFapiPrivateGetAllOrders                                     = "fapiPrivateGetAllOrders"
	MethodFapiPrivateGetOpenOrder                                     = "fapiPrivateGetOpenOrder"
	MethodFapiPrivateGetOpenOrders                                    = "fapiPrivateGetOpenOrders"
	MethodFapiPrivateGetOpenAlgoOrders                                = "fapiPrivateGetOpenAlgoOrders"
	MethodFapiPrivateGetOrder                                         = "fapiPrivateGetOrder"
	MethodFapiPrivateGetAlgoOrder                                     = "fapiPrivateGetAlgoOrder"
	MethodFapiPrivateGetAllAlgoOrders                                 = "fapiPrivateGetAllAlgoOrders"
	MethodFapiPrivateGetAccount                                       = "fapiPrivateGetAccount"
	MethodFapiPrivateGetBalance                                       = "fapiPrivateGetBalance"
	MethodFapiPrivateGetLeverageBracket                               = "fapiPrivateGetLeverageBracket"
	MethodFapiPrivateGetPositionMarginHistory                         = "fapiPrivateGetPositionMarginHistory"
	MethodFapiPrivateGetPositionRisk                                  = "fapiPrivateGetPositionRisk"
	MethodFapiPrivateGetPositionSideDual                              = "fapiPrivateGetPositionSideDual"
	MethodFapiPrivateGetUserTrades                                    = "fapiPrivateGetUserTrades"
	MethodFapiPrivateGetIncome                                        = "fapiPrivateGetIncome"
	MethodFapiPrivateGetCommissionRate                                = "fapiPrivateGetCommissionRate"
	MethodFapiPrivateGetApiTradingStatus                              = "fapiPrivateGetApiTradingStatus"
	MethodFapiPrivateGetMultiAssetsMargin                             = "fapiPrivateGetMultiAssetsMargin"
	MethodFapiPrivateGetApiReferralIfNewUser                          = "fapiPrivateGetApiReferralIfNewUser"
	MethodFapiPrivateGetApiReferralCustomization                      = "fapiPrivateGetApiReferralCustomization"
	MethodFapiPrivateGetApiReferralUserCustomization                  = "fapiPrivateGetApiReferralUserCustomization"
	MethodFapiPrivateGetApiReferralTraderNum                          = "fapiPrivateGetApiReferralTraderNum"
	MethodFapiPrivateGetApiReferralOverview                           = "fapiPrivateGetApiReferralOverview"
	MethodFapiPrivateGetApiReferralTradeVol                           = "fapiPrivateGetApiReferralTradeVol"
	MethodFapiPrivateGetApiReferralRebateVol                          = "fapiPrivateGetApiReferralRebateVol"
	MethodFapiPrivateGetApiReferralTraderSummary                      = "fapiPrivateGetApiReferralTraderSummary"
	MethodFapiPrivateGetAdlQuantile                                   = "fapiPrivateGetAdlQuantile"
	MethodFapiPrivateGetPmAccountInfo                                 = "fapiPrivateGetPmAccountInfo"
	MethodFapiPrivateGetOrderAmendment                                = "fapiPrivateGetOrderAmendment"
	MethodFapiPrivateGetIncomeAsyn                                    = "fapiPrivateGetIncomeAsyn"
	MethodFapiPrivateGetIncomeAsynId                                  = "fapiPrivateGetIncomeAsynId"
	MethodFapiPrivateGetOrderAsyn                                     = "fapiPrivateGetOrderAsyn"
	MethodFapiPrivateGetOrderAsynId                                   = "fapiPrivateGetOrderAsynId"
	MethodFapiPrivateGetTradeAsyn                                     = "fapiPrivateGetTradeAsyn"
	MethodFapiPrivateGetTradeAsynId                                   = "fapiPrivateGetTradeAsynId"
	MethodFapiPrivatePostBatchOrders                                  = "fapiPrivatePostBatchOrders"
	MethodFapiPrivatePostPositionSideDual                             = "fapiPrivatePostPositionSideDual"
	MethodFapiPrivatePostPositionMargin                               = "fapiPrivatePostPositionMargin"
	MethodFapiPrivatePostMarginType                                   = "fapiPrivatePostMarginType"
	MethodFapiPrivatePostOrder                                        = "fapiPrivatePostOrder"
	MethodFapiPrivatePostAlgoOrder                                    = "fapiPrivatePostAlgoOrder"
	MethodFapiPrivatePostLeverage                                     = "fapiPrivatePostLeverage"
	MethodFapiPrivatePostListenKey                                    = "fapiPrivatePostListenKey"
	MethodFapiPrivatePostCountdownCancelAll                           = "fapiPrivatePostCountdownCancelAll"
	MethodFapiPrivatePostMultiAssetsMargin                            = "fapiPrivatePostMultiAssetsMargin"
	MethodFapiPrivatePostApiReferralCustomization                     = "fapiPrivatePostApiReferralCustomization"
	MethodFapiPrivatePostApiReferralUserCustomization                 = "fapiPrivatePostApiReferralUserCustomization"
	MethodFapiPrivatePutListenKey                                     = "fapiPrivatePutListenKey"
	MethodFapiPrivatePutOrder                                         = "fapiPrivatePutOrder"
	MethodFapiPrivatePutBatchOrders                                   = "fapiPrivatePutBatchOrders"
	MethodFapiPrivateDeleteBatchOrders                                = "fapiPrivateDeleteBatchOrders"
	MethodFapiPrivateDeleteOrder                                      = "fapiPrivateDeleteOrder"
	MethodFapiPrivateDeleteAlgoOrder                                  = "fapiPrivateDeleteAlgoOrder"
	MethodFapiPrivateDeleteAllOpenOrders                              = "fapiPrivateDeleteAllOpenOrders"
	MethodFapiPrivateDeleteListenKey                                  = "fapiPrivateDeleteListenKey"
	MethodFapiPublicV2GetTickerPrice                                  = "fapiPublicV2GetTickerPrice"
	MethodFapiPrivateV2GetAccount                                     = "fapiPrivateV2GetAccount"
	MethodFapiPrivateV2GetBalance                                     = "fapiPrivateV2GetBalance"
	MethodFapiPrivateV2GetPositionRisk                                = "fapiPrivateV2GetPositionRisk"
	MethodEapiPublicGetPing                                           = "eapiPublicGetPing"
	MethodEapiPublicGetTime                                           = "eapiPublicGetTime"
	MethodEapiPublicGetExchangeInfo                                   = "eapiPublicGetExchangeInfo"
	MethodEapiPublicGetIndex                                          = "eapiPublicGetIndex"
	MethodEapiPublicGetTicker                                         = "eapiPublicGetTicker"
	MethodEapiPublicGetMark                                           = "eapiPublicGetMark"
	MethodEapiPublicGetDepth                                          = "eapiPublicGetDepth"
	MethodEapiPublicGetKlines                                         = "eapiPublicGetKlines"
	MethodEapiPublicGetTrades                                         = "eapiPublicGetTrades"
	MethodEapiPublicGetHistoricalTrades                               = "eapiPublicGetHistoricalTrades"
	MethodEapiPublicGetExerciseHistory                                = "eapiPublicGetExerciseHistory"
	MethodEapiPublicGetOpenInterest                                   = "eapiPublicGetOpenInterest"
	MethodEapiPrivateGetAccount                                       = "eapiPrivateGetAccount"
	MethodEapiPrivateGetPosition                                      = "eapiPrivateGetPosition"
	MethodEapiPrivateGetOpenOrders                                    = "eapiPrivateGetOpenOrders"
	MethodEapiPrivateGetHistoryOrders                                 = "eapiPrivateGetHistoryOrders"
	MethodEapiPrivateGetUserTrades                                    = "eapiPrivateGetUserTrades"
	MethodEapiPrivateGetExerciseRecord                                = "eapiPrivateGetExerciseRecord"
	MethodEapiPrivateGetBill                                          = "eapiPrivateGetBill"
	MethodEapiPrivateGetIncomeAsyn                                    = "eapiPrivateGetIncomeAsyn"
	MethodEapiPrivateGetIncomeAsynId                                  = "eapiPrivateGetIncomeAsynId"
	MethodEapiPrivateGetMarginAccount                                 = "eapiPrivateGetMarginAccount"
	MethodEapiPrivateGetMmp                                           = "eapiPrivateGetMmp"
	MethodEapiPrivateGetCountdownCancelAll                            = "eapiPrivateGetCountdownCancelAll"
	MethodEapiPrivateGetOrder                                         = "eapiPrivateGetOrder"
	MethodEapiPrivatePostOrder                                        = "eapiPrivatePostOrder"
	MethodEapiPrivatePostBatchOrders                                  = "eapiPrivatePostBatchOrders"
	MethodEapiPrivatePostListenKey                                    = "eapiPrivatePostListenKey"
	MethodEapiPrivatePostMmpSet                                       = "eapiPrivatePostMmpSet"
	MethodEapiPrivatePostMmpReset                                     = "eapiPrivatePostMmpReset"
	MethodEapiPrivatePostCountdownCancelAll                           = "eapiPrivatePostCountdownCancelAll"
	MethodEapiPrivatePostCountdownCancelAllHeartBeat                  = "eapiPrivatePostCountdownCancelAllHeartBeat"
	MethodEapiPrivatePutListenKey                                     = "eapiPrivatePutListenKey"
	MethodEapiPrivateDeleteOrder                                      = "eapiPrivateDeleteOrder"
	MethodEapiPrivateDeleteBatchOrders                                = "eapiPrivateDeleteBatchOrders"
	MethodEapiPrivateDeleteAllOpenOrders                              = "eapiPrivateDeleteAllOpenOrders"
	MethodEapiPrivateDeleteAllOpenOrdersByUnderlying                  = "eapiPrivateDeleteAllOpenOrdersByUnderlying"
	MethodEapiPrivateDeleteListenKey                                  = "eapiPrivateDeleteListenKey"
	MethodPublicGetPing                                               = "publicGetPing"
	MethodPublicGetTime                                               = "publicGetTime"
	MethodPublicGetDepth                                              = "publicGetDepth"
	MethodPublicGetTrades                                             = "publicGetTrades"
	MethodPublicGetAggTrades                                          = "publicGetAggTrades"
	MethodPublicGetHistoricalTrades                                   = "publicGetHistoricalTrades"
	MethodPublicGetKlines                                             = "publicGetKlines"
	MethodPublicGetUiKlines                                           = "publicGetUiKlines"
	MethodPublicGetTicker24hr                                         = "publicGetTicker24hr"
	MethodPublicGetTicker                                             = "publicGetTicker"
	MethodPublicGetTickerTradingDay                                   = "publicGetTickerTradingDay"
	MethodPublicGetTickerPrice                                        = "publicGetTickerPrice"
	MethodPublicGetTickerBookTicker                                   = "publicGetTickerBookTicker"
	MethodPublicGetExchangeInfo                                       = "publicGetExchangeInfo"
	MethodPublicGetAvgPrice                                           = "publicGetAvgPrice"
	MethodPublicPutUserDataStream                                     = "publicPutUserDataStream"
	MethodPublicPostUserDataStream                                    = "publicPostUserDataStream"
	MethodPublicDeleteUserDataStream                                  = "publicDeleteUserDataStream"
	MethodPrivateGetAllOrderList                                      = "privateGetAllOrderList"
	MethodPrivateGetOpenOrderList                                     = "privateGetOpenOrderList"
	MethodPrivateGetOrderList                                         = "privateGetOrderList"
	MethodPrivateGetOrder                                             = "privateGetOrder"
	MethodPrivateGetOpenOrders                                        = "privateGetOpenOrders"
	MethodPrivateGetAllOrders                                         = "privateGetAllOrders"
	MethodPrivateGetAccount                                           = "privateGetAccount"
	MethodPrivateGetMyTrades                                          = "privateGetMyTrades"
	MethodPrivateGetRateLimitOrder                                    = "privateGetRateLimitOrder"
	MethodPrivateGetMyPreventedMatches                                = "privateGetMyPreventedMatches"
	MethodPrivateGetMyAllocations                                     = "privateGetMyAllocations"
	MethodPrivateGetAccountCommission                                 = "privateGetAccountCommission"
	MethodPrivatePostOrderOco                                         = "privatePostOrderOco"
	MethodPrivatePostSorOrder                                         = "privatePostSorOrder"
	MethodPrivatePostSorOrderTest                                     = "privatePostSorOrderTest"
	MethodPrivatePostOrder                                            = "privatePostOrder"
	MethodPrivatePostOrderCancelReplace                               = "privatePostOrderCancelReplace"
	MethodPrivatePostOrderTest                                        = "privatePostOrderTest"
	MethodPrivateDeleteOpenOrders                                     = "privateDeleteOpenOrders"
	MethodPrivateDeleteOrderList                                      = "privateDeleteOrderList"
	MethodPrivateDeleteOrder                                          = "privateDeleteOrder"
	MethodPapiGetUmOrder                                              = "papiGetUmOrder"
	MethodPapiGetUmOpenOrder                                          = "papiGetUmOpenOrder"
	MethodPapiGetUmOpenOrders                                         = "papiGetUmOpenOrders"
	MethodPapiGetUmAllOrders                                          = "papiGetUmAllOrders"
	MethodPapiGetCmOrder                                              = "papiGetCmOrder"
	MethodPapiGetCmOpenOrder                                          = "papiGetCmOpenOrder"
	MethodPapiGetCmOpenOrders                                         = "papiGetCmOpenOrders"
	MethodPapiGetCmAllOrders                                          = "papiGetCmAllOrders"
	MethodPapiGetUmConditionalOpenOrder                               = "papiGetUmConditionalOpenOrder"
	MethodPapiGetUmConditionalOpenOrders                              = "papiGetUmConditionalOpenOrders"
	MethodPapiGetUmConditionalOrderHistory                            = "papiGetUmConditionalOrderHistory"
	MethodPapiGetUmConditionalAllOrders                               = "papiGetUmConditionalAllOrders"
	MethodPapiGetCmConditionalOpenOrder                               = "papiGetCmConditionalOpenOrder"
	MethodPapiGetCmConditionalOpenOrders                              = "papiGetCmConditionalOpenOrders"
	MethodPapiGetCmConditionalOrderHistory                            = "papiGetCmConditionalOrderHistory"
	MethodPapiGetCmConditionalAllOrders                               = "papiGetCmConditionalAllOrders"
	MethodPapiGetMarginOrder                                          = "papiGetMarginOrder"
	MethodPapiGetMarginOpenOrders                                     = "papiGetMarginOpenOrders"
	MethodPapiGetMarginAllOrders                                      = "papiGetMarginAllOrders"
	MethodPapiGetMarginOrderList                                      = "papiGetMarginOrderList"
	MethodPapiGetMarginAllOrderList                                   = "papiGetMarginAllOrderList"
	MethodPapiGetMarginOpenOrderList                                  = "papiGetMarginOpenOrderList"
	MethodPapiGetMarginMyTrades                                       = "papiGetMarginMyTrades"
	MethodPapiGetBalance                                              = "papiGetBalance"
	MethodPapiGetAccount                                              = "papiGetAccount"
	MethodPapiGetMarginMaxBorrowable                                  = "papiGetMarginMaxBorrowable"
	MethodPapiGetMarginMaxWithdraw                                    = "papiGetMarginMaxWithdraw"
	MethodPapiGetUmPositionRisk                                       = "papiGetUmPositionRisk"
	MethodPapiGetCmPositionRisk                                       = "papiGetCmPositionRisk"
	MethodPapiGetUmPositionSideDual                                   = "papiGetUmPositionSideDual"
	MethodPapiGetCmPositionSideDual                                   = "papiGetCmPositionSideDual"
	MethodPapiGetUmUserTrades                                         = "papiGetUmUserTrades"
	MethodPapiGetCmUserTrades                                         = "papiGetCmUserTrades"
	MethodPapiGetUmLeverageBracket                                    = "papiGetUmLeverageBracket"
	MethodPapiGetCmLeverageBracket                                    = "papiGetCmLeverageBracket"
	MethodPapiGetMarginForceOrders                                    = "papiGetMarginForceOrders"
	MethodPapiGetUmForceOrders                                        = "papiGetUmForceOrders"
	MethodPapiGetCmForceOrders                                        = "papiGetCmForceOrders"
	MethodPapiGetUmApiTradingStatus                                   = "papiGetUmApiTradingStatus"
	MethodPapiGetUmCommissionRate                                     = "papiGetUmCommissionRate"
	MethodPapiGetCmCommissionRate                                     = "papiGetCmCommissionRate"
	MethodPapiGetMarginMarginLoan                                     = "papiGetMarginMarginLoan"
	MethodPapiGetMarginRepayLoan                                      = "papiGetMarginRepayLoan"
	MethodPapiGetMarginMarginInterestHistory                          = "papiGetMarginMarginInterestHistory"
	MethodPapiGetPortfolioInterestHistory                             = "papiGetPortfolioInterestHistory"
	MethodPapiGetUmIncome                                             = "papiGetUmIncome"
	MethodPapiGetCmIncome                                             = "papiGetCmIncome"
	MethodPapiGetUmAccount                                            = "papiGetUmAccount"
	MethodPapiGetCmAccount                                            = "papiGetCmAccount"
	MethodPapiGetRepayFuturesSwitch                                   = "papiGetRepayFuturesSwitch"
	MethodPapiGetUmAdlQuantile                                        = "papiGetUmAdlQuantile"
	MethodPapiGetCmAdlQuantile                                        = "papiGetCmAdlQuantile"
	MethodPapiPostUmOrder                                             = "papiPostUmOrder"
	MethodPapiPostUmConditionalOrder                                  = "papiPostUmConditionalOrder"
	MethodPapiPostCmOrder                                             = "papiPostCmOrder"
	MethodPapiPostCmConditionalOrder                                  = "papiPostCmConditionalOrder"
	MethodPapiPostMarginOrder                                         = "papiPostMarginOrder"
	MethodPapiPostMarginLoan                                          = "papiPostMarginLoan"
	MethodPapiPostRepayLoan                                           = "papiPostRepayLoan"
	MethodPapiPostMarginOrderOco                                      = "papiPostMarginOrderOco"
	MethodPapiPostUmLeverage                                          = "papiPostUmLeverage"
	MethodPapiPostCmLeverage                                          = "papiPostCmLeverage"
	MethodPapiPostUmPositionSideDual                                  = "papiPostUmPositionSideDual"
	MethodPapiPostCmPositionSideDual                                  = "papiPostCmPositionSideDual"
	MethodPapiPostAutoCollection                                      = "papiPostAutoCollection"
	MethodPapiPostBnbTransfer                                         = "papiPostBnbTransfer"
	MethodPapiPostRepayFuturesSwitch                                  = "papiPostRepayFuturesSwitch"
	MethodPapiPostRepayFuturesNegativeBalance                         = "papiPostRepayFuturesNegativeBalance"
	MethodPapiPostListenKey                                           = "papiPostListenKey"
	MethodPapiPostAssetCollection                                     = "papiPostAssetCollection"
	MethodPapiPutListenKey                                            = "papiPutListenKey"
	MethodPapiDeleteUmOrder                                           = "papiDeleteUmOrder"
	MethodPapiDeleteUmConditionalOrder                                = "papiDeleteUmConditionalOrder"
	MethodPapiDeleteUmAllOpenOrders                                   = "papiDeleteUmAllOpenOrders"
	MethodPapiDeleteUmConditionalAllOpenOrders                        = "papiDeleteUmConditionalAllOpenOrders"
	MethodPapiDeleteCmOrder                                           = "papiDeleteCmOrder"
	MethodPapiDeleteCmConditionalOrder                                = "papiDeleteCmConditionalOrder"
	MethodPapiDeleteCmAllOpenOrders                                   = "papiDeleteCmAllOpenOrders"
	MethodPapiDeleteCmConditionalAllOpenOrders                        = "papiDeleteCmConditionalAllOpenOrders"
	MethodPapiDeleteMarginOrder                                       = "papiDeleteMarginOrder"
	MethodPapiDeleteMarginAllOpenOrders                               = "papiDeleteMarginAllOpenOrders"
	MethodPapiDeleteMarginOrderList                                   = "papiDeleteMarginOrderList"
	MethodPapiDeleteListenKey                                         = "papiDeleteListenKey"
)

Variables

This section is empty.

Functions

func NewExchange

func NewExchange(Options map[string]interface{}) (banexg.BanExchange, *errs.Error)

Types

type AccountTotal

type AccountTotal struct {
	BaseAccountTotal
	MultiAssetsMargin           bool   `json:"multiAssetsMargin"`
	TradeGroupId                int64  `json:"tradeGroupId"`
	TotalInitialMargin          string `json:"totalInitialMargin"`          // 当前所需起始保证金总额(存在逐仓请忽略), 仅计算usdt资产
	TotalMaintMargin            string `json:"totalMaintMargin"`            // 维持保证金总额, 仅计算usdt资产
	TotalWalletBalance          string `json:"totalWalletBalance"`          // 账户总余额, 仅计算usdt资产
	TotalUnrealizedProfit       string `json:"totalUnrealizedProfit"`       // 持仓未实现盈亏总额, 仅计算usdt资产
	TotalMarginBalance          string `json:"totalMarginBalance"`          // 保证金总余额, 仅计算usdt资产
	TotalPositionInitialMargin  string `json:"totalPositionInitialMargin"`  // 持仓所需起始保证金(基于最新标记价格), 仅计算usdt资产
	TotalOpenOrderInitialMargin string `json:"totalOpenOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格), 仅计算usdt资产
	TotalCrossWalletBalance     string `json:"totalCrossWalletBalance"`     // 全仓账户余额, 仅计算usdt资产
	TotalCrossUnPnl             string `json:"totalCrossUnPnl"`             // 全仓持仓未实现盈亏总额, 仅计算usdt资产
	AvailableBalance            string `json:"availableBalance"`            // 可用余额, 仅计算usdt资产
	MaxWithdrawAmount           string `json:"maxWithdrawAmount"`           // 最大可转出余额, 仅计算usdt资产
}

type AlgoOrder added in v0.2.39

type AlgoOrder struct {
	AlgoId                  int64  `json:"algoId"`
	ClientAlgoId            string `json:"clientAlgoId"`
	AlgoType                string `json:"algoType"`
	OrderType               string `json:"orderType"`
	Symbol                  string `json:"symbol"`
	Side                    string `json:"side"`
	PositionSide            string `json:"positionSide"`
	TimeInForce             string `json:"timeInForce"`
	Quantity                string `json:"quantity"`
	AlgoStatus              string `json:"algoStatus"`
	TriggerPrice            string `json:"triggerPrice"`
	Price                   string `json:"price"`
	SelfTradePreventionMode string `json:"selfTradePreventionMode"`
	WorkingType             string `json:"workingType"`
	PriceMatch              string `json:"priceMatch"`
	ClosePosition           bool   `json:"closePosition"`
	PriceProtect            bool   `json:"priceProtect"`
	ReduceOnly              bool   `json:"reduceOnly"`
	ActivatePrice           string `json:"activatePrice"`
	CallbackRate            string `json:"callbackRate"`
	CreateTime              int64  `json:"createTime"`
	UpdateTime              int64  `json:"updateTime"`
	TriggerTime             int64  `json:"triggerTime"`
	GoodTillDate            int64  `json:"goodTillDate"`
	ActualOrderId           string `json:"actualOrderId"`
	ActualPrice             string `json:"actualPrice"`
	TpTriggerPrice          string `json:"tpTriggerPrice"`
	TpPrice                 string `json:"tpPrice"`
	SlTriggerPrice          string `json:"slTriggerPrice"`
	SlPrice                 string `json:"slPrice"`
	TpOrderType             string `json:"tpOrderType"`
	IcebergQuantity         string `json:"icebergQuantity"`
}

AlgoOrder U本位条件订单

func (*AlgoOrder) ToStdOrder added in v0.2.39

func (o *AlgoOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type AuthRes

type AuthRes struct {
	ListenKey string `json:"listenKey"`
}

type BaseAccountTotal

type BaseAccountTotal struct {
	FeeTier     int64 `json:"feeTier"`     // 手续费等级
	CanTrade    bool  `json:"canTrade"`    // 是否可以交易
	CanDeposit  bool  `json:"canDeposit"`  // 是否可以入金
	CanWithdraw bool  `json:"canWithdraw"` // 是否可以出金
	UpdateTime  int64 `json:"updateTime"`  // 保留字段,请忽略
}

type BaseContPosition

type BaseContPosition struct {
	Symbol           string `json:"symbol"`           // 交易对
	PositionSide     string `json:"positionSide"`     // 持仓方向
	PositionAmt      string `json:"positionAmt"`      // 持仓数量
	Leverage         string `json:"leverage"`         // 杠杆倍率
	EntryPrice       string `json:"entryPrice"`       // 持仓成本价
	UnRealizedProfit string `json:"unRealizedProfit"` // 持仓未实现盈亏
	UpdateTime       int64  `json:"updateTime"`       // 更新时间
}

func (*BaseContPosition) ToStdPos

func (p *BaseContPosition) ToStdPos() *banexg.Position

type BaseLvgBracket

type BaseLvgBracket = banexg.BaseLvgBracket

type BaseOrderBook

type BaseOrderBook struct {
	Bids [][]string `json:"bids"`
	Asks [][]string `json:"asks"`
}

func (BaseOrderBook) ToStdOrderBook

func (o BaseOrderBook) ToStdOrderBook(market *banexg.Market) *banexg.OrderBook

type Binance

type Binance struct {
	*banexg.Exchange
	RecvWindow int // 允许的和服务器最大毫秒时间差

	LeverageBrackets map[string]*SymbolLvgBrackets // symbol: Leverage Brackets
	// contains filtered or unexported fields
}

func New

func New(Options map[string]interface{}) (*Binance, *errs.Error)

func (*Binance) CalcMaintMargin added in v0.1.2

func (e *Binance) CalcMaintMargin(symbol string, cost float64) (float64, *errs.Error)

func (*Binance) CancelOrder

func (e *Binance) CancelOrder(id string, symbol string, params map[string]interface{}) (*banexg.Order, *errs.Error)

CancelOrder cancels an open order

:see: https://binance-docs.github.io/apidocs/spot/en/#cancel-order-trade
:see: https://binance-docs.github.io/apidocs/futures/en/#cancel-order-trade
:see: https://binance-docs.github.io/apidocs/delivery/en/#cancel-order-trade
:see: https://binance-docs.github.io/apidocs/voptions/en/#cancel-option-order-trade
:see: https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade
:param str id: order id
:param str symbol: unified symbol of the market the order was made in
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`

func (*Binance) Close added in v0.2.0

func (e *Binance) Close() *errs.Error

func (*Binance) CreateOrder

func (e *Binance) CreateOrder(symbol, odType, side string, amount float64, price float64, params map[string]interface{}) (*banexg.Order, *errs.Error)

CreateOrder 提交订单到交易所

:see: https://binance-docs.github.io/apidocs/spot/en/#new-order-trade

:see: https://binance-docs.github.io/apidocs/spot/en/#test-new-order-trade
:see: https://binance-docs.github.io/apidocs/futures/en/#new-order-trade
:see: https://binance-docs.github.io/apidocs/delivery/en/#new-order-trade
:see: https://binance-docs.github.io/apidocs/voptions/en/#new-order-trade
:see: https://binance-docs.github.io/apidocs/spot/en/#new-order-using-sor-trade
:see: https://binance-docs.github.io/apidocs/spot/en/#test-new-order-using-sor-trade
:param str symbol: unified symbol of the market to create an order in
:param str type: 'MARKET' or 'LIMIT' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
:param str side: 'buy' or 'sell'
:param float amount: how much of currency you want to trade in units of base currency
:param float [price]: the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
:param dict [params]: extra parameters specific to the exchange API endpoint
:param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading
:param boolean [params.sor]: *spot only* whether to use SOR(Smart Order Routing) or not, default is False
:param boolean [params.test]: *spot only* whether to use the test endpoint or not, default is False
:returns dict: an `order structure <https://docs.ccxt.com/#/?id=order-structure>`

func (*Binance) EditOrder added in v0.2.1

func (e *Binance) EditOrder(symbol, orderId, side string, amount, price float64, params map[string]interface{}) (*banexg.Order, *errs.Error)

func (*Binance) FetchAccountAccess added in v0.2.47

func (e *Binance) FetchAccountAccess(params map[string]interface{}) (*banexg.AccountAccess, *errs.Error)

func (*Binance) FetchAccountPositions

func (e *Binance) FetchAccountPositions(symbols []string, params map[string]interface{}) ([]*banexg.Position, *errs.Error)

FetchAccountPositions

:see: https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data
:see: https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data
:param str[]|None symbols: list of unified market symbols
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: data on account positions

func (*Binance) FetchBalance

func (e *Binance) FetchBalance(params map[string]interface{}) (*banexg.Balances, *errs.Error)

query for balance and get the amount of funds available for trading or funds locked in orders :see: https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data # spot :see: https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data # cross margin :see: https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-account-info-user_data # isolated margin :see: https://binance-docs.github.io/apidocs/spot/en/#lending-account-user_data # lending :see: https://binance-docs.github.io/apidocs/spot/en/#funding-wallet-user_data # funding :see: https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data # swap :see: https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data # future :see: https://binance-docs.github.io/apidocs/voptions/en/#option-account-information-trade # option :param dict [params]: extra parameters specific to the exchange API endpoint :param str [params.market]: 'spot', 'future', 'swap', 'funding', or 'spot' :param str [params.marginMode]: 'cross' or 'isolated', for margin trading, uses self.options.defaultMarginMode if not passed, defaults to None/None/None :param str[]|None [params.symbols]: unified market symbols, only used in isolated margin mode :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`

func (*Binance) FetchFundingRate added in v0.2.7

func (e *Binance) FetchFundingRate(symbol string, params map[string]interface{}) (*banexg.FundingRateCur, *errs.Error)

func (*Binance) FetchFundingRateHistory added in v0.2.6

func (e *Binance) FetchFundingRateHistory(symbol string, since int64, limit int, params map[string]interface{}) ([]*banexg.FundingRate, *errs.Error)

func (*Binance) FetchFundingRates added in v0.2.7

func (e *Binance) FetchFundingRates(symbols []string, params map[string]interface{}) ([]*banexg.FundingRateCur, *errs.Error)

func (*Binance) FetchIncomeHistory added in v0.2.1

func (e *Binance) FetchIncomeHistory(inType string, symbol string, since int64, limit int, params map[string]interface{}) ([]*banexg.Income, *errs.Error)

func (*Binance) FetchLastPrices added in v0.2.7

func (e *Binance) FetchLastPrices(symbols []string, params map[string]interface{}) ([]*banexg.LastPrice, *errs.Error)

func (*Binance) FetchOHLCV added in v0.1.2

func (e *Binance) FetchOHLCV(symbol, timeframe string, since int64, limit int, params map[string]interface{}) ([]*banexg.Kline, *errs.Error)

fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market :see: https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data :see: https://binance-docs.github.io/apidocs/voptions/en/#kline-candlestick-data :see: https://binance-docs.github.io/apidocs/futures/en/#index-price-kline-candlestick-data :see: https://binance-docs.github.io/apidocs/futures/en/#mark-price-kline-candlestick-data :see: https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data :see: https://binance-docs.github.io/apidocs/delivery/en/#index-price-kline-candlestick-data :see: https://binance-docs.github.io/apidocs/delivery/en/#mark-price-kline-candlestick-data :see: https://binance-docs.github.io/apidocs/delivery/en/#kline-candlestick-data :param str symbol: unified symbol of the market to fetch OHLCV data for :param str timeframe: the length of time each candle represents :param int [since]: timestamp in ms of the earliest candle to fetch :param int [limit]: the maximum amount of candles to fetch :param dict [params]: extra parameters specific to the exchange API endpoint :param str [params.price]: "mark" or "index" for mark price and index price candles :param int [params.until]: timestamp in ms of the latest candle to fetch :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params) :returns int[][]: A list of candles ordered, open, high, low, close, volume

func (*Binance) FetchOpenOrders

func (e *Binance) FetchOpenOrders(symbol string, since int64, limit int, params map[string]interface{}) ([]*banexg.Order, *errs.Error)

FetchOpenOrders

:see: https://binance-docs.github.io/apidocs/spot/en/#cancel-an-existing-order-and-send-a-new-order-trade :see: https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data :see: https://binance-docs.github.io/apidocs/delivery/en/#current-all-open-orders-user_data :see: https://binance-docs.github.io/apidocs/voptions/en/#query-current-open-option-orders-user_data fetch all unfilled currently open orders :see: https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data :see: https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data :see: https://binance-docs.github.io/apidocs/delivery/en/#current-all-open-orders-user_data :see: https://binance-docs.github.io/apidocs/voptions/en/#query-current-open-option-orders-user_data :see: https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data :param str symbol: unified market symbol :param int [since]: the earliest time in ms to fetch open orders for :param int [limit]: the maximum number of open orders structures to retrieve :param dict [params]: extra parameters specific to the exchange API endpoint :param str [params.marginMode]: 'cross' or 'isolated', for spot margin trading :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`

func (*Binance) FetchOrder added in v0.2.1

func (e *Binance) FetchOrder(symbol, orderId string, params map[string]interface{}) (*banexg.Order, *errs.Error)

func (*Binance) FetchOrderBook

func (e *Binance) FetchOrderBook(symbol string, limit int, params map[string]interface{}) (*banexg.OrderBook, *errs.Error)

func (*Binance) FetchOrders

func (e *Binance) FetchOrders(symbol string, since int64, limit int, params map[string]interface{}) ([]*banexg.Order, *errs.Error)

FetchOrders 获取自己的订单 symbol: 必填,币种

func (*Binance) FetchPositions

func (e *Binance) FetchPositions(symbols []string, params map[string]interface{}) ([]*banexg.Position, *errs.Error)

FetchPositions get 'positionRisk' or 'account' positions (by banexg.OptPositionMethod)

func (*Binance) FetchPositionsRisk

func (e *Binance) FetchPositionsRisk(symbols []string, params map[string]interface{}) ([]*banexg.Position, *errs.Error)

func (*Binance) FetchTicker

func (e *Binance) FetchTicker(symbol string, params map[string]interface{}) (*banexg.Ticker, *errs.Error)

func (*Binance) FetchTickerPrice added in v0.2.0

func (e *Binance) FetchTickerPrice(symbol string, params map[string]interface{}) (map[string]float64, *errs.Error)

FetchTickerPrice symbol为空表示获取所有,不为空获取单个

func (*Binance) FetchTickers

func (e *Binance) FetchTickers(symbols []string, params map[string]interface{}) ([]*banexg.Ticker, *errs.Error)

FetchTickers fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market

:see: https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics         # spot
:see: https://binance-docs.github.io/apidocs/futures/en/#24hr-ticker-price-change-statistics      # swap
:see: https://binance-docs.github.io/apidocs/delivery/en/#24hr-ticker-price-change-statistics     # future
:see: https://binance-docs.github.io/apidocs/voptions/en/#24hr-ticker-price-change-statistics     # option
:param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`

func (*Binance) GetLeverage added in v0.2.0

func (e *Binance) GetLeverage(symbol string, notional float64, account string) (float64, float64)

func (*Binance) GetMaintMarginPct

func (e *Binance) GetMaintMarginPct(symbol string, notional float64) float64

GetMaintMarginPct 获取指定名义价值的维持保证金比率

func (*Binance) GetWsClient

func (e *Binance) GetWsClient(marType, msgHash string) (*banexg.WsClient, *errs.Error)

GetWsClient get WsClient for public data

func (*Binance) Init

func (e *Binance) Init() *errs.Error

func (*Binance) InitLeverageBrackets added in v0.2.31

func (e *Binance) InitLeverageBrackets() *errs.Error

func (*Binance) LoadLeverageBrackets

func (e *Binance) LoadLeverageBrackets(reload bool, params map[string]interface{}) *errs.Error

func (*Binance) ReSubsAll added in v0.2.27

func (e *Binance) ReSubsAll(client *banexg.WsClient, connID int) *errs.Error

ReSubsAll 对某个连接全部重新订阅

func (*Binance) SetLeverage

func (e *Binance) SetLeverage(leverage float64, symbol string, params map[string]interface{}) (map[string]interface{}, *errs.Error)

SetLeverage set the level of leverage for a market

:see: https://binance-docs.github.io/apidocs/futures/en/#change-initial-leverage-trade
:see: https://binance-docs.github.io/apidocs/delivery/en/#change-initial-leverage-trade
:param float leverage: the rate of leverage
:param str symbol: unified market symbol
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: response from the exchange

func (*Binance) Stream

func (e *Binance) Stream(marType, subHash string) string

func (*Binance) UnWatchMarkPrices

func (e *Binance) UnWatchMarkPrices(symbols []string, params map[string]interface{}) *errs.Error

func (*Binance) UnWatchOHLCVs added in v0.1.2

func (e *Binance) UnWatchOHLCVs(jobs [][2]string, params map[string]interface{}) *errs.Error

func (*Binance) UnWatchOrderBooks

func (e *Binance) UnWatchOrderBooks(symbols []string, params map[string]interface{}) *errs.Error

func (*Binance) UnWatchTrades added in v0.1.3

func (e *Binance) UnWatchTrades(symbols []string, params map[string]interface{}) *errs.Error

func (*Binance) WatchAccountConfig added in v0.2.0

func (e *Binance) WatchAccountConfig(params map[string]interface{}) (chan *banexg.AccountConfig, *errs.Error)

func (*Binance) WatchBalance

func (e *Binance) WatchBalance(params map[string]interface{}) (chan *banexg.Balances, *errs.Error)

func (*Binance) WatchMarkPrices

func (e *Binance) WatchMarkPrices(symbols []string, params map[string]interface{}) (chan map[string]float64, *errs.Error)

func (*Binance) WatchMyTrades

func (e *Binance) WatchMyTrades(params map[string]interface{}) (chan *banexg.MyTrade, *errs.Error)

WatchMyTrades

watches information on multiple trades made by the user

:param str symbol: unified market symbol of the market orders were made in :param int [since]: the earliest time in ms to fetch orders for :param int [limit]: the maximum number of orde structures to retrieve :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict[]: a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure

func (*Binance) WatchOHLCVs added in v0.1.2

func (e *Binance) WatchOHLCVs(jobs [][2]string, params map[string]interface{}) (chan *banexg.PairTFKline, *errs.Error)

WatchOHLCVs watches historical candlestick data containing the open, high, low, and close price, and the volume of a market :param map[string]string jobs: array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example {{'BTC/USDT': '1m'}, {'LTC/USDT': '5m'}} :param dict [params]: extra parameters specific to the exchange API endpoint :returns int[][]: A list of candles ordered, open, high, low, close, volume

func (*Binance) WatchOrderBooks

func (e *Binance) WatchOrderBooks(symbols []string, limit int, params map[string]interface{}) (chan *banexg.OrderBook, *errs.Error)

WatchOrderBooks watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data When depth limit <= 20, and not spot market, subscribe to limited depth instead of incremental depth 当深度<=20时,且非现货时,订阅有限档深度而非增量深度(币安现货有限档推送缺少event和symbol)

:param str symbol: unified symbol of the market to fetch the order book for
:param int [limit]: the maximum amount of order book entries to return
:param dict [params]: extra parameters specific to the exchange API endpoint
:returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols

func (*Binance) WatchPositions

func (e *Binance) WatchPositions(params map[string]interface{}) (chan []*banexg.Position, *errs.Error)

func (*Binance) WatchTrades added in v0.1.3

func (e *Binance) WatchTrades(symbols []string, params map[string]interface{}) (chan *banexg.Trade, *errs.Error)

func (*Binance) WriteWSMsg added in v0.2.1

func (e *Binance) WriteWSMsg(client *banexg.WsClient, connID int, isSub bool, symbols []string, cvt func(m *banexg.Market, i int) string, getJobInfo banexg.FuncGetWsJob) *errs.Error

WriteWSMsg 向交易所写入ws消息。 isSub true订阅、false取消订阅 symbols 标准标的ID、或订阅字符串 cvt 不为空时,尝试对symbols进行标准化 getJobInfo 添加对返回结果的回调。会更新ID、symbols

type BnbCurrency

type BnbCurrency struct {
	Coin              string        `json:"coin"`
	DepositAllEnable  bool          `json:"depositAllEnable"`
	Free              string        `json:"free"`
	Freeze            string        `json:"freeze"`
	Ipoable           string        `json:"ipoable"`
	Ipoing            string        `json:"ipoing"`
	IsLegalMoney      bool          `json:"isLegalMoney"`
	Locked            string        `json:"locked"`
	Name              string        `json:"name"`
	Storage           string        `json:"storage"`
	Trading           bool          `json:"trading"`
	WithdrawAllEnable bool          `json:"withdrawAllEnable"`
	Withdrawing       string        `json:"withdrawing"`
	NetworkList       []*BnbNetwork `json:"networkList"`
}

***************************** CurrencyMap ***********************************

type BnbFilter

type BnbFilter = map[string]interface{}

type BnbMarket

type BnbMarket struct {
	Symbol                          string      `json:"symbol"`
	Status                          string      `json:"status"`
	BaseAsset                       string      `json:"baseAsset"`
	BaseAssetPrecision              int         `json:"baseAssetPrecision"`
	QuoteAsset                      string      `json:"quoteAsset"`
	QuotePrecision                  int         `json:"quotePrecision"`
	QuoteAssetPrecision             int         `json:"quoteAssetPrecision"`
	BaseCommissionPrecision         int         `json:"baseCommissionPrecision"`
	QuoteCommissionPrecision        int         `json:"quoteCommissionPrecision"`
	OrderTypes                      []string    `json:"orderTypes"`
	IcebergAllowed                  bool        `json:"icebergAllowed"`
	OcoAllowed                      bool        `json:"ocoAllowed"`
	QuoteOrderQtyMarketAllowed      bool        `json:"quoteOrderQtyMarketAllowed"`
	AllowTrailingStop               bool        `json:"allowTrailingStop"`
	CancelReplaceAllowed            bool        `json:"cancelReplaceAllowed"`
	IsSpotTradingAllowed            bool        `json:"isSpotTradingAllowed"`
	IsMarginTradingAllowed          bool        `json:"isMarginTradingAllowed"`
	Filters                         []BnbFilter `json:"filters"`
	Permissions                     []string    `json:"permissions"`
	DefaultSelfTradePreventionMode  string      `json:"defaultSelfTradePreventionMode"`
	AllowedSelfTradePreventionModes []string    `json:"allowedSelfTradePreventionModes"`

	// 合约
	ContractType      string `json:"contractType"`
	DeliveryDate      int64  `json:"deliveryDate"`      //期货交割时间
	MarginAsset       string `json:"marginAsset"`       // 保证金资产
	QuantityPrecision int    `json:"quantityPrecision"` // U合约数量小数点位数
	PricePrecision    int    `json:"pricePrecision"`    // U合约价格小数点位数
	OnboardDate       int64  `json:"onboardDate"`       // 合约上线时间,币u合约都有

	ContractSize   int    `json:"contractSize"`   // 币合约数量
	ContractStatus string `json:"contractStatus"` // 币合约状态

	// 期权
	ExpiryDate    int64  `json:"expiryDate"`    // 期权到期时间
	Underlying    string `json:"underlying"`    // 期权合约底层资产
	StrikePrice   string `json:"strikePrice"`   // 期权行权价
	Unit          int    `json:"unit"`          // 期权合约单位,单一合约代表的底层资产数量
	Side          string `json:"side"`          // 期权方向
	QuantityScale int    `json:"quantityScale"` // 期权数量精读
	PriceScale    int    `json:"priceScale"`    // 期权价格精度
	MinQty        string `json:"minQty"`        // 期权最小下单数量
	MaxQty        string `json:"maxQty"`        // 期权最大下单数量
}

func (*BnbMarket) GetMarketLimits

func (mar *BnbMarket) GetMarketLimits(p *banexg.Precision) *banexg.MarketLimits

func (*BnbMarket) GetPrecision

func (mar *BnbMarket) GetPrecision() *banexg.Precision

type BnbMarketRsp

type BnbMarketRsp struct {
	Timezone        string       `json:"timezone"`
	ServerTime      int64        `json:"serverTime"`
	RateLimits      []*RateLimit `json:"rateLimits"`
	ExchangeFilters []BnbFilter  `json:"exchangeFilters"`
	Symbols         []*BnbMarket `json:"symbols"`
}

type BnbNetwork

type BnbNetwork struct {
	AddressRegex            string `json:"addressRegex"`
	Coin                    string `json:"coin"`
	DepositDesc             string `json:"depositDesc"`
	DepositEnable           bool   `json:"depositEnable"`
	IsDefault               bool   `json:"isDefault"`
	MemoRegex               string `json:"memoRegex"`
	MinConfirm              int    `json:"minConfirm"`
	Name                    string `json:"name"`
	Network                 string `json:"network"`
	ResetAddressStatus      bool   `json:"resetAddressStatus"`
	SpecialTips             string `json:"specialTips"`
	UnLockConfirm           int    `json:"unLockConfirm"`
	WithdrawDesc            string `json:"withdrawDesc"`
	WithdrawEnable          bool   `json:"withdrawEnable"`
	WithdrawFee             string `json:"withdrawFee"`
	WithdrawIntegerMultiple string `json:"withdrawIntegerMultiple"`
	WithdrawMax             string `json:"withdrawMax"`
	WithdrawMin             string `json:"withdrawMin"`
	SameAddress             bool   `json:"sameAddress"`
	EstimatedArrivalTime    int    `json:"estimatedArrivalTime"`
	Busy                    bool   `json:"busy"`
}

type BnbOptionKline

type BnbOptionKline struct {
	Open        string `json:"open"`        // 开盘价
	High        string `json:"high"`        // 最高价
	Low         string `json:"low"`         // 最低价
	Close       string `json:"close"`       // 收盘价(当前K线未结束的即为最新价)
	Volume      string `json:"volume"`      // 成交额
	Amount      string `json:"amount"`      // 成交量
	Interval    string `json:"interval"`    // 时间区间
	TradeCount  int    `json:"tradeCount"`  // 成交笔数
	TakerVolume string `json:"takerVolume"` // 主动买入成交额
	TakerAmount string `json:"takerAmount"` // 主动买入成交量
	OpenTime    int64  `json:"openTime"`    // 开盘时间
	CloseTime   int64  `json:"closeTime"`   // 收盘时间
}

type BookTicker

type BookTicker struct {
	AskPrice string `json:"askPrice"` // 卖价
	AskQty   string `json:"askQty"`   // 卖单数量
	BidPrice string `json:"bidPrice"` // 买价
	BidQty   string `json:"bidQty"`   // 买单数量
}

func (*BookTicker) SetStdTicker

func (t *BookTicker) SetStdTicker(ticker *banexg.Ticker)

type ContPositionRisk

type ContPositionRisk struct {
	BaseContPosition
	BreakEvenPrice   string `json:"breakEvenPrice"` // 盈亏平衡价
	MarginType       string `json:"marginType"`     // 逐仓模式或全仓模式
	IsAutoAddMargin  string `json:"isAutoAddMargin"`
	IsolatedMargin   string `json:"isolatedMargin"`   // 逐仓保证金
	LiquidationPrice string `json:"liquidationPrice"` // 参考强平价格
	MarkPrice        string `json:"markPrice"`        // 当前标记价格
}

合约持仓风险

func (*ContPositionRisk) ToStdPos

func (p *ContPositionRisk) ToStdPos() *banexg.Position

type ContractAsset

type ContractAsset struct {
	Asset         string `json:"a"`
	WalletBalance string `json:"wb"`
	CrossWallet   string `json:"cw"`
	BalanceChange string `json:"bc"`
}

type DeleteAlgoOrderRsp added in v0.2.39

type DeleteAlgoOrderRsp struct {
	AlgoId       int64  `json:"algoId"`
	ClientAlgoId string `json:"clientAlgoId"`
	Code         string `json:"code"`
	Msg          string `json:"msg"`
}

type ErrRsp

type ErrRsp struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type FundingAsset

type FundingAsset struct {
	Asset        string `json:"asset"`
	Free         string `json:"free"`         // 可用余额
	Locked       string `json:"locked"`       // 锁定资金
	Freeze       string `json:"freeze"`       // 冻结资金
	Withdrawing  string `json:"withdrawing"`  // 提币
	BtcValuation string `json:"btcValuation"` // btc估值
}

FundingAsset 资金账户余额

type FundingRate added in v0.2.6

type FundingRate struct {
	Symbol      string `json:"symbol"`
	FundingTime int64  `json:"fundingTime"`
	FundingRate string `json:"fundingRate"`
	MarkPrice   string `json:"markPrice"`
}

type FundingRateCur added in v0.2.7

type FundingRateCur struct {
	Symbol               string `json:"symbol"`
	MarkPrice            string `json:"markPrice"`
	IndexPrice           string `json:"indexPrice"`
	EstimatedSettlePrice string `json:"estimatedSettlePrice"`
	LastFundingRate      string `json:"lastFundingRate"`
	NextFundingTime      int64  `json:"nextFundingTime"`
	InterestRate         string `json:"interestRate"`
	Time                 int64  `json:"time"`
}

func (*FundingRateCur) ToStd added in v0.2.7

func (f *FundingRateCur) ToStd(e *Binance, marketType string, info map[string]interface{}) *banexg.FundingRateCur

type FutBase

type FutBase struct {
	OrderBase
	ReduceOnly bool   `json:"reduceOnly"` // 是否仅减仓
	AvgPrice   string `json:"avgPrice"`   // 平均成交价
}

type FutureAsset

type FutureAsset struct {
	Asset                  string `json:"asset"`                  // 资产名
	WalletBalance          string `json:"walletBalance"`          // 账户余额
	UnrealizedProfit       string `json:"unrealizedProfit"`       // 全部持仓未实现盈亏
	MarginBalance          string `json:"marginBalance"`          // 保证金余额
	MaintMargin            string `json:"maintMargin"`            // 维持保证金
	InitialMargin          string `json:"initialMargin"`          // 当前所需起始保证金(按最新标标记价格)
	PositionInitialMargin  string `json:"positionInitialMargin"`  // 当前所需持仓起始保证金(按最新标标记价格)
	OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前所需挂单起始保证金(按最新标标记价格)
	MaxWithdrawAmount      string `json:"maxWithdrawAmount"`      // 最大可提款金额
	CrossWalletBalance     string `json:"crossWalletBalance"`     // 可用于全仓的账户余额
	CrossUnPnl             string `json:"crossUnPnl"`             // 所有全仓持仓的未实现盈亏
	AvailableBalance       string `json:"availableBalance"`       // 可用下单余额
	UpdateTime             int64  `json:"updateTime"`             // 更新时间
}

资产内容

func (*FutureAsset) ToStdAsset

func (a *FutureAsset) ToStdAsset(getCurrCode func(string) string) *banexg.Asset

type FutureBase

type FutureBase struct {
	FutBase
	Time          int64  `json:"time"`          // 订单时间
	OrigType      string `json:"origType"`      // 触发前订单类型
	ActivatePrice string `json:"activatePrice"` // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段
	WorkingType   string `json:"workingType"`   // 条件价格触发类型
	ClosePosition bool   `json:"closePosition"` // 是否条件全平仓
	PositionSide  string `json:"positionSide"`  // 持仓方向
	OrigQty       string `json:"origQty"`       // 原始委托数量
	StopPrice     string `json:"stopPrice"`     // 触发价,对`TRAILING_STOP_MARKET`无效
	PriceRate     string `json:"priceRate"`     // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段
	PriceProtect  bool   `json:"priceProtect"`  // 是否开启条件单触发保护
	CumQty        string `json:"cumQty"`
}

func (*FutureBase) ToStdOrder

func (o *FutureBase) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type FutureOrder

type FutureOrder struct {
	FutureBase
	GoodTillDate            int64  `json:"goodTillDate"`            //订单TIF为GTD时的自动取消时间
	SelfTradePreventionMode string `json:"selfTradePreventionMode"` //订单自成交保护模式
	CumQuote                string `json:"cumQuote"`                // 成交金额
	PriceMatch              string `json:"priceMatch"`              //盘口价格下单模式
}

FutureOrder U本位合约订单

func (*FutureOrder) ToStdOrder

func (o *FutureOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type FuturePosition

type FuturePosition struct {
	BaseContPosition
	InitialMargin          string `json:"initialMargin"`          // 当前所需起始保证金(基于最新标记价格)
	MaintMargin            string `json:"maintMargin"`            // 维持保证金
	PositionInitialMargin  string `json:"positionInitialMargin"`  // 持仓所需起始保证金(基于最新标记价格)
	OpenOrderInitialMargin string `json:"openOrderInitialMargin"` // 当前挂单所需起始保证金(基于最新标记价格)
	Isolated               bool   `json:"isolated"`               // 是否是逐仓模式
	IsolatedWallet         string `json:"isolatedWallet"`
}

type IAccPosition

type IAccPosition interface {
	GetFutPosition() *FuturePosition
	GetNotional() string
}

type IBnbOrder

type IBnbOrder interface {
	ToStdOrder(func(string) string, map[string]interface{}) *banexg.Order
}

type IBnbOrderBook

type IBnbOrderBook interface {
	ToStdOrderBook(m *banexg.Market) *banexg.OrderBook
}

type IBnbPosRisk

type IBnbPosRisk interface {
	ToStdPos(*Binance, map[string]interface{}) (*banexg.Position, *errs.Error)
}

type IBnbTicker

type IBnbTicker interface {
	ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker
}

type ISymbolLvgBracket

type ISymbolLvgBracket = banexg.ISymbolLvgBracket

type ITickerPrice added in v0.2.0

type ITickerPrice interface {
	ToStdPrice(e *Binance, marketType string) (string, float64)
}

type Income added in v0.2.1

type Income struct {
	Symbol     string `json:"symbol"`
	IncomeType string `json:"incomeType"`
	Income     string `json:"income"`
	Asset      string `json:"asset"`
	Info       string `json:"info"`
	Time       int64  `json:"time"`
	TranID     int64  `json:"tranId"`
	TradeID    string `json:"tradeId"`
}

type InverseAccPositions

type InverseAccPositions struct {
	BaseAccountTotal
	Assets    []*FutureAsset     `json:"assets"`
	Positions []*InversePosition `json:"positions"`
}

InverseAccPositions 币本位合约的AccountPositions

type InverseBalances

type InverseBalances struct {
	Assets      []*FutureAsset     `json:"assets"`
	Positions   []*InversePosition `json:"positions"`
	CanDeposit  bool               `json:"canDeposit"`
	CanTrade    bool               `json:"canTrade"`
	CanWithdraw bool               `json:"canWithdraw"`
	FeeTier     int                `json:"feeTier"`
	UpdateTime  int64              `json:"updateTime"`
}

InverseBalances Coin-Based Balances

type InverseBookTicker

type InverseBookTicker struct {
	LinearBookTicker
	Pair string `json:"pair"`
}

func (*InverseBookTicker) ToStdTicker added in v0.2.6

func (t *InverseBookTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type InverseLvgBracket

type InverseLvgBracket struct {
	BaseLvgBracket
	QtyCap    float64 `json:"qtyCap"`    //该层对应的数量上限
	QtylFloor float64 `json:"qtylFloor"` // 该层对应的数量下限
}

type InverseOrder

type InverseOrder struct {
	FutureBase
	Pair    string `json:"pair"`    // 标的交易对
	CumBase string `json:"cumBase"` // 成交金额(标的数量)
}

InverseOrder 币本位合约订单

func (*InverseOrder) ToStdOrder

func (o *InverseOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type InverseOrderBook

type InverseOrderBook struct {
	LinearOrderBook
	Symbol string `json:"symbol"`
	Pair   string `json:"pair"`
}

func (InverseOrderBook) ToStdOrderBook

func (o InverseOrderBook) ToStdOrderBook(market *banexg.Market) *banexg.OrderBook

type InversePairLvgBrackets

type InversePairLvgBrackets struct {
	Symbol       string               `json:"symbol"`
	NotionalCoef float64              `json:"notionalCoef"` //用户bracket相对默认bracket的倍数,仅在和交易对默认不一样时显示
	Brackets     []*InverseLvgBracket `json:"brackets"`
}

func (*InversePairLvgBrackets) GetSymbol

func (b *InversePairLvgBrackets) GetSymbol() string

func (*InversePairLvgBrackets) ToStdBracket

func (b *InversePairLvgBrackets) ToStdBracket() *SymbolLvgBrackets

type InversePosition

type InversePosition struct {
	FuturePosition
	BreakEvenPrice string `json:"breakEvenPrice"` // 盈亏平衡价
	MaxQty         string `json:"maxQty"`         // 当前杠杆下最大可开仓数(标的数量)
	NotionalValue  string `json:"notionalValue"`  // 当前名义价值
}

头寸

func (*InversePosition) GetFutPosition

func (p *InversePosition) GetFutPosition() *FuturePosition

func (*InversePosition) GetNotional

func (p *InversePosition) GetNotional() string

type InversePositionRisk

type InversePositionRisk struct {
	ContPositionRisk
	MaxQuantity   string `json:"maxQty"`        // 当前杠杆倍数允许的数量上限(标的数量)
	NotionalValue string `json:"notionalValue"` // 当前名义价值
}

币本位合约持仓风险

func (*InversePositionRisk) ToStdPos

func (p *InversePositionRisk) ToStdPos(e *Binance, info map[string]interface{}) (*banexg.Position, *errs.Error)

type InversePriceTicker

type InversePriceTicker struct {
	LinearPriceTicker
	PS string `json:"ps"` // 标的交易对
}

type InverseTicker24hr

type InverseTicker24hr struct {
	SpotTicker
	BaseVolume string `json:"baseVolume"` // 24小时成交额
	LastQty    string `json:"lastQty"`    // 最近一次成交额
	Pair       string `json:"pair"`
}

func (*InverseTicker24hr) ToStdTicker

func (t *InverseTicker24hr) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type InverseTickerPrice added in v0.2.0

type InverseTickerPrice struct {
	LinearTickerPrice
	PS string `json:"ps"` // 标的交易对
}

type IsolatedAsset

type IsolatedAsset struct {
	BaseAsset         *IsolatedCurrAsset `json:"baseAsset"`
	QuoteAsset        *IsolatedCurrAsset `json:"quoteAsset"`
	Symbol            string             `json:"symbol"`
	IsolatedCreated   bool               `json:"isolatedCreated"`
	Enabled           bool               `json:"enabled"`
	MarginLevel       string             `json:"marginLevel"`
	MarginLevelStatus string             `json:"marginLevelStatus"`
	MarginRatio       string             `json:"marginRatio"`
	IndexPrice        string             `json:"indexPrice"`
	LiquidatePrice    string             `json:"liquidatePrice"`
	LiquidateRate     string             `json:"liquidateRate"`
	TradeEnabled      bool               `json:"tradeEnabled"`
}

type IsolatedBalances

type IsolatedBalances struct {
	Assets              []IsolatedAsset `json:"assets"`
	TotalAssetOfBtc     string          `json:"totalAssetOfBtc"`
	TotalLiabilityOfBtc string          `json:"totalLiabilityOfBtc"`
	TotalNetAssetOfBtc  string          `json:"totalNetAssetOfBtc"`
}

IsolatedBalances Binance Margin Isolated Balance

type IsolatedCurrAsset

type IsolatedCurrAsset struct {
	SpotAsset
	BorrowEnabled bool   `json:"borrowEnabled"`
	NetAssetOfBtc string `json:"netAssetOfBtc"`
	RepayEnabled  bool   `json:"repayEnabled"`
	TotalAsset    string `json:"totalAsset"`
}

type LastPrice added in v0.2.7

type LastPrice struct {
	Symbol string `json:"symbol"`
	Price  string `json:"price"`
	Time   int64  `json:"time,omitempty"` // linear/inverse
	PS     string `json:"ps,omitempty"`   //inverse
}

type LinearAccPositions

type LinearAccPositions struct {
	AccountTotal
	Assets    []*LinearAsset           `json:"assets"`
	Positions []*LinearAccountPosition `json:"positions"`
}

LinearAccPositions U本位合约的AccountPositions

type LinearAccountPosition

type LinearAccountPosition struct {
	LinearPosition
	Notional       string `json:"notional"`
	IsolatedWallet string `json:"isolatedWallet"`
	BreakEvenPrice string `json:"breakEvenPrice"` // 盈亏平衡价
}

LinearAccountPosition Account Position for Linear Contract

func (*LinearAccountPosition) GetFutPosition

func (p *LinearAccountPosition) GetFutPosition() *FuturePosition

func (*LinearAccountPosition) GetNotional

func (p *LinearAccountPosition) GetNotional() string

type LinearAsset

type LinearAsset struct {
	FutureAsset
	MarginAvailable bool `json:"marginAvailable"` // 是否可用作联合保证金
}

type LinearBalances

type LinearBalances struct {
	AccountTotal
	Assets    []*LinearAsset    `json:"assets"`
	Positions []*LinearPosition `json:"positions"`
}

LinearBalances U本位合约账户余额

type LinearBookTicker

type LinearBookTicker struct {
	SpotBookTicker
	LastUpdateId int   `json:"lastUpdateId"`
	Time         int64 `json:"time"`
}

func (*LinearBookTicker) ToStdTicker added in v0.2.6

func (t *LinearBookTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type LinearLvgBracket

type LinearLvgBracket struct {
	BaseLvgBracket
	NotionalCap   float64 `json:"notionalCap"`   // 该层对应的名义价值上限
	NotionalFloor float64 `json:"notionalFloor"` // 该层对应的名义价值下限
}

合约的杠杆分层标准

type LinearOrderBook

type LinearOrderBook struct {
	BaseOrderBook
	Time     int64 `json:"T"`
	MsgTime  int64 `json:"E"`
	UpdateID int   `json:"lastUpdateId"`
}

func (LinearOrderBook) ToStdOrderBook

func (o LinearOrderBook) ToStdOrderBook(market *banexg.Market) *banexg.OrderBook

type LinearPosition

type LinearPosition struct {
	FuturePosition
	MaxNotional string `json:"maxNotional"` // 当前杠杆下用户可用的最大名义价值
	BidNotional string `json:"bidNotional"` // 买单净值,忽略
	AskNotional string `json:"askNotional"` // 卖单净值,忽略
}

type LinearPositionRisk

type LinearPositionRisk struct {
	ContPositionRisk
	Notional         string `json:"notional"`
	MaxNotionalValue string `json:"maxNotionalValue"` // 当前杠杆倍数允许的名义价值上限
	IsolatedWallet   string `json:"isolatedWallet"`
}

U本位合约持仓风险

func (*LinearPositionRisk) ToStdPos

func (p *LinearPositionRisk) ToStdPos(e *Binance, info map[string]interface{}) (*banexg.Position, *errs.Error)

type LinearPriceTicker

type LinearPriceTicker struct {
	SpotPriceTicker
	Time int64 `json:"time"`
}

type LinearSymbolLvgBrackets

type LinearSymbolLvgBrackets struct {
	Symbol       string              `json:"symbol"`
	NotionalCoef float64             `json:"notionalCoef"` //用户bracket相对默认bracket的倍数,仅在和交易对默认不一样时显示
	Brackets     []*LinearLvgBracket `json:"brackets"`
}

func (*LinearSymbolLvgBrackets) GetSymbol

func (b *LinearSymbolLvgBrackets) GetSymbol() string

func (*LinearSymbolLvgBrackets) ToStdBracket

func (b *LinearSymbolLvgBrackets) ToStdBracket() *SymbolLvgBrackets

type LinearTicker

type LinearTicker struct {
	SpotTicker
	LastQty string `json:"lastQty"` // 最近一次成交额
}

func (*LinearTicker) ToStdTicker

func (t *LinearTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type LinearTickerPrice added in v0.2.0

type LinearTickerPrice struct {
	SymbolPrice
	Time int64 `json:"time"` // 撮合引擎的时间戳,单位为毫秒
}

type LvgBracket added in v0.1.2

type LvgBracket = banexg.LvgBracket

LvgBracket 标准杠杆费率信息

type MarginCrossBalances

type MarginCrossBalances struct {
	BorrowEnabled              bool         `json:"borrowEnabled"`
	MarginLevel                string       `json:"marginLevel"`
	CollateralMarginLevel      string       `json:"CollateralMarginLevel"`
	TotalAssetOfBtc            string       `json:"totalAssetOfBtc"`
	TotalLiabilityOfBtc        string       `json:"totalLiabilityOfBtc"`
	TotalNetAssetOfBtc         string       `json:"totalNetAssetOfBtc"`
	TotalCollateralValueInUSDT string       `json:"TotalCollateralValueInUSDT"`
	TradeEnabled               bool         `json:"tradeEnabled"`
	TransferEnabled            bool         `json:"transferEnabled"`
	AccountType                string       `json:"accountType"`
	UserAssets                 []*SpotAsset `json:"userAssets"`
}

MarginCrossBalances

binance margin cross balance

type MarginOrder

type MarginOrder struct {
	SpotBase
	IsIsolated bool `json:"isIsolated"` // 是否是逐仓symbol交易
}

MarginOrder 保证金杠杆订单

func (*MarginOrder) ToStdOrder

func (o *MarginOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type OptionOrder

type OptionOrder struct {
	FutBase
	PostOnly      bool    `json:"postOnly"`      // 仅做maker
	PriceScale    int     `json:"priceScale"`    // 价格精度
	OptionSide    string  `json:"optionSide"`    // 期权类型
	QuoteAsset    string  `json:"quoteAsset"`    // 报价资产
	Quantity      float64 `json:"quantity"`      // 订单数量
	QuantityScale int     `json:"quantityScale"` // 数量精度
	Fee           float64 `json:"fee"`           // 手续费
	CreateTime    int64   `json:"createTime"`    // 订单创建时间
	Source        string  `json:"source"`        // 订单来源
	Mmp           bool    `json:"mmp"`           // 是否为MMP订单
}

OptionOrder 期权订单

func (*OptionOrder) ToStdOrder

func (o *OptionOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type OptionOrderBook

type OptionOrderBook struct {
	BaseOrderBook
	Time     int64 `json:"T"`
	UpdateID int   `json:"u"`
}

func (OptionOrderBook) ToStdOrderBook

func (o OptionOrderBook) ToStdOrderBook(market *banexg.Market) *banexg.OrderBook

type OptionTicker

type OptionTicker struct {
	Symbol             string  `json:"symbol"`
	PriceChange        float64 `json:"priceChange,string"`        // 24小时价格变动
	PriceChangePercent float64 `json:"priceChangePercent,string"` // 24小时价格变动百分比
	LastPrice          float64 `json:"lastPrice,string"`          // 最近一次成交价
	LastQty            float64 `json:"lastQty,string"`            // 最近一次成交额
	Open               float64 `json:"open,string"`               // 24小时内第一次成交的价格
	High               float64 `json:"high,string"`               // 24小时最高价
	Low                float64 `json:"low,string"`                // 24小时最低价
	Volume             float64 `json:"volume,string"`             // 成交额
	Amount             float64 `json:"amount,string"`             // 成交量
	BidPrice           float64 `json:"bidPrice,string"`           // 最优买价
	AskPrice           float64 `json:"askPrice,string"`           // 最优卖价
	OpenTime           int64   `json:"openTime"`                  // 24小时内,第一笔交易的发生时间
	CloseTime          int64   `json:"closeTime"`                 // 24小时内,最后一笔交易的发生时间
	FirstTradeID       int     `json:"firstTradeId"`              // 首笔成交ID
	TradeCount         int     `json:"tradeCount"`                // 成交笔数
	StrikePrice        float64 `json:"strikePrice,string"`        // 行权价
	ExercisePrice      float64 `json:"exercisePrice,string"`      // 行权前半小时返回预估结算价,其他时刻返回指数价格
}

func (*OptionTicker) ToStdPrice added in v0.2.0

func (t *OptionTicker) ToStdPrice(e *Binance, marketType string) (string, float64)

func (*OptionTicker) ToStdTicker

func (t *OptionTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type OrderBase

type OrderBase struct {
	Symbol        string `json:"symbol"`
	Side          string `json:"side"`
	ClientOrderId string `json:"clientOrderId"`
	ExecutedQty   string `json:"executedQty"`
	UpdateTime    int64  `json:"updateTime"`
	Status        string `json:"status"`
	Type          string `json:"type"` // 订单类型
	OrderId       int    `json:"orderId"`
	Price         string `json:"price"`
	TimeInForce   string `json:"timeInForce"`
}

func (*OrderBase) ToStdOrder

func (o *OrderBase) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type RateLimit

type RateLimit struct {
	RateLimitType string `json:"rateLimitType"`
	Interval      string `json:"interval"`
	IntervalNum   int    `json:"intervalNum"`
	Limit         int    `json:"limit"`
}

type SpotAccount

type SpotAccount struct {
	MakerCommission            int               `json:"makerCommission"`
	TakerCommission            int               `json:"takerCommission"`
	BuyerCommission            int               `json:"buyerCommission"`
	SellerCommission           int               `json:"sellerCommission"`
	CommissionRates            map[string]string `json:"commissionRates"`
	CanTrade                   bool              `json:"canTrade"`
	CanWithdraw                bool              `json:"canWithdraw"`
	CanDeposit                 bool              `json:"canDeposit"`
	Brokered                   bool              `json:"brokered"`
	RequireSelfTradePrevention bool              `json:"requireSelfTradePrevention"`
	PreventSor                 bool              `json:"preventSor"`
	UpdateTime                 int64             `json:"updateTime"`
	AccountType                string            `json:"accountType"`
	Balances                   []*SpotAsset      `json:"balances"`
	Permissions                []string          `json:"permissions"`
	Uid                        int               `json:"uid"`
}

type SpotAsset

type SpotAsset struct {
	Asset    string `json:"asset"`
	Free     string `json:"free"`
	Locked   string `json:"locked"`
	Borrowed string `json:"borrowed"` // margin cross only
	Interest string `json:"interest"` // margin cross only
	NetAsset string `json:"netAsset"` // margin cross only
}

func (SpotAsset) ToStdAsset

func (a SpotAsset) ToStdAsset(getCurrCode func(string) string) *banexg.Asset

type SpotBase

type SpotBase struct {
	OrderBase
	IcebergQty              string `json:"icebergQty"`
	Time                    int64  `json:"time"`
	SelfTradePreventionMode string `json:"selfTradePreventionMode"`
	CummulativeQuoteQty     string `json:"cummulativeQuoteQty"`
	IsWorking               bool   `json:"isWorking"`
	OrigQty                 string `json:"origQty"`
	StopPrice               string `json:"stopPrice"`
	TransactTime            int64  `json:"transactTime"` // 交易时间戳
}

func (*SpotBase) ToStdOrder

func (o *SpotBase) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type SpotBookTicker added in v0.2.6

type SpotBookTicker struct {
	BookTicker
	Symbol string `json:"symbol"` // 交易对
}

func (*SpotBookTicker) ToStdTicker added in v0.2.6

func (t *SpotBookTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type SpotFill

type SpotFill struct {
	Price           string `json:"price"`
	Qty             string `json:"qty"`
	Commission      string `json:"commission"`
	CommissionAsset string `json:"commissionAsset"`
	TradeId         int    `json:"tradeId"`
	AllocId         int    `json:"allocId"`   // sor
	MatchType       string `json:"matchType"` // sor
}

type SpotOrder

type SpotOrder struct {
	SpotBase
	OrderListId             int         `json:"orderListId"` // OCO订单ID,否则为 -1
	OrigQuoteOrderQty       string      `json:"origQuoteOrderQty"`
	WorkingTime             int64       `json:"workingTime"`
	Fills                   []*SpotFill `json:"fills"`
	WorkingFloor            string      `json:"workingFloor"`            // sor
	SelfTradePreventionMode string      `json:"selfTradePreventionMode"` // sor
	UsedSor                 bool        `json:"usedSor"`
}

SpotOrder 现货订单

func (*SpotOrder) ToStdOrder

func (o *SpotOrder) ToStdOrder(mapSymbol func(string) string, info map[string]interface{}) *banexg.Order

type SpotOrderBook

type SpotOrderBook struct {
	BaseOrderBook
	UpdateID int `json:"lastUpdateId"`
}

func (SpotOrderBook) ToStdOrderBook

func (o SpotOrderBook) ToStdOrderBook(market *banexg.Market) *banexg.OrderBook

type SpotPriceTicker

type SpotPriceTicker struct {
	Symbol string `json:"symbol"` // 交易对
	Price  string `json:"price"`  // 最新价格
}

type SpotTicker

type SpotTicker struct {
	Symbol             string `json:"symbol"`             // 交易对
	PriceChange        string `json:"priceChange"`        // 24小时价格变动
	PriceChangePercent string `json:"priceChangePercent"` // 24小时价格变动百分比
	WeightedAvgPrice   string `json:"weightedAvgPrice"`   // 加权平均价
	LastPrice          string `json:"lastPrice"`          // 最近一次成交价
	LastQty            string `json:"lastQty"`            // 最近一次成交额
	OpenPrice          string `json:"openPrice"`          // 24小时内第一次成交的价格
	HighPrice          string `json:"highPrice"`          // 24小时最高价
	LowPrice           string `json:"lowPrice"`           // 24小时最低价
	Volume             string `json:"volume"`             // 24小时成交量
	QuoteVolume        string `json:"quoteVolume"`        // 24小时成交额
	OpenTime           int64  `json:"openTime"`           // 24小时内,第一笔交易的发生时间
	CloseTime          int64  `json:"closeTime"`          // 24小时内,最后一笔交易的发生时间
	FirstId            int    `json:"firstId"`            // 首笔成交id
	LastId             int    `json:"lastId"`             // 末笔成交id
	Count              int    `json:"count"`              // 成交笔数
}

SpotTicker 现货: /ticker & /ticker/tradingDay

func (*SpotTicker) ToStdTicker

func (t *SpotTicker) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type SpotTicker24hr

type SpotTicker24hr struct {
	BookTicker
	LinearTicker
	PrevClosePrice string `json:"prevClosePrice"` // 前收盘价
}

func (*SpotTicker24hr) ToStdTicker

func (t *SpotTicker24hr) ToStdTicker(e *Binance, marketType string, info map[string]interface{}) *banexg.Ticker

type SymbolLvgBrackets added in v0.1.2

type SymbolLvgBrackets = banexg.SymbolLvgBrackets

SymbolLvgBrackets 币种所有杠杆费率信息

type SymbolPrice added in v0.2.0

type SymbolPrice struct {
	Symbol string  `json:"symbol"`       // 交易对,比如 "LTCBTC"
	Price  float64 `json:"price,string"` // 交易价格,保留为字符串以防止精度损失
}

func (*SymbolPrice) ToStdPrice added in v0.2.0

func (t *SymbolPrice) ToStdPrice(e *Binance, marketType string) (string, float64)

type WSContractPosition

type WSContractPosition struct {
	Symbol         string `json:"s"`
	PosAmount      string `json:"pa"`
	EntryPrice     string `json:"ep"`
	BreakEvenPrice string `json:"bep"`
	AccuRealized   string `json:"cr"`
	UnrealizedPnl  string `json:"up"`
	MarginType     string `json:"mt"`
	IsolatedWallet string `json:"iw"`
	PositionSide   string `json:"ps"`
}

type WsKline

type WsKline struct {
	OpenTime   int64  `json:"t"`
	CloseTime  int64  `json:"T"`
	Symbol     string `json:"s"`
	PairSymbol string `json:"ps"`
	TimeFrame  string `json:"i"`
	Open       string `json:"o"`
	Close      string `json:"c"`
	High       string `json:"h"`
	Low        string `json:"l"`
	Volume     string `json:"v"`
	LastId     int64  `json:"L"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL