The order book shows all open buy (bid) and sell (ask) orders for a market outcome, aggregated by price level. Use it to understand where the market is trading and to pick a good price for a limit order.Documentation Index
Fetch the complete documentation index at: https://docs.futuur.com/llms.txt
Use this file to discover all available pages before exploring further.
All examples use the base URL
https://api.futuur.com. Every request requires HMAC authentication headers. See the Authentication guide for how to generate them.What the order book shows
The order book aggregates open orders at each price level into two sides:- Bids (
bidin the response) — buyers willing to pay up to a certain price (buy orders) - Asks (
askin the response) — sellers willing to accept at least a certain price (sell orders)
Fetching the order book
CallGET /events/{id}/order_book/ with the required currency_mode and market parameters.
Required parameters
| Parameter | Type | Description |
|---|---|---|
currency_mode | string | play_money or real_money |
market | integer | The market ID to query |
Optional parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
position | string | long | long for long order book, short for short order book |
Example response
Order book fields
Each level in thebid and ask arrays contains the following fields:
| Field | Type | Description |
|---|---|---|
price | float | The price level (0 to 1, representing probability) |
total_shares | float | Total shares available at exactly this price level |
total_amount | float | Total currency amount at exactly this price level |
total_fees | float | Total fees attributable to the shares at this price level |
cumulative_shares | float | Total shares available at this price level and better |
cumulative_amount | float | Total currency amount at this price level and better |
cumulative_fees | float | Cumulative fees from the top of the book through this level |
Interpreting the best bid and ask
The best bid is the first entry in thebid array — the highest price a buyer is currently willing to pay. The best ask is the first entry in ask — the lowest price a seller will accept.
python
- Best bid:
0.62 - Best ask:
0.65 - Spread:
0.03(3 cents per share) - Mid price:
0.635
Using the order book to pick a limit price
Thecumulative_shares field tells you how much total liquidity is available up to a given price. Use this to estimate how many shares you can buy or sell at a target price.
python
- Buying 300 shares: best ask at
0.65covers it (cumulative_shares = 300) - Buying 1000 shares: requires depth up to
0.67(cumulative_shares = 1050)
0.67 or placing a market order would fill a 1000-share buy in this scenario.
Long vs short order books
Theposition parameter controls which order book you’re viewing:
| Value | Description |
|---|---|
long (default) | Long order book — orders betting the outcome happens |
short | Short order book — orders betting the outcome does not happen |
position=short) to see relevant bids.
python