Skip to content

API Endpoint: Get IPO Contracts with Bid OverviewΒ #47

@sallymoc

Description

@sallymoc

Description

The wallet currently depends on the qubic.li API endpoint GET /Wallet/IpoContracts to retrieve the list of active IPO contracts along with their full bid overview. This endpoint needs to be replaced with a new one hosted on our own infrastructure (RPC or similar).

Current qli endpoint

GET https://api.qubic.li/Wallet/IpoContracts

Expected Response

[
  {
    "id": "string",
    "index": 5,
    "name": "QX",
    "bidOverview": {
      "index": 5,
      "tick": 21500000,
      "bids": [
        {
          "publicKey": "base64-encoded-public-key",
          "computorId": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB",
          "price": 1000000,
          "positionIndex": 0
        }
      ]
    }
  }
]

Response Field Descriptions

Field Type Description
id string Unique identifier for the contract
index number Smart contract index
name string Contract name (e.g. "QX", "QTRY")
bidOverview.index number Contract index (same as parent)
bidOverview.tick number Tick at which the bid data was captured
bidOverview.bids array List of all current bids for this contract
bidOverview.bids[].publicKey string Base64-encoded public key of the bidder
bidOverview.bids[].computorId string 60-char Qubic identity of the bidder
bidOverview.bids[].price number Bid price in qubic units
bidOverview.bids[].positionIndex number Position/slot index of the bid

How the wallet uses this data

  • Lists all active IPO contracts with their bid data
  • Shows each contract's total bid value (sum of bids[].price)
  • Identifies the user's own shares by filtering bids[].computorId against the user's seed addresses
  • Groups user shares by computorId to show per-address share count
  • Feeds the contract list to the "Place Bid" component so the user can select which contract to bid on

Notes

  • No authentication required
  • The response must include all bids for each contract, not just the requesting user's bids
  • The bids array can be large depending on the contract
  • The existing live API endpoint GET /live/v1/ipos/active only returns { contractIndex, assetName } β€” it does not include bid data, so it cannot replace this

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

βœ… Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions