Skip to main content
Selling a position means placing an ask (sell) order on a market where you already hold shares. You can sell your entire position to exit completely, or sell a portion to reduce your exposure.
All examples use https://api.futuur.com/v2.0. Every request requires HMAC authentication headers. See the Authentication guide for how to generate them.
1

List your active wagers

Call GET /wagers/ to see all positions you currently hold. Filter by active=true to show only open wagers.
The response includes each wager’s market ID, the number of shares you hold, and the position (long or short).
2

Find the wager you want to exit

Identify the wager you want to sell. Note the following fields from the wager response:
  • market — the market ID you’ll use in the sell order
  • shares — the total number of shares you hold (your maximum sell quantity)
  • positionlong if you bet the outcome happens, short if you bet against it
  • currency — the currency the wager was placed in
python
To check the current sell price before committing, fetch the order book with GET /markets/{id}/book/ and look at the bid array. The highest bid is the best price you can sell at. See Reading the order book.
3

Place an ask (sell) order

To sell, place a POST /orders/ request with side="ask". Match the position field to the position type you hold — long for long shares, short for short shares.Use shares to specify exactly how many shares to sell. Set price=null for a market sell (executes immediately at the best available bid), or set a specific price to place a limit sell.Market sell (sell immediately):
Limit sell (only fill at your target price or better):
4

Confirm the order is filled and the wager is closed

Check the order’s status in the response. For market sells, the status is typically filled immediately. For limit sells, it remains open until a buyer matches your price.
python
To confirm the wager is fully closed, re-fetch your wagers list. A fully sold wager will no longer appear in the active=true results.

Partial sells

You don’t have to sell your entire position at once. Pass a shares value smaller than your total holding to partially exit. The remaining shares stay open in your wager.
python
After a partial fill, your wager’s shares field decreases by the number of shares sold.

Long vs short positions

Always match the position field in your sell order to the position type you hold. Mismatching will result in an error or an unintended new position.

Cancelling an unfilled limit sell

If your limit sell order hasn’t filled yet and you want to cancel it, use PATCH /orders/{id}/cancel/: