package
1.60.0
Repository: https://github.com/c9s/bbgo.git
Documentation: pkg.go.dev

# Functions

FormatTimestamp formats a time into Unix timestamp in milliseconds, as requested by Binance.

# Constants

WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).
WithdrawStatus: 0(0:Email Sent,1:Cancelled 2:Awaiting Approval 3:Rejected 4:Processing 5:Failure 6:Completed).

# Variables

# Structs

go:generate requestgen -method POST -url "/api/v3/order/cancelReplace" -type CancelReplaceSpotOrderRequest -responseType .CancelReplaceSpotOrderResponse.
FuturesAccountAsset define account asset.
FuturesAccountPosition define account position.
go:generate requestgen -method POST -url "/fapi/v1/leverage" -type FuturesChangeInitialLeverageRequest -responseType FuturesChangeInitialLeverageResponse.
go:generate requestgen -method POST -url "/fapi/v1/multiAssetsMargin" -type FuturesChangeMultiAssetsModeRequest -responseType FuturesChangeMultiAssetsModeResponse.
Code 200 == success.
go:generate requestgen -method GET -url "/fapi/v2/balance" -type FuturesGetAccountBalanceRequest -responseType []FuturesBalance.
go:generate requestgen -method GET -url "/fapi/v2/account" -type FuturesGetAccountRequest -responseType FuturesAccount.
go:generate requestgen -method GET -url "/fapi/v1/income" -type FuturesGetIncomeHistoryRequest -responseType []FuturesIncome.
go:generate requestgen -method GET -url "/fapi/v1/multiAssetsMargin" -type FuturesGetMultiAssetsModeRequest -responseType FuturesMultiAssetsModeResponse.
go:generate requestgen -method GET -url "/fapi/v1/openInterest" -type FuturesGetOpenInterestRequest -responseType FuturesOpenInterest.
go:generate requestgen -method GET -url "/futures/data/openInterestHist" -type FuturesGetOpenInterestStatisticsRequest -responseType []FuturesOpenInterestStatistics.
go:generate requestgen -method GET -url "/fapi/v2/positionRisk" -type FuturesGetPositionRisksRequest -responseType []FuturesPositionRisk.
go:generate requestgen -method GET -url "/futures/data/globalLongShortAccountRatio" -type FuturesGlobalLongShortAccountRatioRequest -responseType []FuturesGlobalLongShortAccountRatio.
go:generate requestgen -method GET -url "/futures/data/takerlongshortRatio" -type FuturesTakerBuySellVolumeRequest -responseType []FuturesTakerBuySellVolume.
go:generate requestgen -method GET -url "/futures/data/topLongShortAccountRatio" -type FuturesTopTraderLongShortAccountRatioRequest -responseType []FuturesTopTraderLongShortAccountRatio.
go:generate requestgen -method GET -url "/futures/data/topLongShortPositionRatio" -type FuturesTopTraderLongShortPositionRatioRequest -responseType []FuturesTopTraderLongShortPositionRatio.
go:generate requestgen -method POST -url "/sapi/v1/futures/transfer" -type FuturesTransferRequest -responseType .FuturesTransferResponse.
go:generate requestgen -method GET -url "/sapi/v1/apiReferral/ifNewUser" -type GetApiReferralIfNewUserRequest -responseType .ApiReferralIfNewUserResponse.
go:generate requestgen -method GET -url "/sapi/v1/capital/deposit/address" -type GetDepositAddressRequest -responseType .DepositAddress.
go:generate requestgen -method GET -url "/sapi/v1/capital/deposit/hisrec" -type GetDepositHistoryRequest -responseType []DepositHistory.
go:generate requestgen -method GET -url "/api/v3/depth" -type GetDepthRequest -responseType .Depth.
go:generate requestgen -method GET -url "/api/v3/historicalTrades" -type GetHistoricalTradesRequest -responseType []Trade.
GetMarginBorrowRepayHistoryRequest txId or startTime must be sent.
go:generate requestgen -method GET -url "/sapi/v1/margin/interestHistory" -type GetMarginInterestHistoryRequest -responseType .RowsResponse -responseDataField Rows -responseDataType []MarginInterest.
go:generate requestgen -method GET -url "/sapi/v1/margin/interestRateHistory" -type GetMarginInterestRateHistoryRequest -responseType []MarginInterestRate.
go:generate requestgen -method GET -url "/sapi/v1/margin/forceLiquidationRec" -type GetMarginLiquidationHistoryRequest -responseType .RowsResponse -responseDataField Rows -responseDataType []MarginLiquidationRecord.
go:generate requestgen -method GET -url "/sapi/v1/margin/maxBorrowable" -type GetMarginMaxBorrowableRequest -responseType .MarginMaxBorrowable.
go:generate requestgen -method GET -url "/sapi/v1/margin/myTrades" -type GetMarginTradesRequest -responseType []Trade.
go:generate requestgen -method GET -url "/api/v3/myTrades" -type GetMyTradesRequest -responseType []Trade.
GetSpotRebateHistoryRequest The max interval between startTime and endTime is 30 days.
go:generate requestgen -method GET -url "/sapi/v1/asset/tradeFee" -type GetTradeFeeRequest -responseType []TradeFee.
go:generate requestgen -method GET -url "/sapi/v1/capital/withdraw/history" -type GetWithdrawHistoryRequest -responseType []WithdrawRecord.
MarginInterest is the user margin interest record.
MarginMaxBorrowable is the user margin interest record.
go:generate requestgen -method POST -url "/sapi/v1/margin/borrow-repay" -type PlaceMarginOrderRequest -responseType .TransferResponse.
go:generate requestgen -method POST -url "/sapi/v1/asset/transfer" -type TransferAssetRequest -responseType .TransferResponse.
go:generate requestgen -method POST -url "/sapi/v1/capital/withdraw/apply" -type WithdrawRequest -responseType .WithdrawResponse.

# Type aliases

FuturesIncomeType can be one of the following value: TRANSFER, WELCOME_BONUS, REALIZED_PNL, FUNDING_FEE, COMMISSION, INSURANCE_CLEAR, REFERRAL_KICKBACK, COMMISSION_REBATE, API_REBATE, CONTEST_REWARD, CROSS_COLLATERAL_TRANSFER, OPTIONS_PREMIUM_FEE, OPTIONS_SETTLE_PROFIT, INTERNAL_TRANSFER, AUTO_EXCHANGE, DELIVERED_SETTELMENT, COIN_SWAP_DEPOSIT, COIN_SWAP_WITHDRAW, POSITION_LIMIT_INCREASE_FEE.
interest type in response has 4 enums: PERIODIC interest charged per hour ON_BORROW first interest charged on borrow PERIODIC_CONVERTED interest charged per hour converted into BNB ON_BORROW_CONVERTED first interest charged on borrow converted into BNB.
one of PENDING (pending execution), CONFIRMED (successfully loaned), FAILED (execution failed, nothing happened to your account);.
rebate type:1 is commission rebate,2 is referral kickback.
1 for internal transfer, 0 for external transfer go:generate stringer -type=TransferType.
go:generate stringer -type=WithdrawStatus -trimprefix=WithdrawStatus.