blockchain/internal/domain/entity/symbol.go

38 lines
3.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package entity
// Symbol 代表交易對資訊
type Symbol struct {
Symbol string `json:"symbol"` // 交易對名稱 BTCUSDT
Status string `json:"status"` // 狀態(如 "TRADING" 表示可交易)
BaseAsset string `json:"base_asset"` // 主幣種(如 BTCUSDT 的 BTC
BaseAssetPrecision int `json:"base_asset_precision"` // 主幣的小數點精度
QuoteAsset string `json:"quote_asset"` // 報價幣種(如 BTCUSDT 的 USDT
QuoteAssetPrecision int `json:"quote_asset_precision"` // 報價資產顯示的小數位數
}
func (s *Symbol) TableName() string {
return "symbol"
}
// Symbol 這個是幣安的
// type Symbol struct {
// Symbol string `json:"symbol"` // 交易對名稱(如 "BTCUSDT"
// Status string `json:"status"` // 狀態(如 "TRADING" 表示可交易)
// BaseAsset string `json:"baseAsset"` // 主幣種(如 BTCUSDT 的 BTC
// BaseAssetPrecision int `json:"baseAssetPrecision"` // 主幣的小數點精度
// QuoteAsset string `json:"quoteAsset"` // 報價幣種(如 BTCUSDT 的 USDT
// QuotePrecision int `json:"quotePrecision"` // 報價幣的小數點精度
// QuoteAssetPrecision int `json:"quoteAssetPrecision"` // 報價資產顯示的小數位數
// BaseCommissionPrecision int32 `json:"baseCommissionPrecision"` // 主幣手續費精度
// QuoteCommissionPrecision int32 `json:"quoteCommissionPrecision"` // 報價幣手續費精度
// OrderTypes []string `json:"orderTypes"` // 支援的下單類型(如 "LIMIT", "MARKET", "STOP_LOSS" 等)
// IcebergAllowed bool `json:"icebergAllowed"` // 是否允許冰山單
// OcoAllowed bool `json:"ocoAllowed"` // 是否允許 OCO 單(條件單組合)
// QuoteOrderQtyMarketAllowed bool `json:"quoteOrderQtyMarketAllowed"` // 市價單是否可直接輸入報價幣金額
// IsSpotTradingAllowed bool `json:"isSpotTradingAllowed"` // 是否允許現貨交易
// IsMarginTradingAllowed bool `json:"isMarginTradingAllowed"` // 是否允許槓桿/融資交易
// Filters []map[string]interface{} `json:"filters"` // 下單限制規則(如最小下單量、價格間隔等)
// Permissions []string `json:"permissions"` // 可用權限(如 "SPOT", "MARGIN"
// PermissionSets [][]string `json:"permissionSets"` // 權限組合(通常不常用)
//}