Skip to content

GraphQL API Overview

The Agio Platform API is a GraphQL API built with Apollo Server that provides access to all platform operations including portfolio management, trading, KYC, and fund administration.

Endpoint

POST https://api.agiodigital.com/graphql

All requests must include the X-API-Key header. See Authentication for details.

Schema Overview

The API is organized into the following domains:

Portfolio & Wallets

Query portfolio data, wallet balances, and asset allocations.

OperationTypeDescription
digitalWalletSummaryByIdQueryGet wallet summary with balance and assets
digitalWalletDetailByIdQueryGet detailed wallet info including transactions
netWorthUsdByUserIdQueryCalculate total net worth for a user
netWorthUsdByOrganizationIdQueryCalculate total net worth for an organization
digitalAssetsByUserIdQueryList all digital assets for a user
digitalAssetsByOrganizationIdQueryList all digital assets for an organization
coinPriceQueryGet current price for a coin symbol

Wallet Management

Create and manage digital wallets.

OperationTypeDescription
createDigitalWalletMutationCreate a new digital wallet
createDigitalWalletAddressMutationGenerate a new address for a wallet
addDigitalWalletWhitelistEntryMutationAdd address to wallet whitelist
removeDigitalWalletWhitelistEntryMutationRemove address from whitelist
runDigitalWalletAmlReportMutationRun AML report on wallet

Trading & OTC

Request quotes and execute trades.

OperationTypeDescription
requestOtcQuoteMutationRequest an OTC quote
calculateOtcQuoteMutationCalculate quote without committing
refreshOtcQuoteMutationRefresh an existing quote
requestOtcTradeMutationExecute an OTC trade
requestQuotesMutationGet quotes from multiple exchanges

KYC & Compliance

Access KYC profiles and compliance data.

OperationTypeDescription
getPotentialKycProfilesQueryGet KYC profiles for a user
sumsubQuestionnaireDataDecryptedQueryGet decrypted questionnaire data

Fund Administration

Manage fund subscriptions and redemptions.

OperationTypeDescription
cancelFundSubscriptionMutationCancel a fund subscription
cancelFundRedemptionMutationCancel a fund redemption
synchronizeEnzymeVaultsMutationSync data with Enzyme Finance

Documents & PDFs

Generate documents and reports.

OperationTypeDescription
generateFundUserAgreementPdfMutationGenerate fund agreement PDF
downloadFundInvestorCapitalStatementPdfMutationGenerate capital statement
downloadInvoicePdfMutationGenerate invoice PDF
downloadQuotePdfMutationGenerate quote PDF

BitGo Integration

Manage BitGo wallet operations.

OperationTypeDescription
bitgoSendTransactionMutationSend a BitGo transaction
bitgoResolveApprovalMutationApprove/reject pending transaction
bitgoSyncWalletTransactionsMutationSync wallet transactions

Quick Start Example

Here's a simple query to test your connection:

graphql
query Ping {
  ping
}

Expected response:

json
{
  "data": {
    "ping": "pong"
  }
}

Query Example: Portfolio Summary

graphql
query GetPortfolioSummary($userId: String!) {
  netWorthUsdByUserId(userId: $userId)
  digitalAssetsByUserId(userId: $userId, limit: 10) {
    name
    symbol
    usdValue
    unitPriceUsd
  }
}

Variables:

json
{
  "userId": "auth0|abc123"
}

Mutation Example: Request OTC Quote

graphql
mutation RequestQuote($input: RequestOtcQuoteInput!) {
  requestOtcQuote(input: $input) {
    id
    fromCurrency
    toCurrency
    quoteSize
    quoteFeePerc
    expiresAt
  }
}

Variables:

json
{
  "input": {
    "fromCurrency": "BTC",
    "toCurrency": "USD",
    "size": 1.5,
    "side": "SELL"
  }
}

Caching

Many queries support a refresh parameter to bypass caching:

graphql
query GetWallet($id: Int!) {
  digitalWalletSummaryById(id: $id, refresh: true) {
    label
    usdValue
    assets {
      symbol
      value
    }
  }
}

Cache control directives:

  • Most queries cache for 30 seconds by default
  • Use refresh: true for real-time data
  • Some aggregations cache for 2 minutes

Pagination

List queries support limit and offset parameters:

graphql
query GetAssets($userId: String!, $limit: Int, $offset: Int) {
  digitalAssetsByUserId(userId: $userId, limit: $limit, offset: $offset) {
    name
    symbol
    usdValue
  }
}

Subscriptions

Real-time data is available via GraphQL subscriptions:

graphql
subscription OrderBookUpdates($productIds: [String!]) {
  orderBookUpdates(productIds: $productIds) {
    productId
    bids {
      price
      size
    }
    asks {
      price
      size
    }
  }
}

Next Steps

GraphQL API Overview has loaded