initfmfijirfri
This commit is contained in:
@@ -896,6 +896,83 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"TokenListEntry": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"chain",
|
||||
"symbol",
|
||||
"name",
|
||||
"contract"
|
||||
],
|
||||
"properties": {
|
||||
"chain": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ETH",
|
||||
"BSC",
|
||||
"BTC",
|
||||
"TRX",
|
||||
"SOL"
|
||||
],
|
||||
"example": "ETH"
|
||||
},
|
||||
"symbol": {
|
||||
"type": "string",
|
||||
"example": "USDT"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Tether USD"
|
||||
},
|
||||
"contract": {
|
||||
"type": "string",
|
||||
"nullable": true,
|
||||
"description": "Contract address (EVM 0x..., TRX T..., SOL base58 mint). Для native = null.",
|
||||
"example": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
|
||||
}
|
||||
}
|
||||
},
|
||||
"TokensListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"success": {
|
||||
"type": "boolean",
|
||||
"example": true
|
||||
},
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TokenListEntry"
|
||||
},
|
||||
"example": [
|
||||
{
|
||||
"chain": "ETH",
|
||||
"symbol": "ETH",
|
||||
"name": "Ethereum",
|
||||
"contract": null
|
||||
},
|
||||
{
|
||||
"chain": "ETH",
|
||||
"symbol": "USDT",
|
||||
"name": "Tether USD",
|
||||
"contract": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
|
||||
},
|
||||
{
|
||||
"chain": "BSC",
|
||||
"symbol": "BNB",
|
||||
"name": "BNB",
|
||||
"contract": null
|
||||
},
|
||||
{
|
||||
"chain": "TRX",
|
||||
"symbol": "USDT",
|
||||
"name": "Tether USD",
|
||||
"contract": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2643,6 +2720,48 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/tokens": {
|
||||
"get": {
|
||||
"summary": "List all known token contracts across all chains",
|
||||
"description": "Возвращает flat-list всех известных активов: native coins + tokens (ERC-20/BEP-20/TRC-20/SPL).\n\nИсточник — статический token-registry. Read-only, без RPC calls, без user-specific data.\n\nOptional ?chain=ETH|BSC|BTC|TRX|SOL — filter по одной сети.",
|
||||
"tags": [
|
||||
"Tokens"
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "chain",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ETH",
|
||||
"BSC",
|
||||
"BTC",
|
||||
"TRX",
|
||||
"SOL"
|
||||
]
|
||||
},
|
||||
"description": "Если задан — вернёт только active assets этой сети (1 native + N tokens)."
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Token list",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TokensListResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid chain parameter"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user