Documentation ¶
Index ¶
- type AccountInfo
- type AllCoinsBalance
- type AllowDepositCoinInfo
- type AssetInfo
- type AssetItem
- type BalanceDetail
- type BatchOrderServerResponse
- type BorrowHistory
- type BorrowHistoryItem
- type BorrowQuotaInfo
- type BrokerEarningInfo
- type BrokerEarningResult
- type CancelRedeemFund
- type CancelWithdrawAssetResult
- type ClassicalSpotMarginBorrowCoinResult
- type ClassicalSpotMarginCoinResult
- type ClassicalSpotMarginInterestResult
- type ClassicalSpotMarginLoanResult
- type ClosedPnlInfoEntry
- type CoinBalance
- type CoinChainInfo
- type CoinGreekInfo
- type CoinGreeks
- type CoinInfo
- type CoinInfoResult
- type CoinInfoRow
- type CollateralInfo
- type CollateralItem
- type ConvertRatio
- type DeliveryPriceData
- type DeliveryPriceInfo
- type DeliveryRecordEntry
- type DeliveryRecordInfo
- type DepositChainInfo
- type DepositCoinConfig
- type DepositFund
- type DepositRecord
- type DepositRecords
- type FeeRateItem
- type FeeRatesInfo
- type FundingRate
- type FundingRateInfo
- type HistoricalVolatilityInfo
- type Instrument
- type InstrumentInfo
- type InsuranceData
- type InternalTransferInfo
- type LendingCoin
- type LendingCoinInfoResult
- type LendingOrderRecord
- type LendingOrdersRecordsResult
- type LeverageFilter
- type LeverageInfo
- type LeverageTokenPurchaseResult
- type LeverageTokenRedeem
- type ListOrderResult
- type LoanInfo
- type LongShortRatioData
- type LotSizeFilter
- type MMPStateInfo
- type MMPStateItem
- type MarginMode
- type MarginProductInfo
- type MarginToken
- type MarketInsuranceInfo
- type MarketKlineCandle
- type MarketKlineResponse
- type MarketLongShortRatioInfo
- type MarketRiskLimitInfo
- type MarketTickers
- type MasterDepositResult
- type OpenOrdersInfo
- type OrderBookEntry
- type OrderBookInfo
- type OrderInfo
- type OrderResult
- type PositionClosedPnlInfo
- type PositionExecutionEntry
- type PositionExecutionInfo
- type PositionListInfo
- type PositionRiskInfo
- type PositionTpslMode
- type PositionUpdateMargin
- type PriceFilter
- type PublicRecentTradeHistory
- type ReasonItem
- type RedeemFund
- type RiskLimitData
- type ServerTimeResult
- type SetDepositAccountResult
- type SettlementEntry
- type SingleCoinBalance
- type SpotBorrowOrderResult
- type SpotInfo
- type SpotLeverageOrdersRecords
- type SpotLeverageTokenInfo
- type SpotLeverageTokenMarket
- type SpotMarginBorrowOrders
- type SpotMarginDataResult
- type SpotMarginLeverageResult
- type SpotMarginStateResult
- type SpotRepayOrderResult
- type SpotToggleMarginResult
- type SubDepositResult
- type SubUidsInfo
- type TickerInfo
- type TokenInfo
- type TradeInfo
- type TransactionLogEntry
- type TransactionLogInfo
- type TransferDetail
- type TransferResult
- type USDCSettlementInfo
- type UnifiedUpdateMsg
- type UniversalTransferDetail
- type UniversalTransferInfo
- type UpgradeUtaInfo
- type UserVolumeInfo
- type VolatilityData
- type WalletAccountInfo
- type WalletBalanceInfo
- type WalletInfo
- type WithdrawAssetResult
- type WithdrawRecord
- type WithdrawRecords
- type WithdrawableAmount
- type WithdrawableAsset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountInfo ¶
type AccountInfo struct { UnifiedMarginStatus int `json:"unifiedMarginStatus"` MarginMode string `json:"marginMode"` DcpStatus string `json:"dcpStatus"` TimeWindow int `json:"timeWindow"` SmpGroup int `json:"smpGroup"` IsMasterTrader bool `json:"isMasterTrader"` UpdatedTime string `json:"updatedTime"` }
type AllCoinsBalance ¶
type AllCoinsBalance struct { AccountType string `json:"accountType"` MemberId string `json:"memberId"` Balance []BalanceDetail `json:"balance"` }
type AllowDepositCoinInfo ¶
type AllowDepositCoinInfo struct { ConfigList []DepositCoinConfig `json:"configList"` NextPageCursor string `json:"nextPageCursor"` }
type BalanceDetail ¶
type BatchOrderServerResponse ¶
type BatchOrderServerResponse struct { RetCode int `json:"retCode"` RetMsg string `json:"retMsg"` Result struct { List []struct { Category string `json:"category"` Symbol string `json:"symbol"` OrderId string `json:"orderId"` OrderLinkId string `json:"orderLinkId"` CreateAt *string `json:"createAt,omitempty"` } `json:"list"` } `json:"result"` RetExtInfo struct { List []struct { Code int `json:"code"` Msg string `json:"msg"` } `json:"list"` } `json:"retExtInfo"` Time int64 `json:"time"` }
type BorrowHistory ¶
type BorrowHistory struct { List []BorrowHistoryItem `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type BorrowHistoryItem ¶
type BorrowHistoryItem struct { Currency string `json:"currency"` CreatedTime int64 `json:"createdTime"` // Using int64 for milliseconds timestamp BorrowCost string `json:"borrowCost"` HourlyBorrowRate string `json:"hourlyBorrowRate"` InterestBearingBorrowSize string `json:"InterestBearingBorrowSize"` CostExemption string `json:"costExemption"` BorrowAmount string `json:"borrowAmount"` UnrealisedLoss string `json:"unrealisedLoss"` FreeBorrowedAmount string `json:"freeBorrowedAmount"` }
type BorrowQuotaInfo ¶
type BorrowQuotaInfo struct { Symbol string `json:"symbol"` Side string `json:"side"` MaxTradeQty string `json:"maxTradeQty"` MaxTradeAmount string `json:"maxTradeAmount"` SpotMaxTradeQty string `json:"spotMaxTradeQty"` SpotMaxTradeAmount string `json:"spotMaxTradeAmount"` BorrowCoin string `json:"borrowCoin"` }
type BrokerEarningInfo ¶
type BrokerEarningInfo struct { UserId string `json:"userId"` BizType string `json:"bizType"` Symbol string `json:"symbol"` Coin string `json:"coin"` Earning string `json:"earning"` OrderId string `json:"orderId"` ExecTime string `json:"execTime"` }
BrokerEarningInfo represents an individual record of broker earnings.
type BrokerEarningResult ¶
type BrokerEarningResult struct { List []BrokerEarningInfo `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
BrokerEarningResult represents the paginated result of broker earnings.
type CancelRedeemFund ¶
type CancelRedeemFund struct { OrderId string `json:"orderId"` SerialNo string `json:"serialNo"` UpdatedTime string `json:"updatedTime"` }
CancelRedeemFund represents the status of a cancelled redemption request from a lending product.
type CancelWithdrawAssetResult ¶
type CancelWithdrawAssetResult struct {
Status string `json:"status"`
}
type ClassicalSpotMarginBorrowCoinResult ¶
type ClassicalSpotMarginBorrowCoinResult struct { List []struct { Coin string `json:"coin"` BorrowingPrecision int `json:"borrowingPrecision"` RepaymentPrecision int `json:"repaymentPrecision"` } `json:"list"` }
ClassicalSpotMarginBorrowCoinResult holds the borrowing precision information for coins in classical spot margin.
type ClassicalSpotMarginCoinResult ¶
type ClassicalSpotMarginCoinResult struct { List []struct { Coin string `json:"coin"` ConversionRate string `json:"conversionRate"` LiquidationOrder int `json:"liquidationOrder"` } `json:"list"` }
ClassicalSpotMarginCoinResult holds information about coins in classical spot margin.
type ClassicalSpotMarginInterestResult ¶
type ClassicalSpotMarginInterestResult struct { Coin string `json:"coin"` InterestRate string `json:"interestRate"` LoanAbleAmount string `json:"loanAbleAmount"` MaxLoanAmount string `json:"maxLoanAmount"` }
ClassicalSpotMarginInterestResult contains information about the interest rate on spot margin.
type ClassicalSpotMarginLoanResult ¶
type ClassicalSpotMarginLoanResult struct { AcctBalanceSum string `json:"acctBalanceSum"` DebtBalanceSum string `json:"debtBalanceSum"` LoanAccountList []struct { Free string `json:"free"` Interest string `json:"interest"` Loan string `json:"loan"` RemainAmount string `json:"remainAmount"` Locked string `json:"locked"` TokenId string `json:"tokenId"` Total string `json:"total"` } `json:"loanAccountList"` RiskRate string `json:"riskRate"` Status int `json:"status"` // Use int for integer type SwitchStatus int `json:"switchStatus"` // Use int for integer type }
ClassicalSpotMarginLoanResult holds the loan account information in the classical spot margin.
type ClosedPnlInfoEntry ¶
type ClosedPnlInfoEntry struct { Symbol string `json:"symbol"` OrderID string `json:"orderId"` Side string `json:"side"` Qty string `json:"qty"` OrderPrice string `json:"orderPrice"` OrderType string `json:"orderType"` ExecType string `json:"execType"` ClosedSize string `json:"closedSize"` CumEntryValue string `json:"cumEntryValue"` AvgEntryPrice string `json:"avgEntryPrice"` CumExitValue string `json:"cumExitValue"` AvgExitPrice string `json:"avgExitPrice"` ClosedPnl string `json:"closedPnl"` FillCount string `json:"fillCount"` Leverage string `json:"leverage"` CreatedTime string `json:"createdTime"` UpdatedTime string `json:"updatedTime"` }
type CoinBalance ¶
type CoinChainInfo ¶
type CoinChainInfo struct { Chain string `json:"chain"` ChainType string `json:"chainType"` Confirmation string `json:"confirmation"` WithdrawFee string `json:"withdrawFee"` DepositMin string `json:"depositMin"` WithdrawMin string `json:"withdrawMin"` MinAccuracy string `json:"minAccuracy"` ChainDeposit string `json:"chainDeposit"` ChainWithdraw string `json:"chainWithdraw"` WithdrawPercentageFee string `json:"withdrawPercentageFee"` }
CoinChainInfo represents the structure for each chain's information for a coin.
type CoinGreekInfo ¶
type CoinGreeks ¶
type CoinGreeks struct {
CoinGreeks []CoinGreekInfo `json:"coin"`
}
type CoinInfo ¶
type CoinInfo struct { Coin string `json:"coin"` Equity string `json:"equity"` UsdValue string `json:"usdValue"` WalletBalance string `json:"walletBalance"` Free string `json:"free"` Locked string `json:"locked"` BorrowAmount string `json:"borrowAmount"` AvailableToBorrow string `json:"availableToBorrow"` AvailableToWithdraw string `json:"availableToWithdraw"` AccruedInterest string `json:"accruedInterest"` TotalOrderIM string `json:"totalOrderIM"` TotalPositionIM string `json:"totalPositionIM"` TotalPositionMM string `json:"totalPositionMM"` UnrealisedPnl string `json:"unrealisedPnl"` CumRealisedPnl string `json:"cumRealisedPnl"` Bonus string `json:"bonus"` CollateralSwitch bool `json:"collateralSwitch"` MarginCollateral bool `json:"marginCollateral"` }
type CoinInfoResult ¶
type CoinInfoResult struct {
Rows []CoinInfoRow `json:"rows"`
}
CoinInfoResult represents the structure for coin info results.
type CoinInfoRow ¶
type CoinInfoRow struct { Name string `json:"name"` Coin string `json:"coin"` RemainAmount string `json:"remainAmount"` Chains []CoinChainInfo `json:"chains"` }
CoinInfoRow represents the structure for each row of coin information.
type CollateralInfo ¶
type CollateralInfo struct {
List []CollateralItem `json:"list"`
}
type CollateralItem ¶
type CollateralItem struct { Currency string `json:"currency"` HourlyBorrowRate string `json:"hourlyBorrowRate"` MaxBorrowingAmount string `json:"maxBorrowingAmount"` FreeBorrowingLimit string `json:"freeBorrowingLimit"` FreeBorrowAmount string `json:"freeBorrowAmount"` BorrowAmount string `json:"borrowAmount"` AvailableToBorrow string `json:"availableToBorrow"` Borrowable bool `json:"borrowable"` BorrowUsageRate string `json:"borrowUsageRate"` MarginCollateral bool `json:"marginCollateral"` CollateralSwitch bool `json:"collateralSwitch"` CollateralRatio string `json:"collateralRatio"` }
type ConvertRatio ¶
type DeliveryPriceData ¶
type DeliveryPriceInfo ¶
type DeliveryPriceInfo struct { Category string `json:"category"` List []DeliveryPriceData `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type DeliveryRecordEntry ¶
type DeliveryRecordEntry struct { DeliveryTime int64 `json:"deliveryTime"` Symbol string `json:"symbol"` Side string `json:"side"` Position string `json:"position"` DeliveryPrice string `json:"deliveryPrice"` Strike string `json:"strike"` Fee string `json:"fee"` DeliveryPnl string `json:"deliveryRpl"` }
type DeliveryRecordInfo ¶
type DeliveryRecordInfo struct { Category string `json:"category"` List []DeliveryRecordEntry `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type DepositChainInfo ¶
type DepositChainInfo struct { ChainType string `json:"chainType"` AddressDeposit string `json:"addressDeposit"` TagDeposit string `json:"tagDeposit"` Chain string `json:"chain"` BatchReleaseLimit string `json:"batchReleaseLimit"` }
DepositChainInfo represents the shared structure for deposit chain information.
type DepositCoinConfig ¶
type DepositFund ¶
type DepositFund struct { Coin string `json:"coin"` CreatedTime string `json:"createdTime"` OrderId string `json:"orderId"` Quantity string `json:"quantity"` SerialNo string `json:"serialNo"` Status string `json:"status"` UpdatedTime string `json:"updatedTime"` }
DepositFund represents the status of a deposit into a lending product.
type DepositRecord ¶
type DepositRecord struct { Coin string `json:"coin"` Chain string `json:"chain"` Amount string `json:"amount"` TxID string `json:"txID"` Status int `json:"status"` ToAddress string `json:"toAddress"` Tag string `json:"tag"` DepositFee string `json:"depositFee"` SuccessAt string `json:"successAt"` Confirmations string `json:"confirmations"` TxIndex string `json:"txIndex"` BlockHash string `json:"blockHash"` BatchReleaseLimit string `json:"batchReleaseLimit"` DepositType int `json:"depositType"` }
type DepositRecords ¶
type DepositRecords struct { Rows []DepositRecord `json:"rows"` NextPageCursor string `json:"nextPageCursor"` }
type FeeRateItem ¶
type FeeRatesInfo ¶
type FeeRatesInfo struct { Category string `json:"category"` List []FeeRateItem `json:"list"` }
type FundingRate ¶
type FundingRate struct { Category string `json:"category"` List []FundingRateInfo `json:"list"` }
type FundingRateInfo ¶
type HistoricalVolatilityInfo ¶
type HistoricalVolatilityInfo struct { Category string `json:"category"` List []VolatilityData `json:"list"` }
type Instrument ¶
type Instrument struct { Symbol string `json:"symbol"` ContractType string `json:"contractType"` Status string `json:"status"` BaseCoin string `json:"baseCoin"` QuoteCoin string `json:"quoteCoin"` LaunchTime string `json:"launchTime"` DeliveryTime string `json:"deliveryTime"` DeliveryFeeRate string `json:"deliveryFeeRate"` PriceScale string `json:"priceScale"` LeverageFilter LeverageFilter `json:"leverageFilter"` PriceFilter PriceFilter `json:"priceFilter"` LotSizeFilter LotSizeFilter `json:"lotSizeFilter"` UnifiedMarginTrade bool `json:"unifiedMarginTrade"` FundingInterval int `json:"fundingInterval"` SettleCoin string `json:"settleCoin"` CopyTrading string `json:"copyTrading"` }
type InstrumentInfo ¶
type InstrumentInfo struct { Category string `json:"category"` NextPageCursor string `json:"nextPageCursor"` List []Instrument `json:"list"` }
type InsuranceData ¶
type InternalTransferInfo ¶
type InternalTransferInfo struct { List []TransferDetail `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type LendingCoin ¶
type LendingCoin struct { Coin string `json:"coin"` MaxRedeemQty string `json:"maxRedeemQty"` MinPurchaseQty string `json:"minPurchaseQty"` Precision string `json:"precision"` Rate string `json:"rate"` LoanToPoolRatio string `json:"loanToPoolRatio"` ActualApy string `json:"actualApy"` }
LendingCoin represents information about a specific coin available for lending.
type LendingCoinInfoResult ¶
type LendingCoinInfoResult struct {
List []LendingCoin `json:"list"`
}
LendingCoinInfoResult represents the list of coins available for lending.
type LendingOrderRecord ¶
type LendingOrderRecord struct { Coin string `json:"coin"` CreatedTime string `json:"createdTime"` OrderId string `json:"orderId"` Quantity string `json:"quantity"` SerialNo string `json:"serialNo"` Status string `json:"status"` UpdatedTime string `json:"updatedTime"` }
LendingOrderRecord represents an individual lending order record.
type LendingOrdersRecordsResult ¶
type LendingOrdersRecordsResult struct {
List []LendingOrderRecord `json:"list"`
}
LendingOrdersRecordsResult represents the result of a query for lending order records.
type LeverageFilter ¶
type LeverageInfo ¶
type LeverageTokenPurchaseResult ¶
type LeverageTokenPurchaseResult struct { LtCoin string `json:"ltCoin"` LtOrderStatus string `json:"ltOrderStatus"` ExecQty string `json:"execQty"` ExecAmt string `json:"execAmt"` Amount string `json:"amount"` PurchaseId string `json:"purchaseId"` SerialNo string `json:"serialNo"` ValueCoin string `json:"valueCoin"` }
LeverageTokenPurchaseResult represents the result of a leverage token purchase.
type LeverageTokenRedeem ¶
type LeverageTokenRedeem struct { LtCoin string `json:"ltCoin"` LtOrderStatus string `json:"ltOrderStatus"` Quantity string `json:"quantity"` ExecQty string `json:"execQty"` ExecAmt string `json:"execAmt"` RedeemId string `json:"redeemId"` SerialNo string `json:"serialNo"` ValueCoin string `json:"valueCoin"` }
LeverageTokenRedeem represents the redeem information for a leveraged token.
type ListOrderResult ¶
type ListOrderResult struct {
List []OrderResult `json:"list"`
}
type LoanInfo ¶
type LoanInfo struct { OrderId string `json:"orderId"` OrderProductId string `json:"orderProductId"` ParentUid string `json:"parentUid"` LoanTime string `json:"loanTime"` LoanCoin string `json:"loanCoin"` LoanAmount string `json:"loanAmount"` UnpaidAmount string `json:"unpaidAmount"` UnpaidInterest string `json:"unpaidInterest"` RepaidAmount string `json:"repaidAmount"` RepaidInterest string `json:"repaidInterest"` InterestRate string `json:"interestRate"` Status string `json:"status"` Leverage string `json:"leverage"` SupportSpot string `json:"supportSpot"` SupportContract string `json:"supportContract"` WithdrawLine string `json:"withdrawLine"` TransferLine string `json:"transferLine"` SpotBuyLine string `json:"spotBuyLine"` SpotSellLine string `json:"spotSellLine"` ContractOpenLine string `json:"contractOpenLine"` LiquidationLine string `json:"liquidationLine"` StopLiquidationLine string `json:"stopLiquidationLine"` ContractLeverage string `json:"contractLeverage"` TransferRatio string `json:"transferRatio"` SpotSymbols []string `json:"spotSymbols"` ContractSymbols []string `json:"contractSymbols"` SupportUSDCContract string `json:"supportUSDCContract"` SupportUSDCOptions string `json:"supportUSDCOptions"` SupportMarginTrading string `json:"supportMarginTrading"` USDTPerpetualOpenLine string `json:"USDTPerpetualOpenLine"` USDCContractOpenLine string `json:"USDCContractOpenLine"` }
LoanInfo To do repay & loand to value
type LongShortRatioData ¶
type LotSizeFilter ¶
type MMPStateInfo ¶
type MMPStateInfo struct {
Result []MMPStateItem `json:"result"`
}
type MMPStateItem ¶
type MarginMode ¶
type MarginMode struct { Reasons []ReasonItem `json:"reasons"` MmpFrozenUntil string `json:"mmpFrozenUntil"` MmpFrozen bool `json:"mmpFrozen"` }
type MarginProductInfo ¶
type MarginProductInfo struct { ProductId string `json:"productId"` Leverage string `json:"leverage"` SupportSpot int `json:"supportSpot"` SupportContract int `json:"supportContract"` SupportMarginTrading int `json:"supportMarginTrading"` WithdrawLine string `json:"withdrawLine"` TransferLine string `json:"transferLine"` SpotBuyLine string `json:"spotBuyLine"` SpotSellLine string `json:"spotSellLine"` ContractOpenLine string `json:"contractOpenLine"` LiquidationLine string `json:"liquidationLine"` StopLiquidationLine string `json:"stopLiquidationLine"` ContractLeverage string `json:"contractLeverage"` TransferRatio string `json:"transferRatio"` SpotSymbols []string `json:"spotSymbols"` ContractSymbols []string `json:"contractSymbols"` SupportUSDCContract int `json:"supportUSDCContract"` SupportUSDCOptions int `json:"supportUSDCOptions"` USDTPerpetualOpenLine string `json:"USDTPerpetualOpenLine"` USDCContractOpenLine string `json:"USDCContractOpenLine"` USDCOptionsOpenLine string `json:"USDCOptionsOpenLine"` USDTPerpetualCloseLine string `json:"USDTPerpetualCloseLine"` USDCContractCloseLine string `json:"USDCContractCloseLine"` USDCOptionsCloseLine string `json:"USDCOptionsCloseLine"` USDCContractSymbols []string `json:"USDCContractSymbols"` USDCOptionsSymbols []string `json:"USDCOptionsSymbols"` MarginLeverage string `json:"marginLeverage"` USDTPerpetualLeverage []LeverageInfo `json:"USDTPerpetualLeverage"` USDCContractLeverage []LeverageInfo `json:"USDCContractLeverage"` }
type MarginToken ¶
type MarketInsuranceInfo ¶
type MarketInsuranceInfo struct { UpdatedTime string `json:"updatedTime"` List []InsuranceData `json:"list"` }
type MarketKlineCandle ¶
type MarketKlineResponse ¶
type MarketKlineResponse struct { Category string `json:"category"` Symbol string `json:"symbol"` List []MarketKlineCandle `json:"list"` }
type MarketLongShortRatioInfo ¶
type MarketLongShortRatioInfo struct {
List []LongShortRatioData `json:"list"`
}
type MarketRiskLimitInfo ¶
type MarketRiskLimitInfo struct { Category string `json:"category"` List []RiskLimitData `json:"list"` }
type MarketTickers ¶
type MarketTickers struct { Category string `json:"category"` List []TickerInfo `json:"list"` }
type MasterDepositResult ¶
type MasterDepositResult struct { Coin string `json:"coin"` Chains []DepositChainInfo `json:"chains"` }
MasterDepositResult represents the structure for master deposit results.
type OpenOrdersInfo ¶
type OrderBookEntry ¶
type OrderBookInfo ¶
type OrderBookInfo struct { Symbol string `json:"s"` Bids []OrderBookEntry `json:"b"` Asks []OrderBookEntry `json:"a"` Timestamp int64 `json:"ts"` UpdateID int64 `json:"u"` }
type OrderInfo ¶
type OrderInfo struct { OrderId string `json:"orderId"` OrderLinkId string `json:"orderLinkId"` BlockTradeId string `json:"blockTradeId"` Symbol string `json:"symbol"` Price string `json:"price"` Qty string `json:"qty"` Side string `json:"side"` IsLeverage string `json:"isLeverage"` PositionIdx int `json:"positionIdx"` OrderStatus string `json:"orderStatus"` CancelType string `json:"cancelType"` RejectReason string `json:"rejectReason"` AvgPrice string `json:"avgPrice"` LeavesQty string `json:"leavesQty"` LeavesValue string `json:"leavesValue"` CumExecQty string `json:"cumExecQty"` CumExecValue string `json:"cumExecValue"` CumExecFee string `json:"cumExecFee"` TimeInForce string `json:"timeInForce"` OrderType string `json:"orderType"` StopOrderType string `json:"stopOrderType"` OrderIv string `json:"orderIv"` TriggerPrice string `json:"triggerPrice"` TakeProfit string `json:"takeProfit"` StopLoss string `json:"stopLoss"` TpslMode string `json:"tpslMode"` OcoTriggerType string `json:"ocoTriggerType"` TpLimitPrice string `json:"tpLimitPrice"` SlLimitPrice string `json:"slLimitPrice"` TpTriggerBy string `json:"tpTriggerBy"` SlTriggerBy string `json:"slTriggerBy"` TriggerDirection int `json:"triggerDirection"` TriggerBy string `json:"triggerBy"` LastPriceOnCreated string `json:"lastPriceOnCreated"` ReduceOnly bool `json:"reduceOnly"` CloseOnTrigger bool `json:"closeOnTrigger"` PlaceType string `json:"placeType"` SmpType string `json:"smpType"` SmpGroup int `json:"smpGroup"` SmpOrderId string `json:"smpOrderId"` CreatedTime string `json:"createdTime"` UpdatedTime string `json:"updatedTime"` }
type OrderResult ¶
type PositionClosedPnlInfo ¶
type PositionClosedPnlInfo struct { Category string `json:"category"` List []ClosedPnlInfoEntry `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type PositionExecutionEntry ¶
type PositionExecutionEntry struct { Symbol string `json:"symbol"` OrderID string `json:"orderId"` OrderLinkId string `json:"orderLinkId"` Side string `json:"side"` OrderPrice string `json:"orderPrice"` OrderQty string `json:"orderQty"` LeavesQty string `json:"leavesQty"` OrderType string `json:"orderType"` StopOrderType string `json:"stopOrderType"` ExecFee string `json:"execFee"` ExecId string `json:"execId"` ExecPrice string `json:"execPrice"` ExecQty string `json:"execQty"` ExecType string `json:"execType"` ExecValue string `json:"execValue"` ExecTime string `json:"execTime"` IsMaker bool `json:"isMaker"` FeeRate string `json:"feeRate"` TradeIv string `json:"tradeIv"` MarkIv string `json:"markIv"` MarkPrice string `json:"markPrice"` IndexPrice string `json:"indexPrice"` UnderlyingPrice string `json:"underlyingPrice"` BlockTradeId string `json:"blockTradeId"` ClosedSize string `json:"closedSize"` Seq int64 `json:"seq"` NextPageCursor string `json:"nextPageCursor"` }
type PositionExecutionInfo ¶
type PositionExecutionInfo struct { Category string `json:"category"` List []PositionExecutionEntry `json:"list"` }
type PositionListInfo ¶
type PositionListInfo struct { Category string `json:"category"` List []struct { PositionIdx int `json:"positionIdx"` RiskId int `json:"riskId"` RiskLimitValue string `json:"riskLimitValue"` Symbol string `json:"symbol"` Side string `json:"side"` Size string `json:"size"` AvgPrice string `json:"avgPrice"` PositionValue string `json:"positionValue"` TradeMode int `json:"tradeMode"` AutoAddMargin int `json:"autoAddMargin"` PositionStatus string `json:"positionStatus"` Leverage string `json:"leverage"` MarkPrice string `json:"markPrice"` LiqPrice string `json:"liqPrice"` BustPrice string `json:"bustPrice"` PositionIM string `json:"positionIM"` PositionMM string `json:"positionMM"` PositionBalance string `json:"positionBalance"` TpslMode string `json:"tpslMode"` TakeProfit string `json:"takeProfit"` StopLoss string `json:"stopLoss"` TrailingStop string `json:"trailingStop"` UnrealisedPnl string `json:"unrealisedPnl"` CumRealisedPnl string `json:"cumRealisedPnl"` AdlRankIndicator int `json:"adlRankIndicator"` IsReduceOnly bool `json:"isReduceOnly"` MmrSysUpdatedTime string `json:"mmrSysUpdatedTime"` LeverageSysUpdatedTime string `json:"leverageSysUpdatedTime"` CreatedTime string `json:"createdTime"` UpdatedTime string `json:"updatedTime"` Seq int64 `json:"seq"` } `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type PositionRiskInfo ¶
type PositionTpslMode ¶
type PositionTpslMode struct {
TpSlMode string `json:"tpSlMode"`
}
type PositionUpdateMargin ¶
type PositionUpdateMargin struct { Category string `json:"category"` Symbol string `json:"symbol"` PositionIdx int `json:"positionIdx"` RiskId int `json:"riskId"` RiskLimitValue string `json:"riskLimitValue"` Size string `json:"size"` AvgPrice string `json:"avgPrice"` LiqPrice string `json:"liqPrice"` BustPrice string `json:"bustPrice"` MarkPrice string `json:"markPrice"` PositionValue string `json:"positionValue"` Leverage string `json:"leverage"` AutoAddMargin int `json:"autoAddMargin"` PositionStatus string `json:"positionStatus"` PositionIM string `json:"positionIM"` PositionMM string `json:"positionMM"` TakeProfit string `json:"takeProfit"` StopLoss string `json:"stopLoss"` TrailingStop string `json:"trailingStop"` UnrealisedPnl string `json:"unrealisedPnl"` CumRealisedPnl string `json:"cumRealisedPnl"` CreatedTime string `json:"createdTime"` UpdatedTime string `json:"updatedTime"` }
type PriceFilter ¶
type ReasonItem ¶
type RedeemFund ¶
type RedeemFund struct { Coin string `json:"coin"` CreatedTime string `json:"createdTime"` OrderId string `json:"orderId"` PrincipalQty string `json:"principalQty"` SerialNo string `json:"serialNo"` Status string `json:"status"` UpdatedTime string `json:"updatedTime"` }
RedeemFund represents the status of a redemption request from a lending product.
type RiskLimitData ¶
type RiskLimitData struct { Id int `json:"id"` Symbol string `json:"symbol"` RiskLimitValue string `json:"riskLimitValue"` MaintenanceMargin float64 `json:"maintenanceMargin"` InitialMargin float64 `json:"initialMargin"` IsLowestRisk int `json:"isLowestRisk"` MaxLeverage string `json:"maxLeverage"` }
type ServerTimeResult ¶
type SetDepositAccountResult ¶
type SetDepositAccountResult struct {
Status string `json:"status"`
}
type SettlementEntry ¶
type SingleCoinBalance ¶
type SingleCoinBalance struct { AccountType string `json:"accountType"` BizType int `json:"bizType"` AccountId string `json:"accountId"` MemberId string `json:"memberId"` Balance CoinBalance `json:"balance"` }
type SpotBorrowOrderResult ¶
type SpotBorrowOrderResult struct {
TransactId string `json:"transactId"`
}
type SpotLeverageOrdersRecords ¶
type SpotLeverageOrdersRecords struct { List []struct { LtCoin string `json:"ltCoin"` OrderId string `json:"orderId"` LtOrderType int `json:"ltOrderType"` // Use int for integer type OrderTime int64 `json:"orderTime"` // Assuming this is a timestamp, int64 is used UpdateTime int64 `json:"updateTime"` // Assuming this is a timestamp, int64 is used LtOrderStatus string `json:"ltOrderStatus"` Fee string `json:"fee"` Amount string `json:"amount"` Value string `json:"value"` ValueCoin string `json:"valueCoin"` SerialNo string `json:"serialNo"` } }
SpotLeverageOrdersRecords holds the orders records for leveraged tokens.
type SpotLeverageTokenInfo ¶
type SpotLeverageTokenInfo struct { List []struct { LtCoin string `json:"ltCoin"` LtName string `json:"ltName"` MaxPurchase string `json:"maxPurchase"` MinPurchase string `json:"minPurchase"` MaxPurchaseDaily string `json:"maxPurchaseDaily"` MaxRedeem string `json:"maxRedeem"` MinRedeem string `json:"minRedeem"` MaxRedeemDaily string `json:"maxRedeemDaily"` PurchaseFeeRate string `json:"purchaseFeeRate"` RedeemFeeRate string `json:"redeemFeeRate"` LtStatus string `json:"ltStatus"` FundFee string `json:"fundFee"` FundFeeTime string `json:"fundFeeTime"` // Should parse to time.Time if needed ManageFeeRate string `json:"manageFeeRate"` ManageFeeTime string `json:"manageFeeTime"` // Should parse to time.Time if needed Value string `json:"value"` NetValue string `json:"netValue"` Total string `json:"total"` } }
SpotLeverageTokenInfo holds the information for leveraged tokens.
type SpotLeverageTokenMarket ¶
type SpotLeverageTokenMarket struct { LtCoin string `json:"ltCoin"` Circulation string `json:"circulation"` Basket string `json:"basket"` Leverage string `json:"leverage"` }
SpotLeverageTokenMarket holds the market information for a leveraged token.
type SpotMarginBorrowOrders ¶
type SpotMarginBorrowOrders struct { List []struct { AccountId string `json:"accountId"` // Account ID Coin string `json:"coin"` // Coin name CreatedTime int64 `json:"createdTime"` // Borrow order created timestamp (ms) Id string `json:"id"` // Borrow order ID InterestAmount string `json:"interestAmount"` // Total interest InterestBalance string `json:"interestBalance"` // Outstanding interest LoanAmount string `json:"loanAmount"` // Principal amount LoanBalance string `json:"loanBalance"` // Outstanding principal RemainAmount string `json:"remainAmount"` // Remaining debt = interestBalance + loanBalance Status int `json:"status"` // Status 1: uncleared, 2: cleared Type int `json:"type"` // Order Type 1: manual loan, 2: auto loan } `json:"list"` }
type SpotMarginDataResult ¶
type SpotMarginDataResult struct { VipCoinList []struct { List []struct { Borrowable bool `json:"borrowable"` CollateralRatio string `json:"collateralRatio"` Currency string `json:"currency"` HourlyBorrowRate string `json:"hourlyBorrowRate"` LiquidationOrder string `json:"liquidationOrder"` MarginCollateral bool `json:"marginCollateral"` MaxBorrowingAmount string `json:"maxBorrowingAmount"` } `json:"list"` VipLevel string `json:"vipLevel"` } `json:"vipCoinList"` }
SpotMarginDataResult holds data for spot margin including VIP level specific coin list.
type SpotMarginLeverageResult ¶
type SpotMarginLeverageResult struct {
Leverage string `json:"leverage"`
}
type SpotMarginStateResult ¶
type SpotRepayOrderResult ¶
type SpotRepayOrderResult struct {
RepayId string `json:"repayId"`
}
type SpotToggleMarginResult ¶
type SpotToggleMarginResult struct {
SwitchStatus string `json:"switchStatus"`
}
type SubDepositResult ¶
type SubDepositResult struct { Coin string `json:"coin"` Chains []DepositChainInfo `json:"chains"` }
type SubUidsInfo ¶
type TickerInfo ¶
type TickerInfo struct { Symbol string `json:"symbol"` LastPrice string `json:"lastPrice"` IndexPrice string `json:"indexPrice"` MarkPrice string `json:"markPrice"` PrevPrice24h string `json:"prevPrice24h"` Price24hPcnt string `json:"price24hPcnt"` HighPrice24h string `json:"highPrice24h"` LowPrice24h string `json:"lowPrice24h"` PrevPrice1h string `json:"prevPrice1h"` OpenInterest string `json:"openInterest"` OpenInterestValue string `json:"openInterestValue"` Turnover24h string `json:"turnover24h"` Volume24h string `json:"volume24h"` FundingRate string `json:"fundingRate"` NextFundingTime string `json:"nextFundingTime"` PredictedDeliveryPrice string `json:"predictedDeliveryPrice"` BasisRate string `json:"basisRate"` Basis string `json:"basis"` DeliveryFeeRate string `json:"deliveryFeeRate"` DeliveryTime string `json:"deliveryTime"` Ask1Size string `json:"ask1Size"` Bid1Price string `json:"bid1Price"` Ask1Price string `json:"ask1Price"` Bid1Size string `json:"bid1Size"` }
type TokenInfo ¶
type TokenInfo struct { Token string `json:"token"` ConvertRatioList []ConvertRatio `json:"convertRatioList"` }
type TransactionLogEntry ¶
type TransactionLogEntry struct { Symbol string `json:"symbol"` Category string `json:"category"` Side string `json:"side"` TransactionTime string `json:"transactionTime"` Type string `json:"type"` Qty string `json:"qty"` Size string `json:"size"` Currency string `json:"currency"` TradePrice string `json:"tradePrice"` Funding string `json:"funding"` Fee string `json:"fee"` CashFlow string `json:"cashFlow"` Change string `json:"change"` CashBalance string `json:"cashBalance"` FeeRate string `json:"feeRate"` BonusChange string `json:"bonusChange"` TradeID string `json:"tradeId"` OrderID string `json:"orderId"` OrderLinkId string `json:"orderLinkId"` }
type TransactionLogInfo ¶
type TransactionLogInfo struct { List []TransactionLogEntry `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type TransferDetail ¶
type TransferResult ¶
type TransferResult struct {
TransferId string `json:"transferId"`
}
type USDCSettlementInfo ¶
type USDCSettlementInfo struct { Category string `json:"category"` List []SettlementEntry `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type UnifiedUpdateMsg ¶
type UnifiedUpdateMsg struct {
Msg []string `json:"msg"`
}
type UniversalTransferDetail ¶
type UniversalTransferDetail struct { TransferId string `json:"transferId"` Coin string `json:"coin"` Amount string `json:"amount"` FromMemberId string `json:"fromMemberId"` ToMemberId string `json:"toMemberId"` FromAccountType string `json:"fromAccountType"` ToAccountType string `json:"toAccountType"` Timestamp string `json:"timestamp"` Status string `json:"status"` }
type UniversalTransferInfo ¶
type UniversalTransferInfo struct { List []UniversalTransferDetail `json:"list"` NextPageCursor string `json:"nextPageCursor"` }
type UpgradeUtaInfo ¶
type UpgradeUtaInfo struct { UnifiedUpdateStatus string `json:"unifiedUpdateStatus"` UnifiedUpdateMsg *UnifiedUpdateMsg `json:"unifiedUpdateMsg,omitempty"` }
type UserVolumeInfo ¶
type UserVolumeInfo struct { UID string `json:"uid"` VipLevel string `json:"vipLevel"` TakerVol30Day string `json:"takerVol30Day"` MakerVol30Day string `json:"makerVol30Day"` TradeVol30Day string `json:"tradeVol30Day"` DepositAmount30Day string `json:"depositAmount30Day"` TakerVol365Day string `json:"takerVol365Day"` MakerVol365Day string `json:"makerVol365Day"` TradeVol365Day string `json:"tradeVol365Day"` DepositAmount365Day string `json:"depositAmount365Day"` TotalWalletBalance string `json:"totalWalletBalance"` // This should be an integer value representing a range, not a string. DepositUpdateTime string `json:"depositUpdateTime"` VolUpdateTime string `json:"volUpdateTime"` }
UserVolumeInfo represents the structure for a user's trading and deposit volume information.
type VolatilityData ¶
type WalletAccountInfo ¶
type WalletAccountInfo struct { AccountType string `json:"accountType"` AccountLTV string `json:"accountLTV"` AccountIMRate string `json:"accountIMRate"` AccountMMRate string `json:"accountMMRate"` TotalEquity string `json:"totalEquity"` TotalWalletBalance string `json:"totalWalletBalance"` TotalMarginBalance string `json:"totalMarginBalance"` TotalAvailableBalance string `json:"totalAvailableBalance"` TotalPerpUPL string `json:"totalPerpUPL"` TotalInitialMargin string `json:"totalInitialMargin"` TotalMaintenanceMargin string `json:"totalMaintenanceMargin"` Coins []CoinInfo `json:"coin"` }
type WalletBalanceInfo ¶
type WalletBalanceInfo struct {
List []AccountInfo `json:"list"`
}
type WalletInfo ¶
type WalletInfo struct { Coin string `json:"coin"` WithdrawableAmount string `json:"withdrawableAmount"` AvailableBalance string `json:"availableBalance"` }
WalletInfo represents the wallet information for withdrawable assets.
type WithdrawAssetResult ¶
type WithdrawAssetResult struct {
Id string `json:"id"`
}
type WithdrawRecord ¶
type WithdrawRecord struct { WithdrawID string `json:"withdrawId"` TxID string `json:"txID"` WithdrawType string `json:"withdrawType"` Coin string `json:"coin"` Chain string `json:"chain"` Amount string `json:"amount"` WithdrawFee string `json:"withdrawFee"` Status string `json:"status"` ToAddress string `json:"toAddress"` Tag string `json:"tag"` CreateTime string `json:"createTime"` UpdateTime string `json:"updateTime"` }
WithdrawRecord represents the structure for each withdrawal record.
type WithdrawRecords ¶
type WithdrawRecords struct { Rows []WithdrawRecord `json:"rows"` NextPageCursor string `json:"nextPageCursor"` }
WithdrawRecords represents the structure for withdrawal records.
type WithdrawableAmount ¶
type WithdrawableAmount struct { LimitAmountUsd string `json:"limitAmountUsd"` WithdrawableAmounts []WithdrawableAsset `json:"withdrawableAmount"` }
WithdrawableAmount represents the structure for information about withdrawable amounts.
type WithdrawableAsset ¶
type WithdrawableAsset struct { SPOT *WalletInfo `json:"SPOT,omitempty"` // Omitted if empty FUND *WalletInfo `json:"FUND,omitempty"` // Omitted if empty }
WithdrawableAsset represents the structure for withdrawable amounts for each wallet type.