Workspace

Workspace cung cấp góc nhìn tập trung về các hoạt động blockchain của bạn, bao gồm thống kê ví, khối lượng giao dịch, phí mạng và hoạt động smart contract.


Lấy thống kê workspace

GET
/workspaces/{workspace_id}/stats

Truy xuất thống kê và phân tích toàn diện cho một workspace cụ thể, bao gồm khối lượng giao dịch, phí mạng, số lượng ví và hoạt động smart contract.

Tham số đường dẫn

  • Name
    workspace_id
    Type
    string
    Description

    UUID của workspace cần truy xuất thống kê.

Phản hồi

  • Name
    success
    Type
    boolean
    Description

    Cho biết yêu cầu có thành công hay không.

  • Name
    message
    Type
    string
    Description

    Thông báo mô tả kết quả của thao tác.

  • Name
    code
    Type
    integer
    Description

    Mã số cho biết trạng thái kết quả (0 nghĩa là thành công).

  • Name
    data
    Type
    object
    Description

    Chứa thống kê của workspace.

  • Name
    total_value
    Type
    string
    Description

    Tổng giá trị của tất cả tài sản trong workspace (tính bằng USD).

  • Name
    total_wallets
    Type
    integer
    Description

    Tổng số ví trong workspace này.

  • Name
    total_smart_contracts
    Type
    integer
    Description

    Tổng số smart contract được triển khai trong workspace này.

  • Name
    total_pending_transactions
    Type
    integer
    Description

    Số giao dịch hiện đang chờ xử lý.

  • Name
    daily_volume_stats
    Type
    array
    Description

    Mảng thống kê khối lượng giao dịch hằng ngày trong 8 ngày qua.

  • Name
    id
    Type
    object
    Description

    Định danh ngày cho thống kê hằng ngày.

  • Name
    day
    Type
    integer
    Description

    Ngày trong tháng.

  • Name
    month
    Type
    integer
    Description

    Số tháng (1-12).

  • Name
    total
    Type
    string
    Description

    Tổng khối lượng giao dịch trong ngày (tính bằng USD).

  • Name
    total_inflow_usd
    Type
    string
    Description

    Tổng khối lượng giao dịch đến (tính bằng USD).

  • Name
    total_outflow_usd
    Type
    string
    Description

    Tổng khối lượng giao dịch đi (tính bằng USD).

  • Name
    monthly_stats
    Type
    array
    Description

    Mảng thống kê giao dịch hằng tháng.

  • Name
    id
    Type
    object
    Description

    Định danh ngày cho thống kê hằng tháng.

  • Name
    month
    Type
    integer
    Description

    Số tháng (1-12).

  • Name
    year
    Type
    integer
    Description

    Năm.

  • Name
    total_transaction
    Type
    integer
    Description

    Tổng số giao dịch trong tháng.

  • Name
    total_volume
    Type
    string
    Description

    Tổng khối lượng giao dịch trong tháng (tính bằng USD).

  • Name
    monthly_total_fee_spent_per_network
    Type
    array
    Description

    Mảng phí mạng đã chi mỗi tháng, phân theo từng mạng blockchain.

  • Name
    id
    Type
    object
    Description

    Định danh của bản ghi phí.

  • Name
    month
    Type
    integer
    Description

    Số tháng (1-12).

  • Name
    network_id
    Type
    string
    Description

    UUID của mạng blockchain.

  • Name
    year
    Type
    integer
    Description

    Năm.

  • Name
    total_fee_spent
    Type
    string
    Description

    Tổng phí đã chi bằng đồng tiền gốc của mạng lưới.

  • Name
    value
    Type
    string
    Description

    Tổng phí đã chi tính bằng USD.

  • Name
    network
    Type
    object
    Description

    Thông tin chi tiết mạng lưới.

  • Name
    name
    Type
    string
    Description

    Tên của mạng blockchain (ví dụ: "Ethereum", "Solana mainnet", "Base").

  • Name
    native_currency
    Type
    string
    Description

    Ký hiệu đồng tiền gốc của mạng lưới (ví dụ: "ETH", "SOL").

