Spydra Docs
For Developers
Spydra Platform
Spydra Platform
  • GETTING STARTED
    • Introduction
    • Why Spydra?
    • Blockchain fundamentals
      • Why Blockchain?
      • Private Blockchain
      • Public Chain
    • 🎧Getting started with a Private Network
      • Creating an account
      • Creating an organization
      • Creating a Network
      • Apps
    • 🔊Getting started with a Token Store on Public Chain
      • Token store
      • Customise token store front
      • List a real world asset and issue tokens
      • Manage token lifecycle
    • Intro to Hyperledger Fabric
  • Products Overview
    • 🎧Private Network
      • Organizations
        • Users and Organizations
        • Organisation Hosting - Spydra Hosted and BYOC
        • Organization Statuses
        • Organization Roles & Permissions
        • Organization Dashboard
        • Organization Entities
      • Networks
        • Network Statuses
        • Network Roles & Permissions
        • Network Configurations
        • Mandatory Card Addition
        • Nodes: Peer, Orderer & CA
        • Network Hosting Type
        • Network Dashboard
        • Network Operations
        • Nodes
      • Channels
      • Apps
        • Pre-Configured Apps
        • Custom Apps
      • Asset Tokenization
        • Use cases
        • Asset types
        • References
        • Asset Owners
        • Permissions
      • Tokens & Vault
      • Listeners
        • Network Listeners
        • App Listeners
        • Token Listeners
      • Workflow Builder
      • Oracles
      • GraphQL
      • Block Explorer
      • IPFS
      • Fabric Debug Plugin
    • 🔊Public Chain
      • Token Store
      • Tokenize Real World Assets
      • Tokenomics: Token & Token Sale
      • Trade & Payout
  • How to
    • 🎧Private Network
      • Account
        • Create an Account
        • Edit Profile details
        • Update email & Password
        • Forgot password
        • Google OAuth Signup - Update Email & Password
        • Deactivating or deleting your account?
      • Organizations
        • Create an Organization
        • Create & Manage BYOC Hosting
        • Invite members to an organisation
        • Edit Organization details
        • Manage Org members
        • Leave an Organization
        • Update Organization member roles
        • Pay Organisation Invoice
        • Update Billing Address
        • View Invoices
        • Organization Dashboard
        • Delete an Organisation
      • Networks
        • Create a Network
        • Advance Settings: Key Vault Store
        • View and edit Network details
          • Update Permissions for Network Members
          • Update Network Configuration
          • Update Key Vault
          • Manage API Keys
          • Delete a network
        • Inviting an organisation to a Network
        • Network Roles & Permissions
        • Joining a Network
        • Network Dashboard
      • Apps
        • Explore Apps
        • Deploy App
          • Deploying Asset Tokenization App
        • Manage Apps
        • Application Dashboard
      • Channels
        • Creating a Channel
        • Create a Consensus Policy
        • Update Channel
        • Channel Members
        • Delete channel
      • Nodes
        • Create Node
        • Node Dashboard
        • Delete Node
      • Pre-configured Apps
        • Deploy Asset Tokenization App
        • Asset Data
      • Custom Apps
        • Deploy Custom Chaincode
        • Chaincode as external service
        • Supported File Formats - ZIP format
        • Building in Binary format
          • Golang - Binary Format
          • Java Jar files
        • Chaincode Logs
      • Workflow
        • Triggers
        • Condition
        • Read
        • Actions
        • End
        • Variables & Identifiers
        • Calculations & Formulas
      • Oracles
        • Create an Oracle
        • Oracle with Asset tokenisation
        • Oracle with Custom Chaincode
      • Listeners
        • Create a Listener
        • Manage Listeners
    • 🔊Public Chain
      • Account
        • Create an Account
        • Edit Profile details
        • Update email & Password
        • Forgot password
        • Google OAuth Signup - Update Email & Password
        • Deactivating or deleting your account?
      • Token Store
        • Create a Token Store
        • Design Store Front
        • Custom Domain Hosting
        • Google Analytics Integration
        • Create & Manage Store Users
          • Store User KYC
        • Accreditation Management
        • Store Payments
        • Token Store Customers
      • Tokenise a Real World Asset
        • Real Estate
        • Other Asset Categories
      • Create a token
        • Define your token
        • Investor & Buyback Settings
        • Configure token returns & payouts
        • Create token sale
      • Additional Configurations
        • Create a Document Workflow
      • Publish Asset
      • Tokenise on TestNet
        • Polygon Amoy
      • Manage Token lifecycle
        • Returns & Payouts
          • Initiate an equity payout
          • Authorise Debt Payouts
          • View all payouts
        • View token investors
        • View token transactions
        • View signed documents
        • View/ Create a token sale
        • Post Token Updates
        • Update Price
        • Buyback Requests
  • Billing & Pricing
    • Pricing
    • Billing
      • Opt-in Billing
      • Opt-out Billing
    • Adding a Card & Autopay
    • Invoice Payments
    • Billing forecast
    • Unpaid Invoices
    • Credits
  • Developers
    • API Reference
      • Asset Tokenization
        • REST API
        • Testing REST API
        • GraphQL
          • Quickstart
          • Simple queries
          • Nested object queries
          • Complex queries
          • Aggregate queries
          • Operators
          • Built-in attributes
          • Pagination
      • Custom Chaincode
        • REST API
        • Testing REST API
        • GraphQL
          • Quickstart
          • Simple queries
          • Complex queries
          • Operators
          • Pagination
      • Token Store (Public Chain)
        • Token Issuer
        • Investor
      • IPFS
    • Developer Tools
      • Monitoring [Coming Soon]
    • API Key
  • Support
    • FAQs
    • My account is banned [D]
    • Why is it recommended to have an Odd number of Orderer nodes on a Network?
    • Support
  • Others
    • Glossary
  • Policies
    • Terms & Conditions
    • Privacy Policies
    • Open Spydra
