Skip to content

Получение текущего баланса кошелька

Запрос:

curl -X GET https://api.creon.ae/wallet \
     -H "Authorization: Bearer <ACCESS_TOKEN>" \
     -H "Content-Type: application/json" \

Разбор ответа:

  • Status 200:

    {
        "assets": [
            {
                "available": 211.550499,
                "currency": {
                    "_id": "ccbfac34-75d1-4fad-ba78-4583f4207ffe",
                    "type": "CRYPTO",
                    "code": "USDT",
                    "symbol": "USDT",
                    "label": "USDT - TRC20",
                    "decimal": 6,
                    "logo": "https://static.tronscan.org/production/logo/usdtlogo.png",
                    "tokenType": "TRC20",
                    "blockchainSymbol": "TRON",
                    "blockchainMetaAlias": "tron_mainnet",
                    "isNative": false,
                    "tokenAddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
                    "addressExplorerUrl": "https://tronscan.io/#/address/%s",
                    "transactionExplorerUrl": "https://tronscan.io/#/transaction/%s",
                    "testnet": false
                },
                "pending": 198.256765,
                "pendingIn": 0,
                "total": 409.807264
            },
            {
                "available": -53302.81,
                "currency": {
                    "_id": "6e65cf3c-c39d-4c5d-9fb0-159a1c054f2d",
                    "type": "FIAT",
                    "code": "RUB",
                    "symbol": "₽",
                    "label": "рубль",
                    "decimal": 2,
                    "countryName": "Russia",
                    "countryCode": "RU"
                },
                "pending": 0,
                "pendingIn": 0,
                "total": -53302.81
            }
        ]
    }
    

    • assets (arr): Список подключенных активов на кошельке;
      • available (number): Доступный баланс;
      • currency (arr): Данные актива;
        • _id (uuid): Идентификатор внутреннего кошелька;
        • type (string): Тип кошелька (crypto/fiat);
        • code (string): ISO-код валюты кошелька;
        • symbol (string): Символ/обозначение валюты;
        • label (string): Полное человекочитаемое название валюты;
        • decimal (int): Поддерживаемое количество знаков после запятой;
        • countryName (string): Англоязычное название страны, к которой привязана валюта;
        • countryCode (string): Двухбуквенный ISO-код страны;
        • logo (string): Ссылка на графический логотип криптовалюты;
        • tokenType (string): Стандарт токена в сети (TRC20, ERC20);
        • blockhainSymbol (string): Название блокчейн-платформы (TRON, Ethereum);
        • blockchainMetaAlias (string): Внутренний идентификатор сети;
        • isNative (bool): Флаг нативной монеты блокчейна. true — для основных монет сети (ETH, TRX), false — для кастомных токенов;
        • tokenAddress (string): Адрес смарт-контракта токена в блокчейне;
        • addressExplorerUrl (string): Шаблон ссылки на блокчейн-эксплорер для проверки адресов;
        • transactionExplorerUrl (string): Шаблон ссылки на блокчейн-эксплорер для проверки транзакций;
        • testnet (bool): Флаг тестовой сети. true — для тестового блокчейна, false — для основной сети (mainnet);
      • pending (number): Заблокированный баланс (исходящий холдинг);
      • pendingIn (number): Ожидаемая сумма к зачислению (входящий холдинг);
      • total (number): Общий баланс. Рассчитывается как available + pending;
  • Status 400: Invalid request, typically due to a missing or malformed parameter.

{
"error": "ERROR_ACCESS_TOKEN_INVALID", 
"message": "Access token is invalid.", 
"statusCode": 400 
}
- `error`: string (required)
- `message`: string (required)
- `statusCode`: number
  • Status 401: Authentication failed. This may happen due to the following reasons:

    • Authentication is required but not provided.
    • The access token has expired.
{
"error": "ERROR_TOKEN_EXPIRED", 
"message": "Access token has expired.", 
"statusCode": 401 
}
- `error`: string (required)
- `message`: string (required)
- `statusCode`: number
  • Status 500: Transaction with specified ID not found.
{
"error": "TRANSACTION_NOT_FOUND", 
"message": "Transaction with specified ID not found.", 
"statusCode": 500 
}
- `error`: string (required)
- `message`: string (required)
- `statusCode`: number