Skip to main content
POST
/
v1
/
pm
/
markets
/
{marketId}
/
mint
Mint shares
curl --request POST \
  --url https://relay.bayse.markets/v1/pm/markets/{marketId}/mint \
  --header 'Content-Type: application/json' \
  --data '
{
  "quantity": 123,
  "currency": "<string>"
}
'
{
  "operationId": "d4e5f6a7-b8c9-0123-defa-456789012345",
  "marketId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "quantity": 10,
  "outcome1Price": 0.65,
  "outcome2Price": 0.35
}
Minting creates new shares for a binary market. You deposit funds and receive an equal number of YES and NO shares (a complementary pair). The cost per pair equals the market’s base unit (e.g., $1.00 per YES+NO pair in USD markets). Minting does not affect market prices since it creates both sides equally. This is useful when you want to sell one side on the order book while keeping the other, or when you want to provide liquidity.

Authentication

Write authentication required — X-Public-Key, X-Timestamp, and X-Signature headers. See the Authentication guide.

Path parameters

marketId
string
required
UUID of the market.

Request body

quantity
number
required
Amount to use for the mint operation in the selected currency. For example, quantity: 100, currency: "NGN" means “spend 100 NGN to mint”. Must be greater than 0.
currency
string
USD (default) or NGN.
Request quantity is a wallet amount in the provided currency. The response quantity is the normalized share quantity minted.

Example request

PUBLIC_KEY="pk_live_abcdef123456"
SECRET_KEY="sk_live_secret789xyz"
TIMESTAMP=$(date +%s)
METHOD="POST"
URL_PATH="/v1/pm/markets/b2c3d4e5-f6a7-8901-bcde-f12345678901/mint"
BODY='{"quantity":10,"currency":"USD"}'

BODY_HASH=$(printf '%s' "$BODY" | openssl dgst -sha256 -hex 2>/dev/null | sed 's/.*= //')
PAYLOAD="${TIMESTAMP}.${METHOD}.${URL_PATH}.${BODY_HASH}"
SIGNATURE=$(printf '%s' "$PAYLOAD" | openssl dgst -sha256 -hmac "$SECRET_KEY" -binary | base64)

curl -X POST "https://relay.bayse.markets${URL_PATH}" \
  -H "X-Public-Key: ${PUBLIC_KEY}" \
  -H "X-Timestamp: ${TIMESTAMP}" \
  -H "X-Signature: ${SIGNATURE}" \
  -H "Content-Type: application/json" \
  -d "$BODY"

Response

operationId
string
UUID of the mint operation.
marketId
string
UUID of the market.
quantity
number
Normalized share quantity minted.
outcome1Price
number
Current price of outcome 1 (YES). Returned for convenience — minting does not change market prices.
outcome2Price
number
Current price of outcome 2 (NO). Returned for convenience — minting does not change market prices.
{
  "operationId": "d4e5f6a7-b8c9-0123-defa-456789012345",
  "marketId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "quantity": 10,
  "outcome1Price": 0.65,
  "outcome2Price": 0.35
}