Powered by GitBook
On this page

Was this helpful?

  1. Developers
  2. API Reference
  3. Token Store (Public Chain)

Investor

PreviousToken IssuerNextIPFS

Last updated 2 months ago

Was this helpful?

Token Sales


Investment Portfolio


Payouts


KYC

Retrieve details of a specific token sale

get

This endpoint fetches detailed information about a specific token sale identified by its ID. It includes comprehensive details such as the sale's name, description, token count, and associated documents. This is crucial for investors and administrators who need in-depth information about a particular token sale.

Authorizations
Path parameters
tokenSaleIdstringRequired

Token sale ID

Responses
200
Token sale retrieved successfully
application/json
Responseall of
get
GET /api/v/1/token-sales/{tokenSaleId} HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
200

Token sale retrieved successfully

{
  "status": 0,
  "response": {
    "sale": {
      "id": "text",
      "tokenId": "text",
      "tokenName": "text",
      "tokenSymbol": "text",
      "name": "text",
      "description": "text",
      "startDate": "2025-05-25T01:18:15.743Z",
      "endDate": "2025-05-25T01:18:15.743Z",
      "payoutStartDate": "2025-05-25T01:18:15.743Z",
      "tokenCountOnSale": 1,
      "images": [
        {
          "name": "text",
          "size": 1,
          "type": "text",
          "url": "text"
        }
      ],
      "documents": [
        {
          "id": "text",
          "name": "text",
          "size": 1,
          "type": "text",
          "url": "text",
          "title": "text",
          "description": "text",
          "order": 1
        }
      ],
      "softCap": 1,
      "timezone": "text",
      "expectedReturns": 1,
      "totalSoldTokens": 1,
      "percentageTokenSold": 1,
      "createdAt": "2025-05-25T01:18:15.743Z",
      "updatedAt": "2025-05-25T01:18:15.743Z"
    }
  }
}

Retrieve investments by user ID

get

This endpoint fetches a list of investments made by a specific user. It includes details about the tokens held, transaction history, and pagination options. This is crucial for users to track their investment portfolio and performance.

Authorizations
Query parameters
pageintegerOptional

Page number for pagination

limitintegerOptional

Number of items per page