Thống kê khối lượng hằng ngày hiển thị hoạt động giao dịch trong 8 ngày gần nhất, trong khi thống kê hằng tháng cung cấp góc nhìn lịch sử về khối lượng và số lượng giao dịch theo tháng.

Request

GET
/workspaces/{workspace_id}/stats
curl -X GET https://api.fystack.io/api/v1/workspaces/ffb8c9d1-0bd2-4c30-bf4f-2a8fe7710d51/stats \
  -H "ACCESS-API-KEY: your_api_key" \
  -H "ACCESS-TIMESTAMP: 1667836889" \
  -H "ACCESS-SIGN: YourBase64EncodedSignature=="

Response

200
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": {
    "total_value": "1534.84534320254792485502487275776",
    "total_wallets": 39,
    "total_smart_contracts": 0,
    "total_pending_transactions": 0,
    "daily_volume_stats": [
      {
        "id": {
          "day": 16,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 15,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 14,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 13,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 12,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 11,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 10,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      },
      {
        "id": {
          "day": 9,
          "month": 11
        },
        "total": "0",
        "total_inflow_usd": "0",
        "total_outflow_usd": "0"
      }
    ],
    "monthly_stats": [
      {
        "id": {
          "month": 2,
          "year": 2025
        },
        "total_transaction": 1,
        "total_volume": "3.0232548466894343"
      },
      {
        "id": {
          "month": 3,
          "year": 2025
        },
        "total_transaction": 0,
        "total_volume": "0"
      },
      {
        "id": {
          "month": 4,
          "year": 2025
        },
        "total_transaction": 2,
        "total_volume": "5.38689432482736497038665"
      },
      {
        "id": {
          "month": 5,
          "year": 2025
        },
        "total_transaction": 2,
        "total_volume": "3.4820715177482234"
      },
      {
        "id": {
          "month": 6,
          "year": 2025
        },
        "total_transaction": 3,
        "total_volume": "6016.123408531333541256"
      },
      {
        "id": {
          "month": 7,
          "year": 2025
        },
        "total_transaction": 24,
        "total_volume": "716.62394897558719889991228"
      },
      {
        "id": {
          "month": 8,
          "year": 2025
        },
        "total_transaction": 0,
        "total_volume": "0"
      },
      {
        "id": {
          "month": 9,
          "year": 2025
        },
        "total_transaction": 19,
        "total_volume": "61.99795033878070467252234"
      },
      {
        "id": {
          "month": 10,
          "year": 2025
        },
        "total_transaction": 2,
        "total_volume": "10.997992387864311"
      },
      {
        "id": {
          "month": 11,
          "year": 2025
        },
        "total_transaction": 0,
        "total_volume": "0"
      }
    ],
    "monthly_total_fee_spent_per_network": [
      {
        "id": {
          "month": 7,
          "network_id": "ab3553b6-1472-4ee2-bbb7-7a3df71db90d",
          "year": 2025
        },
        "total_fee_spent": "0.000000408265132",
        "value": "0.0012847633534240739867953232",
        "network": {
          "name": "Base",
          "native_currency": "ETH"
        }
      },
      {
        "id": {
          "month": 7,
          "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac",
          "year": 2025
        },
        "total_fee_spent": "0.00004",
        "value": "0.0055775034112016304",
        "network": {
          "name": "Solana mainnet",
          "native_currency": "SOL"
        }
      },
      {
        "id": {
          "month": 6,
          "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac",
          "year": 2025
        },
        "total_fee_spent": "0.000005",
        "value": "0.0006971879264002038",
        "network": {
          "name": "Solana mainnet",
          "native_currency": "SOL"
        }
      },
      {
        "id": {
          "month": 4,
          "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac",
          "year": 2025
        },
        "total_fee_spent": "0.00001",
        "value": "0.0013943758528004076",
        "network": {
          "name": "Solana mainnet",
          "native_currency": "SOL"
        }
      },
      {
        "id": {
          "month": 6,
          "network_id": "dd21bfb5-f809-4070-a789-18ec8abbee1b",
          "year": 2025
        },
        "total_fee_spent": "0.0001131949830806",
        "value": "0.35621157589674587496249666856",
        "network": {
          "name": "Ethereum",
          "native_currency": "ETH"
        }
      },
      {
        "id": {
          "month": 2,
          "network_id": "dd21bfb5-f809-4070-a789-18ec8abbee1b",
          "year": 2025
        },
        "total_fee_spent": "0.0000294725852381",
        "value": "0.09274683159711570977946276556",
        "network": {
          "name": "Ethereum",
          "native_currency": "ETH"
        }
      },
      {
        "id": {
          "month": 9,
          "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac",
          "year": 2025
        },
        "total_fee_spent": "0.00001",
        "value": "0.0013943758528004076",
        "network": {
          "name": "Solana mainnet",
          "native_currency": "SOL"
        }
      },
      {
        "id": {
          "month": 5,
          "network_id": "8ae1f43f-d428-484d-8ad4-ee9ccc65a9ac",
          "year": 2025
        },
        "total_fee_spent": "0.00001",
        "value": "0.0013943758528004076",
        "network": {
          "name": "Solana mainnet",
          "native_currency": "SOL"
        }
      },
      {
        "id": {
          "month": 6,
          "network_id": "ab3553b6-1472-4ee2-bbb7-7a3df71db90d",
          "year": 2025
        },
        "total_fee_spent": "0.000000012727953",
        "value": "0.0000400534023035403443967228",
        "network": {
          "name": "Base",
          "native_currency": "ETH"
        }
      }
    ]
  }
}

