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
| Name | In | Type | Description |
|---|---|---|---|
| marketId * | path | string | The market's id, or its slug |
| quantity * | body | integer | How 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:
| Field | Type | Description |
|---|---|---|
| marketId | string | |
| walletId | string | |
| quantity | integer | |
| credit | integer | Cents 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.