Responses
200
Investments retrieved successfully
application/json
Responseall of
401
Unauthorized User
application/json
get
GET /api/v/1/investments/user/tokens HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
{
  "status": 0,
  "response": {
    "tokens": [
      {
        "id": "text",
        "tokenId": "text",
        "assetId": "text",
        "icon": "text",
        "name": "text",
        "symbol": "text",
        "assetName": "text",
        "assetCategoryText": "text",
        "investmentTypeText": "text",
        "propertyTypeText": "text",
        "title": "text",
        "currency": "text",
        "requiresTokenBuyBack": 1,
        "tokenPrice": 1,
        "totalInvestment": 1,
        "totalInvestmentWithCurrency": "text",
        "tokenCount": 1,
        "totalTokenCount": 1,
        "pendingTokenCount": 1,
        "burnTokenCount": 1,
        "tokenPercentage": 1,
        "badges": [
          {
            "title": "text",
            "value": "text"
          }
        ],
        "softCaps": [
          {
            "amountToBeInvested": 1,
            "cap": 1,
            "saleEndDate": "text",
            "saleId": "text",
            "status": 1,
            "saleName": "text",
            "subscriptionCount": 1,
            "subscriptionPercentage": 1,
            "supply": 1
          }
        ]
      }
    ],
    "metaData": {
      "totalInvestment": "text",
      "tokenHoldings": 1,
      "currency": "text"
    }
  },
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalPages": 1,
    "totalItems": 1
  }
}

Retrieve transactions for a user by token ID

get

This endpoint provides a list of transactions for a specific user and token. It includes transaction types, status, and pagination options. This is useful for users to monitor their transaction history and investment activities.

Authorizations
Path parameters
tokenIdstringRequired
Query parameters
pageintegerOptional

Page number for pagination

limitintegerOptional

Number of items per page