Lấy số dư workspace theo ký hiệu

GET
/workspaces/{workspace_id}/balances

Truy vấn số dư workspace được lọc theo một hoặc nhiều ký hiệu tài sản. Endpoint này tổng hợp số dư trên tất cả các mạng lưới cho các ký hiệu được chỉ định, cung cấp góc nhìn hợp nhất về tài sản đang nắm giữ.

Tham số đường dẫn

  • Name
    workspace_id
    Type
    string
    Description

    UUID của workspace cần truy xuất số dư.

Tham số truy vấn

  • Name
    symbol
    Type
    string
    Description

    Ký hiệu tài sản dùng để lọc (ví dụ: USDC, SOL, ETH). Có thể chỉ định nhiều lần để truy vấn nhiều ký hiệu: ?symbol=USDC&symbol=SOL&symbol=ETH

Phản hồi

  • Name
    success
    Type
    boolean
    Description

    Cho biết yêu cầu có thành công hay không.

  • Name
    message
    Type
    string
    Description

    Thông báo mô tả kết quả của thao tác.

  • Name
    code
    Type
    integer
    Description

    Mã số cho biết trạng thái kết quả (0 nghĩa là thành công).

  • Name
    data
    Type
    array
    Description

    Mảng thông tin số dư được nhóm theo ký hiệu.

  • Name
    symbol
    Type
    string
    Description

    Ký hiệu tài sản (ví dụ: "USDC", "SOL", "ETH").

  • Name
    total_balance
    Type
    string
    Description

    Tổng số dư của tài sản trên tất cả các mạng lưới.

  • Name
    total_value_usd
    Type
    string
    Description

    Tổng giá trị của tài sản tính bằng USD.

  • Name
    total_wallet_count
    Type
    integer
    Description

    Tổng số ví đang nắm giữ tài sản này.

  • Name
    networks
    Type
    array
    Description

    Mảng thông tin số dư theo từng mạng lưới.

  • Name
    asset_id
    Type
    string
    Description

    UUID của tài sản.

  • Name
    asset_name
    Type
    string
    Description

    Tên của tài sản (ví dụ: "USDC Sepolia test").

  • Name
    asset_logo
    Type
    string
    Description

    URL hình ảnh logo của tài sản.

  • Name
    network_id
    Type
    string
    Description

    UUID của mạng blockchain.

  • Name
    network_name
    Type
    string
    Description

    Tên của mạng blockchain (ví dụ: "Sepolia Ethereum Testnet", "Solana devnet").

  • Name
    network_logo
    Type
    string
    Description

    URL hình ảnh logo của mạng lưới.

  • Name
    balance
    Type
    string
    Description

    Số dư của tài sản trên mạng lưới cụ thể này.

  • Name
    wallet_count
    Type
    integer
    Description

    Số ví đang nắm giữ tài sản này trên mạng lưới này.

