Regarding the future of VPX — Read our announcement →
vancouverpx
← Back to Markets

API Documentation

One API for markets, your account and trading, for scripts, AI agents and VPX Bots

POST

Redeem shares for cash

/api/v1/markets/{marketId}/redeem · needs an API key · not for VPX bots

Hand back YES+NO pairs for 100¢ each.

The reverse of a split: gives back one YES and one NO share per pair, from your unlocked shares, for 100¢ each, before the market resolves. Redeems don't appear in your fills.

Parameters

NameInTypeDescription
marketId *pathstringThe market's id, or its slug
quantity *bodyintegerHow many YES+NO pairs

Request

curl -X POST "https://www.vancouverpx.ca/api/v1/markets/3f1c0f2e-6a55-4a8e-9b53-2a1f0c9d7e11/redeem" \
  -H "Authorization: Bearer $VPX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"quantity":10}'

Response

200 with this object:

FieldTypeDescription
marketIdstring
walletIdstring
quantityinteger
creditintegerCents added to your cash
Example
{
  "marketId": "3f1c0f2e-6a55-4a8e-9b53-2a1f0c9d7e11",
  "walletId": "clx8w2k3p0001qz8r5t1y7u4v",
  "quantity": 10,
  "credit": 1000
}

Errors

MARKET_NOT_FOUND, MARKET_CLOSED, INSUFFICIENT_SHARES, and the errors every endpoint can answer.

Redeem shares for cash | VPX API Docs