money-bills-simpleMint Shares

Mint shares to add liquidity to a market. For every $1 you mint, you receive 1 share of each option. You can sell these shares by submitting sell orders to the orderbook.

The minted amount will be deducted from your PredictBase account balance.


Endpoint

POST /mint-shares-for-user

Full URL

https://api.predictbase.app/mint-shares-for-user

Authentication

This endpoint requires authentication. You must include your API key in the request headers:

x-api-key: YOUR_API_KEY

Request Body

{
  "marketId": 12001,
  "user" : "0xd...",
  "amount" : 100  // Amount in USDC (e.g. $100)
}

Field Notes

  • marketId The ID of the market you want to mint shares for.

  • user The user’s wallet address.

  • amount The amount in USDC (e.g., 100 USDC = $100).


Response (Success)


⚠️ Failure Cases

  • Missing or invalid x-api-key

  • API key not authorized for the user

  • Insufficient balance to cover the minting amount.

  • On-chain transaction failure

Last updated