Bạn có thể truy vấn nhiều ký hiệu trong một yêu cầu bằng cách lặp lại tham số symbol. Phản hồi nhóm số dư theo ký hiệu và hiển thị sự phân bố trên các mạng lưới khác nhau.

Request

GET
/workspaces/{workspace_id}/balances
curl -X GET "https://api.fystack.io/api/v1/workspaces/ffb8c9d1-0bd2-4c30-bf4f-2a8fe7710d51/balances?symbol=USDC&symbol=SOL" \
  -H "ACCESS-API-KEY: your_api_key" \
  -H "ACCESS-TIMESTAMP: 1667836889" \
  -H "ACCESS-SIGN: YourBase64EncodedSignature=="

Response

200
{
  "success": true,
  "message": "success",
  "code": 0,
  "data": [
    {
      "symbol": "SOL",
      "total_balance": "0.22379716",
      "total_value_usd": "29.8080102529293016511548",
      "total_wallet_count": 7,
      "networks": [
        {
          "asset_id": "d10f85c1-a89d-439f-b488-57cd06b064d5",
          "asset_name": "Solana dev net",
          "asset_logo": "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
          "network_id": "2e89cd02-8585-47b3-90e3-a92185f6ca5f",
          "network_name": "Solana devnet",
          "network_logo": "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
          "balance": "0.22379716",
          "wallet_count": 7
        }
      ]
    },
    {
      "symbol": "USDC",
      "total_balance": "36515.008265",
      "total_value_usd": "36510.1973390962088334367595",
      "total_wallet_count": 25,
      "networks": [
        {
          "asset_id": "f1be472d-1338-43ff-b547-06faba7ecce7",
          "asset_name": "USDC Sepolia test",
          "asset_logo": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
          "network_id": "23d13c03-1f3c-4e2a-9aef-1771a244b7f6",
          "network_name": "Sepolia Ethereum Testnet",
          "network_logo": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR-lzp6jMVVHdxHiK4q5Xy2FbJIrC-GPmTREA&s",
          "balance": "33426.996114",
          "wallet_count": 16
        },
        {
          "asset_id": "af836c8e-3199-426d-bb00-17ae3a5c2f5a",
          "asset_name": "USDC-Test",
          "asset_logo": "https://s2.coinmarketcap.com/static/img/coins/64x64/3408.png",
          "network_id": "2e89cd02-8585-47b3-90e3-a92185f6ca5f",
          "network_name": "Solana devnet",
          "network_logo": "https://upload.wikimedia.org/wikipedia/en/b/b9/Solana_logo.png",
          "balance": "35.012151",
          "wallet_count": 5
        },
        {
          "asset_id": "60cd62ac-f100-42aa-a16e-d1a8ed28e39f",
          "asset_name": "USDC( Tron testnet)",
          "asset_logo": "https://assets-cdn.trustwallet.com/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
          "network_id": "c5725221-fa98-4d6c-a6ca-8c5cd65cd884",
          "network_name": "Tron testnet",
          "network_logo": "https://s2.coinmarketcap.com/static/img/coins/64x64/1958.png",
          "balance": "3053",
          "wallet_count": 4
        }
      ]
    }
  ]
}