Responses
200
Investments retrieved successfully
application/json
Responseall of
401
Unauthorized User
application/json
get
GET /api/v/1/investments/user/tokens/{tokenId}/transactions HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
{
  "status": 0,
  "response": {
    "transactions": [
      {
        "id": "text",
        "explorerUrl": "text",
        "type": "text",
        "principalExplorerUrl": "text",
        "txnDate": "text",
        "amount": 1,
        "principalAmount": 1,
        "burnAmount": 1,
        "interestAmount": 1,
        "delayedInterestAmount": 1,
        "pricePerToken": 1,
        "total": 1,
        "fromWallet": "text",
        "toWallet": "text",
        "fromWalletAddress": "text",
        "toWalletAddress": "text",
        "tokenSaleName": "text",
        "tokenSaleId": "text",
        "payoutId": "text",
        "payoutName": "text",
        "status": 1,
        "tokenId": "text",
        "tokenName": "text",
        "tokenSymbol": "text",
        "tokenIcon": "text",
        "assetId": "text",
        "assetName": "text",
        "payoutDocuments": [],
        "usdTotalValue": "text",
        "totalValue": "text",
        "tokenCount": 1,
        "soldTokens": 1,
        "usdTokenValue": 1,
        "tokenValue": 1,
        "currency": "text",
        "tokenAddress": "text",
        "tokenAddressUrl": "text"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalPages": 1,
    "totalItems": 1
  }
}

Retrieve all transactions for a user

get

This endpoint returns a comprehensive list of all transactions made by a user. It includes transaction details such as types, status, and pagination options. This is essential for users to have a complete view of their financial activities on the platform.

Authorizations
Query parameters
pageintegerOptional

Page number for pagination

limitintegerOptional

Number of items per page

Responses
200
Transactions retrieved successfully
application/json
Responseall of
401
Unauthorized User
application/json
get
GET /api/v/1/investments/user/transactions HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
{
  "status": 0,
  "response": {
    "transactions": [
      {
        "id": "text",
        "explorerUrl": "text",
        "type": "text",
        "principalExplorerUrl": "text",
        "txnDate": "text",
        "amount": 1,
        "principalAmount": 1,
        "burnAmount": 1,
        "interestAmount": 1,
        "delayedInterestAmount": 1,
        "pricePerToken": 1,
        "total": 1,
        "fromWallet": "text",
        "toWallet": "text",
        "fromWalletAddress": "text",
        "toWalletAddress": "text",
        "tokenSaleName": "text",
        "tokenSaleId": "text",
        "payoutId": "text",
        "payoutName": "text",
        "status": 1,
        "tokenId": "text",
        "tokenName": "text",
        "tokenSymbol": "text",
        "tokenIcon": "text",
        "assetId": "text",
        "assetName": "text",
        "payoutDocuments": [],
        "usdTotalValue": "text",
        "totalValue": "text",
        "tokenCount": 1,
        "soldTokens": 1,
        "usdTokenValue": 1,
        "tokenValue": 1,
        "currency": "text",
        "tokenAddress": "text",
        "tokenAddressUrl": "text"
      }
    ]
  },
  "pagination": {
    "page": 1,
    "limit": 1,
    "totalPages": 1,
    "totalItems": 1
  }
}

Retrieve payout schedule for a debt token sale

get

This endpoint returns the payout schedule for a specific debt token sale. It includes details such as principal, interest, and total amounts. This is essential for investors to plan and anticipate payout activities related to a token sale.

Authorizations
Path parameters
storeIdstringRequired

Identifier of the store

tokenIdstringRequired

Identifier of the token

tokenSaleIdstringRequired

Identifier of the token sale

Query parameters
quantitynumberOptional

Quantity of the token sale

datestringOptional

Date of purchase

timezonestringOptional

Timezone of the user

Responses
200
Schedule retrieved successfully
application/json
Responseall of
401
Unauthorized User
application/json
get
GET /api/v/1/payouts/{storeId}/token/{tokenId}/sale/{tokenSaleId}/schedule HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
{
  "status": 0,
  "response": {
    "schedules": [
      {
        "totalAmount": 1,
        "principal": 1,
        "interestAmount": 1,
        "principalPercentage": 1,
        "interestPercentage": 1,
        "pointsDifference": 1,
        "interestIncurred": 1,
        "burnAmount": 1,
        "payoutName": "text",
        "payoutDate": "text",
        "frequencyType": "text",
        "index": 1
      }
    ],
    "totalPrincipal": 1,
    "totalInterest": 1,
    "totalAmount": 1
  }
}

Retrieve payout schedule for a token

get

This endpoint provides the payout schedule for a specific token, including principal and interest amounts. It is useful for investors to understand the timing and amounts of future payouts.

Authorizations
Path parameters
storeIdstringRequired

Identifier of the store

tokenIdstringRequired

Identifier of the token

Query parameters
quantitynumberOptional

Quantity of the token

datestringOptional

Date of purchase

timezonestringOptional

Timezone of the user

Responses
200
Schedule retrieved successfully
application/json
Responseall of
401
Unauthorized User
application/json
get
GET /api/v/1/payouts/{storeId}/token/{tokenId}/schedule HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
{
  "status": 0,
  "response": {
    "schedules": [
      {
        "totalAmount": 1,
        "principal": 1,
        "interestAmount": 1,
        "principalPercentage": 1,
        "interestPercentage": 1,
        "pointsDifference": 1,
        "interestIncurred": 1,
        "burnAmount": 1,
        "payoutName": "text",
        "payoutDate": "text",
        "frequencyType": "text",
        "index": 1
      }
    ],
    "totalPrincipal": 1,
    "totalInterest": 1,
    "totalAmount": 1
  }
}

Retrieve contract addresses for token minting

get

This endpoint provides the necessary contract addresses required for minting a specific token. It includes addresses for token and sale contracts, which are crucial for the tokenization process. This information is vital for developers and administrators managing token minting operations.

Authorizations
Path parameters
tokenIdstringRequired

Token identifier

Responses
200
Contract addresses retrieved successfully
application/json
get
GET /api/v/1/config/contract-addresses/{tokenId} HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
200

Contract addresses retrieved successfully

{
  "status": "SUCCESS",
  "response": {
    "config": {
      "tokenContract": "text",
      "saleContract": "text"
    }
  }
}
  • Token Sales
  • GETRetrieve a list of token sales
  • POSTPurchase tokens from a token sale
  • GETRetrieve details of a specific token sale
  • Investment Portfolio
  • GETRetrieve investments by user ID
  • GETRetrieve transactions for a user by token ID
  • GETRetrieve all transactions for a user
  • Payouts
  • GETRetrieve payout schedule for a debt token sale
  • GETRetrieve payout schedule for a token
  • KYC
  • POSTUpdate user identity for token store
  • GETRetrieve contract addresses for token minting

Retrieve a list of token sales

get

This endpoint provides a paginated list of token sales available on the platform. Users can filter sales by investment type, status, and sort order. This is essential for investors looking to explore and participate in ongoing or upcoming token sales.

Authorizations
Query parameters
pageintegerOptional

Page number for pagination

limitintegerOptional

Number of items per page

termstringOptional

Search term for asset title or description

investmentnumber · enumOptional

Investment type 0 - All // Default, can be omitted 1 - Equity 2 - Debt

Possible values:
statusnumber · enumOptional

Status of the token sale 0 - All // Default, can be omitted 1 - Active 2 - Upcoming 3 - Ended

Possible values:
sortstring · enumOptional

Sort order none - Default, can be omitted price|l-h - Sort by price low to high price|h-l - Sort by price high to low return|h-l - Sort by expected returns high to low

Possible values:
Responses
200
Token sales retrieved successfully
application/json
get
GET /api/v/1/token-sales HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Accept: */*
200

Token sales retrieved successfully

{
  "status": "SUCCESS",
  "response": {
    "sales": [
      {
        "id": "text",
        "tokenId": "text",
        "tokenName": "text",
        "tokenSymbol": "text",
        "name": "text",
        "description": "text",
        "startDate": "2025-05-25T01:18:15.743Z",
        "endDate": "2025-05-25T01:18:15.743Z",
        "payoutStartDate": "2025-05-25T01:18:15.743Z",
        "tokenCountOnSale": 1,
        "images": [
          {
            "name": "text",
            "size": 1,
            "type": "text",
            "url": "text"
          }
        ],
        "documents": [
          {
            "id": "text",
            "name": "text",
            "size": 1,
            "type": "text",
            "url": "text",
            "title": "text",
            "description": "text",
            "order": 1
          }
        ],
        "softCap": 1,
        "timezone": "text",
        "expectedReturns": 1,
        "totalSoldTokens": 1,
        "percentageTokenSold": 1,
        "createdAt": "2025-05-25T01:18:15.743Z",
        "updatedAt": "2025-05-25T01:18:15.743Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 1,
      "totalPages": 1,
      "totalItems": 1
    }
  }
}

Purchase tokens from a token sale

post

This endpoint facilitates the purchase of tokens from a specific token sale. It requires details such as the token sale ID, user wallet address, and purchase amount. Upon successful processing, the tokens are allocated to the user's account. This is essential for investors looking to acquire tokens from active sales.

Authorizations
Body
tokenSaleIdstringRequired

Identifier of the token sale

userAddressstringRequired

Wallet address of the user

amountnumber · floatRequired

Amount of tokens to purchase

currencyContractstringRequired

Currency contract address

timezonestringRequired

Timezone of the user

Responses
201
Tokens purchased successfully
application/json
post
POST /api/v/1/token-sales/buy HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "tokenSaleId": "text",
  "userAddress": "text",
  "amount": 1,
  "currencyContract": "text",
  "timezone": "text"
}
201

Tokens purchased successfully

{
  "status": "SUCCESS",
  "response": {
    "result": {
      "transactionId": "text",
      "tokenSaleId": "text",
      "amount": 1,
      "userAddress": "text",
      "status": "text"
    }
  }
}

Update user identity for token store

post

This endpoint updates the KYC (Know Your Customer) information for a user in the token store. It requires details such as country code and other identity attributes. This is crucial for ensuring compliance with regulatory requirements and verifying user identities.

Authorizations
Body
countryCodenumberRequired

ISO 3166-1 numeric code

Responses
200
Token identity updated successfully
application/json
Responseall of
post
POST /api/v/1/identity/kyc HTTP/1.1
Host: localhost:5004
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "countryCode": 1
}
200

Token identity updated successfully

{
  "status": 0,
  "response": {
    "kycStatus": "text",
    "kycDetails": {},
    "orgId": "text",
    "updatedAt": "text",
    "createdAt": "text",
    "id": "text",
    "countryId": "text",
    "countryName": "text",
    "userId": "text",
    "accredit": {}
  }
}