github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/dex/keeper.md (about) 1 ## 1. tokenPairStoreKey 2 3 KVStoreKey的name是"token_pair" 4 5 | key | value | number(key) | value details | Value size | Clean up | 备注 | 6 | :----------------------: | :----------------------: | :----------: | :-----------------: | :--------: | :----------------------: | :-------------: | 7 | 0x01+$trading_pair | struct x/dex.TokenPair | 币对数 | TokenPair结构体如下 | <1k | 有接口删除上交易所的币对 | 存的交易币对的详细信息 | 8 | "tokenPairNumberKey" | uint64 | 1 | dex运营方在fbexchain发行的币对数量 | <1k | | 存的fbexchain交易币对的数量 | 9 | 0x02+$owner_addr | WithdrawInfo | 在途赎回数 | dex运营方在fbexchain发行的币对数量 | <1k | | 存的fbexchain交易币对的数量 | 10 | 0x03+$trading_pair | product lock | 币对数 | dex运营方在fbexchain发行的币对数量 | <1k | | 存的fbexchain交易币对的数量 | 11 12 tokenPair的value是经过Codec.MustMarshalBinaryBare序列化后的[]byte,tokenPair的结构体如下: 13 14 ```go 15 type TokenPair struct { 16 BaseAssetSymbol string `json:"base_asset_symbol"` // 基础货币 17 QuoteAssetSymbol string `json:"quote_asset_symbol"` // 报价货币 18 InitPrice sdk.Dec `json:"price"` // 价格 19 MaxPriceDigit int64 `json:"max_price_digit"` // 最大交易价格的小数点位数 20 MaxQuantityDigit int64 `json:"max_size_digit"` // 最大交易数量的小数点位数 21 MinQuantity sdk.Dec `json:"min_trade_size"` // 最小交易数量 22 Id uint64 `json:"token_pair_id"` 23 Delisting bool `json:"delisting"` // 该TokenPair是否处于提案下线中 delisting 24 Owner sdk.AccAddress `json:"owner" v2:"owner"` // token的所有者 25 Deposits sdk.DecCoins `json:"deposits"` // 优先撮合成交金 26 } 27 ``` 28 29 30 31 ## Http api 32 33 | Url | Method | 读key | 34 | :--------------: | :----: | :--------------: | 35 | /dex/products | GET | token_pair | 36 | /dex/deposits | GET | token_pair | 37 | /dex/match_order | GET | token_pair | 38 39