【发布时间】:2021-10-20 11:41:18
【问题描述】:
我已将 Binance API 集成到我的项目中,以显示所有支持的符号及其对应图标的列表。但是,我无法获取符号 name/description。
例如,我可以获取 BTC-EUR,但无法通过公共端点获取“比特币”或类似内容。至少,到目前为止我还没有找到端点。
目前,我在/sapi/v1/margin/allAssets 使用私有端点(在身份验证之后)。这将返回每个符号的 name/description,但正如您可以想象的那样,我想防止在获取 public 信息时使用私有 API 令牌
{
"assetFullName": "Bitcoin", <----- This is what I'm looking on a public endpoint
"assetName": "BTC",
"isBorrowable": true,
"isMortgageable": true,
"userMinBorrow": "0.00000000",
"userMinRepay": "0.00000000"
}
那么,我的问题是是否有公共端点可用于获取相同的信息?现在,我正在使用端点/api/v3/exchangeInfo 来检索交易所上的可用符号,但是此响应中没有符号的name/description...
"symbols": [
{
"symbol": "ETHBTC",
"status": "TRADING",
"baseAsset": "ETH",
"baseAssetPrecision": 8,
"quoteAsset": "BTC",
"quotePrecision": 8,
"quoteAssetPrecision": 8,
"orderTypes": [
"LIMIT",
"LIMIT_MAKER",
"MARKET",
"STOP_LOSS",
"STOP_LOSS_LIMIT",
"TAKE_PROFIT",
"TAKE_PROFIT_LIMIT"
],
"icebergAllowed": true,
"ocoAllowed": true,
"isSpotTradingAllowed": true,
"isMarginTradingAllowed": true,
"filters": [
//These are defined in the Filters section.
//All filters are optional
],
"permissions": [
"SPOT",
"MARGIN"
]
}
]
我已经查找了有关列出 assets 的公共端点,因为这通常是其他交易所返回此信息的命名空间,但我在 documentation of the Binance API 中找不到这样的端点
【问题讨论】:
-
stackoverflow.com/questions/55549499/… - 这个问题有几个解决方案
-
@MikeK.Shum 这不是我要找的吗?我正在寻找资产名称(例如比特币),而不是市场对(例如 BTCEUR)。此信息可用,我缺少公共 API 端点上的资产名称
-
是的,这肯定没有端点。我们通过缓存 /exchangeInfo 方法的结果解决了这个问题。符号上有 baseAsset 和 quoteAsset。
-
@MikeK.Shum 我想我们在这里谈论的是不同的事情..?缓存与不包含所需信息的结果集有什么关系?
标签: api binance binance-api-client