> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bebop.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference

> Endpoints, fields, amounts, limits, approvals, contracts, and error codes of the Options API.

This page describes the taker endpoints of the Options API on Ethereum. All paths are relative to `https://api.bebop.xyz/options/ethereum/v1`.

| Item | Value |
| - | - |
| Authentication | `GET /instruments`, `GET /assets/{underlying}/summary`, and `GET /status` are public. The other endpoints on this page take `Authorization: Bearer <API key>`. The key must have options taker access, or Bebop returns `403`. |
| Position scope | Position endpoints return the positions opened with your API key, for all wallets. A position from another key returns `404`. |
| Field names | Query parameters use snake\_case, except `includeExpired` and `includeRetiredFactories`. Response fields use camelCase. |
| Null values | A field without a value is `null`. Responses do not leave out keys. |
| Amounts | Raw token units, as decimal strings. See [Amounts](#amounts). |
| Times | Unix timestamps in seconds. |
| Caching | Quote and position responses send `Cache-Control: no-store`. In a position, `rtBalance` and `redeemable` can be up to 5 seconds old. |
| Pagination | List endpoints return `nextCursor`. When it is not `null`, pass it unchanged as `cursor` to get the next page. The cursor is opaque. |

| Endpoint | Section |
| - | - |
| `GET /instruments` | [List instruments](#list-instruments) |
| `GET /assets/{underlying}/summary` | [Get indicative prices](#get-indicative-prices) |
| `GET /status` | [Get the pricing status](#get-the-pricing-status) |
| `GET /quote` | [Request an open quote](#request-an-open-quote) |
| `GET /positions/{positionId}/quote` | [Request a close quote](#request-a-close-quote) |
| `GET /positions/{positionId}/roll` | [Request a roll quote](#request-a-roll-quote) |
| `GET /positions` | [List positions](#list-positions) |
| `GET /positions/{positionId}` | [Get a position](#get-a-position) |
| `GET /positions/{positionId}/transactions` | [List position transactions](#list-position-transactions) |

## List instruments

`GET /instruments`. The instruments that Bebop lists. By default, the list has the active instruments of the current Greek Factory that expire more than 30 seconds from now. The list is sorted by `expiration`.

**instrument** `string`

One option token address. Returns that instrument also if it is inactive, expired, or from a retired Greek Factory. An unknown address returns an empty list. Bebop rejects `instrument` together with `underlying`, `quote`, `option_type`, `expiration_from`, `expiration_to`, or `cursor`.

**underlying** `string`

Underlying token address.

**quote** `string`

Quote token address.

**option\_type** `string`

`call` or `put`.

**expiration\_from** `integer`

Earliest `expiration`, inclusive.

**expiration\_to** `integer`

Latest `expiration`, inclusive.

**includeExpired** `boolean` (default: false)

Also include the instruments that expired or that expire in 30 seconds or less.

**includeRetiredFactories** `boolean` (default: false)

Also include the instruments of a retired Greek Factory. See [Contracts](#contracts).

**limit** `integer` (default: 50)

Page size, 1 to 200.

**cursor** `string`

The `nextCursor` of the previous page. Send the same filters on each page.

**instruments** `object[]` *required*

**instrument fields**

**instrument** `string`

Option token (OT) address. It identifies the instrument in all other calls.

**receipt** `string`

Receipt token (RT) address. Also the contract for [redemption](https://docs.bebop.xyz/options-api/guides/redeem-after-expiry.md).

**name** `string`

Token name.

**symbol** `string`

OT symbol.

**receiptSymbol** `string`

RT symbol.

**underlying** `string`

Underlying token address.

**quote** `string`

Quote token address. The premium is paid in this token.

**collateral** `string`

Token that the taker locks: the underlying for a call, the quote token for a put.

**settlement** `string`

Token that the OT holder pays to exercise: the quote token for a call, the underlying for a put.

**collateralSymbol** `string`

Collateral token symbol.

**settlementSymbol** `string`

Settlement token symbol.

**decimals** `integer`

OT and RT decimals. Equal to `collateralDecimals`.

**collateralDecimals** `integer`

Collateral token decimals.

**settlementDecimals** `integer`

Settlement token decimals.

**optionType** `string`

`call` or `put`.

**exerciseStyle** `string`

`european`.

**strike** `string`

Strike in quote token per underlying token. Can be rounded.

**strikeRaw** `string`

Exact on-chain strike, 18 decimals. For a put, the on-chain strike is the reciprocal: `strike` is `(10**36 // strikeRaw) / 10**18`.

**expiration** `integer`

Expiration.

**exerciseDeadline** `integer`

End of the exercise window.

**exerciseWindowSeconds** `integer`

Length of the exercise window, in seconds.

**canSell** `boolean`

`true` when the instrument is from the current Greek Factory and 48 hours or more remain before `expiration`.

**canBuy** `boolean`

`true` when the instrument has not expired.

**factory** `string`

Greek Factory of the instrument. The [approvals](#approvals) for the instrument are on this contract.

**exercisedTotal** `string`

Total OT amount exercised, raw units.

**lastExerciseAt** `integer | null`

Time of the last exercise, or `null`.

**maxUnderlyingAmount** `string | null`

Largest open size that a connected maker declared for this underlying, in raw underlying units, also for a put. `null` when no maker declared a size. It is not a guaranteed fill size.

**nextCursor** `string | null` *required*

Cursor for the next page, or `null` on the last page.

```json theme={null}
{
  "instruments": [
    {
      "instrument": "0xOPTION_TOKEN",
      "receipt": "0xRECEIPT_TOKEN",
      "name": "OPTE-C-WETH-USDC-2500-2026-11-27",
      "symbol": "OPTE-C-WETH-USDC-2500-2026-11-27",
      "receiptSymbol": "RCTE-C-WETH-USDC-2500-2026-11-27",
      "underlying": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "quote": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "collateral": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "settlement": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
      "collateralSymbol": "WETH",
      "settlementSymbol": "USDC",
      "decimals": 18,
      "collateralDecimals": 18,
      "settlementDecimals": 6,
      "optionType": "call",
      "exerciseStyle": "european",
      "strike": "2500",
      "strikeRaw": "2500000000000000000000",
      "expiration": 1795766400,
      "canSell": true,
      "canBuy": true,
      "exerciseDeadline": 1795770000,
      "exerciseWindowSeconds": 3600,
      "factory": "0x9999999999906a9a5b3cfb1151ac6812b3042191",
      "exercisedTotal": "0",
      "maxUnderlyingAmount": null,
      "lastExerciseAt": null
    }
  ],
  "nextCursor": null
}
```

## Get indicative prices

`GET /assets/{underlying}/summary`. Indicative prices for the instruments of one underlying, grouped by expiration. Use it to compare strikes and expirations before you request a quote. The prices are not executable. Only [`GET /quote`](#request-an-open-quote) gives a firm premium.

Each instrument has `pricing` and `statistics`. Either one can be `null` when its data is not fresh. An instrument with `null` pricing stays in the list.

**underlying** `string` *required*

`ETH` (WETH), `cbBTC`, or the underlying token address. The value is not case-sensitive. An unknown value returns `404` `NotFound`.

**asset** `string` *required*

Asset symbol: `ETH` for WETH, or `cbBTC`.

**underlying** `string` *required*

Underlying token address.

**quote** `string` *required*

Quote token address (USDC).

**schemaVersion** `integer` *required*

`5`.

**indicativeOnly** `boolean` *required*

Always `true`.

**sequence** `integer | null` *required*

Identifier of the price set. It changes when the prices change.

**sourceAsOf** `integer | null` *required*

Time of the market data that the prices use.

**computedAt** `integer | null` *required*

Time when Bebop calculated the prices.

**publishedAt** `integer | null` *required*

Time when Bebop published the prices.

**spot** `number | null` *required*

Underlying spot price in USD.

**dateUtc** `string` *required*

Current UTC date, `YYYY-MM-DD`. The `today` statistics are for this date.

**statisticsAsOf** `integer | null` *required*

Time of the statistics.

**statisticsBlock** `integer | null` *required*

Last block in the statistics.

**tradesThroughBlock** `integer | null` *required*

Last block of the trade data in the statistics.

**expiries** `object[]` *required*

One item for each `expiration`.

**expiry fields**

**expiration** `integer`

Expiration.

**forward** `number | null`

Forward price for this expiration, in USD. `null` when Bebop cannot price the expiration. `atmIv` and `timeToExpiry` are then also `null`.

**atmIv** `number | null`

Implied volatility at the forward price, as a decimal.

**timeToExpiry** `number | null`

Years to `expiration`, on a 365-day year.

**instruments** `object[]`

The instruments of this expiration.

**instrument fields**

**instrument** `string`

Option token (OT) address.

**strike** `string`

Strike in quote token per underlying token.

**optionType** `string`

`call` or `put`.

**canSell** `boolean`

`true` when 48 hours or more remain before `expiration`.

**canBuy** `boolean`

`true` when the instrument has not expired.

**pricingStatus** `string`

`available`, `unavailable`, `near_expiry`, `outside_expiry_range`, `outside_strike_range`, or `unsafe_prices`. `pricing` has a value only when the status is `available`.

**pricing** `object | null`

Indicative prices. All USD values are per underlying unit, also for a put.

**pricing fields**

**sourceExpirations** `integer[]`

The one or two market expirations that the price uses. Two values mean that Bebop interpolated between them.

**markIv** `number`

Mid implied volatility, as a decimal.

**bidIv** `number`

Sell-to-open implied volatility, as a decimal.

**askIv** `number`

Buy-to-close implied volatility, as a decimal.

**bidPremiumUsd** `number`

Sell-to-open premium in USD, before the fee.

**markPremiumUsd** `number`

Mid premium in USD.

**askPremiumUsd** `number`

Buy-to-close premium in USD, before the fee.

**netPremiumUsd** `number`

Sell-to-open premium in USD, after the fee.

**sellToOpenApr** `number`

`netPremiumUsd` as an annual rate on the collateral, as a decimal. The collateral is the spot price for a call and the strike for a put. The time includes the exercise window.

**forwardDelta** `number`

Forward delta at `markIv`, from -1 to 1.

**impliedItmProbability** `number`

Probability, from 0 to 1, that the option expires in the money at `markIv`.

**vegaPerVolPoint** `number`

Change of the premium in USD for one percentage point of implied volatility.

**display** `object | null`

Sell-to-open values. Same fields as `display` on an [open quote](#request-an-open-quote), without `impliedItmProbability`. `null` when `pricing` is `null`.

**statistics** `object | null`

Trade statistics of the instrument on Bebop. Amounts are decimal strings in underlying units, and USD values are decimal strings with 2 decimals.

**statistics fields**

**openInterest** `object | null`

Current OT supply: `totalSupplyRaw` (raw units), `underlyingAmount`, and `notionalUsd`.

**previousDayOpenInterest** `object | null`

The same fields at the end of the previous UTC day.

**lastTrade** `object | null`

Last trade: `priceQuotePerUnderlying`, `volumeUnderlying`, `positionEffect` (`open` or `close`), and `timestamp`.

**today** `object`

Statistics of the current UTC day: `dateUtc`, `complete`, `open`, `high`, `low`, `close` (premium in quote token per underlying unit), `openVolumeUnderlying`, `closeVolumeUnderlying`, `volumeUnderlying`, `openVolumeUsd`, `closeVolumeUsd`, and `volumeUsd`.

**previousDay** `object`

The same fields for the previous UTC day.

```json theme={null}
{
  "asset": "ETH",
  "underlying": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "quote": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "schemaVersion": 5,
  "indicativeOnly": true,
  "sequence": 1794510730,
  "sourceAsOf": 1794510727,
  "computedAt": 1794510730,
  "publishedAt": 1794510730,
  "spot": 2011.39,
  "dateUtc": "2026-11-12",
  "statisticsAsOf": 1794510695,
  "statisticsBlock": 26400872,
  "tradesThroughBlock": 26400872,
  "expiries": [
    {
      "expiration": 1795161600,
      "forward": 2013.75,
      "atmIv": 0.5146,
      "timeToExpiry": 0.0206,
      "instruments": [
        {
          "instrument": "0xOPTION_TOKEN",
          "strike": "2150",
          "optionType": "call",
          "canSell": true,
          "canBuy": true,
          "pricingStatus": "available",
          "pricing": {
            "sourceExpirations": [1795161600],
            "markIv": 0.5052,
            "bidIv": 0.4986,
            "askIv": 0.5118,
            "bidPremiumUsd": 14.57,
            "markPremiumUsd": 15.09,
            "askPremiumUsd": 15.61,
            "netPremiumUsd": 14.0,
            "sellToOpenApr": 0.3376,
            "forwardDelta": 0.1931,
            "impliedItmProbability": 0.1741,
            "vegaPerVolPoint": 0.7925
          },
          "display": {
            "isItm": false,
            "intrinsicUsd": 0.0,
            "grossTimeValueUsd": 14.57,
            "feeUsd": 0.57,
            "netTimeValueUsd": 14.0,
            "intrinsicShare": 0.0,
            "yieldApr": 0.3376,
            "shortfallUsd": 0.0,
            "collateralUsd": 2011.39,
            "effectivePriceUsd": 2164.0,
            "riskLevel": "ok",
            "riskReason": "otm"
          },
          "statistics": {
            "openInterest": {
              "totalSupplyRaw": "0",
              "underlyingAmount": "0",
              "notionalUsd": "0.00"
            },
            "previousDayOpenInterest": null,
            "lastTrade": null,
            "today": {
              "dateUtc": "2026-11-12",
              "complete": true,
              "open": null,
              "high": null,
              "low": null,
              "close": null,
              "openVolumeUnderlying": "0",
              "closeVolumeUnderlying": "0",
              "volumeUnderlying": "0",
              "openVolumeUsd": "0.00",
              "closeVolumeUsd": "0.00",
              "volumeUsd": "0.00"
            },
            "previousDay": {
              "dateUtc": "2026-11-11",
              "complete": true,
              "open": null,
              "high": null,
              "low": null,
              "close": null,
              "openVolumeUnderlying": "0",
              "closeVolumeUnderlying": "0",
              "volumeUnderlying": "0",
              "openVolumeUsd": null,
              "closeVolumeUsd": null,
              "volumeUsd": null
            }
          }
        }
      ]
    }
  ]
}
```

## Get the pricing status

`GET /status`. Tells you whether indicative prices are available on this chain. It does not affect quotes: `GET /quote` works when the status is `unavailable`.

**status** `string` *required*

`available` when Bebop has fresh indicative prices. `unavailable` when it has none. Then `pricing` is `null` for all instruments in [Get indicative prices](#get-indicative-prices).

```json theme={null}
{
  "status": "available"
}
```

## Request an open quote

`GET /quote`. A firm sell-to-open quote. Bebop sends the request to every eligible maker and returns the highest valid premium.

**instrument** `string` *required*

Option token address.

**amount** `string` *required*

OT amount in raw units. See [Amounts](#amounts) and [Limits](#limits).

**taker\_address** `string` *required*

Wallet that sends the transaction and locks the collateral. The signed order is bound to this wallet.

**validate** `boolean` (default: false)

When `true`, Bebop also checks the wallet balance, allowance, and permission, and returns the result in `issues`.

Bebop rejects an open when the wallet holds OT of the instrument (`ExistingOptionBalance`).

**requestId** `string` *required*

Request ID. Give it to Bebop support with a question about the request.

**quoteId** `string` *required*

Quote ID.

**positionId** `string` *required*

ID of the position that the trade opens or adds to. All opens of one wallet on one instrument share one position ID. The format is `pos-<chainId>-<wallet>-<instrument>`, with lowercase addresses.

**chainId** `integer` *required*

`1`.

**instrument** `string` *required*

Option token address.

**side** `string` *required*

`sell` for an open. `buy` for a close.

**amount** `string` *required*

OT amount, raw units.

**premium** `string` *required*

Premium in raw quote token units. On an open, the amount that the wallet receives, after `fee`. On a close, the amount that the wallet pays, including `fee`.

**fee** `string` *required*

Bebop fee in raw quote token units. `premium` already has the fee applied: deducted on an open, added on a close. The fee does not include gas.

**expiry** `integer` *required*

Time after which the transaction fails. At most 60 seconds after the request, and at least 30 seconds before the instrument `expiration`.

**issues** `string[] | null` *required*

`null` when `validate` is `false`. Otherwise, a list of wallet problems, empty when the wallet is ready. The values are in [Quote issues](#quote-issues).

**tx** `object` *required*

The settlement transaction. Send it from `taker_address` without changes.

**tx fields**

**to** `string`

Bebop settlement contract address.

**data** `string`

Calldata.

**value** `string`

Native value in wei. `"0"`.

**iv** `number | null` *required*

Implied volatility of the winning quote, as a decimal (`0.55` is 55%). Not a settlement term.

**delta** `number | null` *required*

Delta of the winning quote, from -1 to 1. Not a settlement term.

**spotPrice** `number | null` *required*

Underlying spot price in USD that the maker used. Not a settlement term.

**display** `object | null` *required*

Display values for a sell-to-open, per underlying unit. `null` on a close quote, and when no values are available. Not a settlement term.

**display fields**

**isItm** `boolean`

`true` when the option is in the money.

**intrinsicUsd** `number`

Intrinsic value in USD.

**grossTimeValueUsd** `number`

Premium minus intrinsic value, in USD, before the fee.

**feeUsd** `number`

Bebop fee in USD.

**netTimeValueUsd** `number`

Time value after the fee, in USD.

**intrinsicShare** `number`

Share of the premium that is intrinsic value, from 0 to 1.

**yieldApr** `number`

Annualized net time value as a decimal. Can be negative.

**shortfallUsd** `number`

Amount in USD by which `intrinsicUsd` is more than the premium after the fee. `0` when `netTimeValueUsd` is not negative.

**collateralUsd** `number`

Collateral value in USD.

**effectivePriceUsd** `number`

Effective sale or purchase price of the underlying in USD, if the option is exercised.

**riskLevel** `string`

`ok`, `caution`, or `critical`.

**riskReason** `string`

`otm`, `itm`, `mostly_intrinsic`, or `nonpositive_net_time_value`.

**impliedItmProbability** `number | null`

Probability, from 0 to 1, that the option expires in the money at `iv`.

```json theme={null}
{
  "requestId": "c9ee4c40-925f-4afb-99b5-d6190c6328a2",
  "quoteId": "opt-PLACEHOLDER",
  "positionId": "pos-1-0xYOUR_WALLET-0xOPTION_TOKEN",
  "chainId": 1,
  "instrument": "0xOPTION_TOKEN",
  "side": "sell",
  "amount": "10000000000000000",
  "premium": "643000",
  "fee": "2000",
  "expiry": 1793300460,
  "issues": [],
  "tx": {
    "to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
    "data": "0xPLACEHOLDER",
    "value": "0"
  },
  "iv": 0.55,
  "delta": 0.21,
  "spotPrice": 2350.0,
  "display": null
}
```

The example has placeholder IDs and calldata. It is not executable.

## Request a close quote

`GET /positions/{positionId}/quote`. A firm buy-to-close quote. Only the makers that filled the opens of the position quote the close.

**positionId** `string` *required*

Position ID.

**amount** `string`

OT amount to close, raw units. Omit it to close the full confirmed remainder.

**validate** `boolean` (default: false)

When `true`, Bebop also checks the USDC balance, the USDC allowance, and the permission, and returns the result in `issues`.

A close quote counts only confirmed opens. Bebop confirms an open about 30 seconds after it is mined. While an open of the position is not confirmed, Bebop returns `409` `PositionConfirming` for a full close, and for an `amount` above the confirmed remainder. Bebop returns `404` `PositionNotFound` for a position that is fully closed.

Bebop always checks that the wallet holds at least `amount` of RT. A partial close `amount` must be at or above the minimum amount. The remainder must also be at or above the minimum, unless `amount` is the full RT balance of the wallet. The response has the same fields as [Request an open quote](#request-an-open-quote), with `side` `buy`.

## Request a roll quote

`GET /positions/{positionId}/roll`. A firm quote that closes the full position and opens `instrument` in one transaction.

**positionId** `string` *required*

Position ID.

**instrument** `string` *required*

Option token address of the new instrument. It must have the same underlying, option type, collateral, quote token, and Greek Factory as the position, and it must be a different instrument.

**validate** `boolean` (default: false)

When `true`, Bebop also checks the wallet and returns the result in `issues`.

For a call, the new OT amount is the closed amount. For a put, it is the closed amount times the new `strike` divided by the old `strike`, rounded down. The new amount must be at or above the [minimum open](#limits).

While an open of the position is not confirmed, Bebop returns `409` `PositionConfirming`. Bebop opens instruments only on the current Greek Factory, so a position on a retired Greek Factory cannot roll.

**requestId** `string` *required*

Request ID.

**rollId** `string` *required*

Roll ID. The two trades of the roll have this value as `rollId` in [List position transactions](#list-position-transactions).

**chainId** `integer` *required*

`1`.

**close** `object` *required*

The close leg.

**leg fields**

**quoteId** `string`

Quote ID of the leg.

**positionId** `string`

Position ID of the leg.

**instrument** `string`

Option token address.

**side** `string`

`buy` on the close leg, `sell` on the open leg.

**amount** `string`

OT amount, raw units.

**premium** `string`

Premium in raw quote token units: paid on the close leg, received on the open leg.

**fee** `string`

Bebop fee of the leg, raw quote token units.

**iv** `number | null`

Implied volatility of the leg. Not a settlement term.

**open** `object` *required*

The open leg. Same fields as `close`.

**netPremium** `string` *required*

Open premium received minus close premium paid, raw quote token units. Negative when the wallet pays.

**collateralDelta** `string` *required*

New collateral locked minus collateral released, raw collateral units. Negative when collateral is released. `"0"` for a call.

**fee** `string` *required*

Bebop fee of the roll, raw quote token units. Only the open leg has a fee.

**expiry** `integer` *required*

Time after which the transaction fails. At least 30 seconds before the `expiration` of both instruments.

**issues** `string[] | null` *required*

Same as on an open quote.

**tx** `object` *required*

The settlement transaction. Same fields as on an open quote.

**display** `object | null` *required*

Display values of the open leg. Same fields as on an open quote.

**assignmentRisk** `object` *required*

**assignmentRisk fields**

**old** `number | null`

Model probability, from 0 to 1, that the closed instrument expires in the money. `null` when it is not available. Not a settlement term.

**new** `number | null`

Model probability, from 0 to 1, that the opened instrument expires in the money. `null` when it is not available. Not a settlement term.

```json theme={null}
{
  "requestId": "c9ee4c40-925f-4afb-99b5-d6190c6328a2",
  "rollId": "opt-PLACEHOLDER_CLOSE",
  "chainId": 1,
  "close": {
    "quoteId": "opt-PLACEHOLDER_CLOSE",
    "positionId": "pos-1-0xYOUR_WALLET-0xOLD_OPTION_TOKEN",
    "instrument": "0xOLD_OPTION_TOKEN",
    "side": "buy",
    "amount": "10000000000000000",
    "premium": "120000",
    "fee": "0",
    "iv": 0.52
  },
  "open": {
    "quoteId": "opt-PLACEHOLDER_OPEN",
    "positionId": "pos-1-0xYOUR_WALLET-0xNEW_OPTION_TOKEN",
    "instrument": "0xNEW_OPTION_TOKEN",
    "side": "sell",
    "amount": "10000000000000000",
    "premium": "910000",
    "fee": "3000",
    "iv": 0.56
  },
  "netPremium": "790000",
  "collateralDelta": "0",
  "fee": "3000",
  "expiry": 1793300460,
  "issues": [],
  "tx": {
    "to": "0xbbbbbBB520d69a9775E85b458C58c648259FAD5F",
    "data": "0xPLACEHOLDER",
    "value": "0"
  },
  "display": null,
  "assignmentRisk": {"old": 0.04, "new": 0.18}
}
```

The example has placeholder IDs and calldata. It is not executable.

## List positions

`GET /positions`. The positions of your API key, newest first.

**limit** `integer` (default: 50)

Page size, 1 to 200.

**cursor** `string`

The `nextCursor` of the previous page.

**positions** `object[]` *required*

**position fields**

**positionId** `string`

Position ID.

**openingQuoteId** `string`

Quote ID of the first open.

**chainId** `integer`

`1`.

**instrument** `string`

Option token address. To get the instrument details, call `GET /instruments?instrument=<address>`.

**takerAddress** `string`

Wallet of the position.

**openedAmount** `string`

Total OT amount opened, raw units.

**closedAmount** `string`

Total OT amount closed through Bebop, raw units.

**remainingAmount** `string`

`openedAmount` minus `closedAmount`. It does not change when RT moves outside Bebop.

**premiumReceived** `string`

Total premium received on opens, raw quote token units.

**premiumPaid** `string`

Total premium paid on closes, raw quote token units.

**status** `string`

See [Position status](#position-status).

**openingTransactionHash** `string`

Transaction hash of the first open.

**openedAt** `integer`

Time of the first open.

**updatedAt** `integer`

Time of the last trade.

**rtBalance** `string | null`

Current RT balance of the wallet, raw units. `null` when the balance read fails. `null` does not mean zero.

**phase** `string`

`pre_expiry` before `expiration`. `exercise_window` from `expiration` to `exerciseDeadline`, inclusive. `post_deadline` after `exerciseDeadline`.

**redeemable** `object | null`

The payout that the wallet can redeem now. `null` when there is no positive payout, or when the balance read fails.

**redeemable fields**

**rtBalance** `string`

RT balance of the wallet, raw units.

**consBacked** `string`

RT amount, for all RT holders of the instrument, that the exercise payments in the receipt contract cover. Raw RT units, not settlement token units.

**feeBps** `integer`

Redemption fee of the instrument, in basis points. The payouts below are after this fee.

**considerationNow** `string`

Estimated exercise payment that the wallet can redeem now, raw settlement token units. An upper bound: other RT holders redeem from the same pool.

**collateralAfterDeadline** `string | null`

Estimated collateral payout after `exerciseDeadline`, raw collateral units. `null` before the deadline.

**redeemedConsideration** `string`

Same as `redemption.redeemedConsideration`.

**redeemedCollateral** `string`

Same as `redemption.redeemedCollateral`.

**redemption** `object`

Totals that the wallet redeemed for this instrument. `"0"` when there are none.

**redemption fields**

**redeemedConsideration** `string`

Exercise payment redeemed, raw settlement token units.

**redeemedCollateral** `string`

Collateral redeemed, raw collateral units.

**expiryMoneyness** `object`

The expiry price compared with the strike. It does not show if an exercise occurred.

**expiryMoneyness fields**

**status** `string`

`pending` before expiry. `known` when Bebop has an expiry price. `unavailable` when it does not.

**value** `string | null`

`itm` or `otm` when `status` is `known`. A price equal to the strike is `otm`. Otherwise `null`.

**referencePriceUsdc** `string | null`

Expiry price of the underlying in USDC, as a decimal string. `null` unless `status` is `known`.

**pnl** `object`

Profit and loss (PnL) of the position, in two views. Amounts are decimal strings in `currency`, not raw units. A value is `null` when Bebop cannot calculate it. `unavailableReasons` gives the reasons.

**pnl fields**

**currency** `string`

Symbol of the quote token: `USDC`.

**cashflow** `object`

PnL against the underlying price at the time of each open. For a call, it includes the price change of the locked collateral.

**view fields**

**realized** `string | null`

Realized PnL: `optionRealized` plus `collateralRealized`.

**unrealized** `string | null`

Unrealized PnL: `optionUnrealized` plus `collateralUnrealized`.

**total** `string | null`

`realized` plus `unrealized`.

**optionRealized** `string | null`

Premium received minus premium paid, for the amount that is closed, exercised, or expired.

**optionUnrealized** `string | null`

Premium received for the open amount minus the current mark value of that amount.

**collateralRealized** `string | null`

Realized PnL of the collateral. In `cashflow`, for a redeemed call that was exercised: the exercise payment minus the value of the exercised collateral at the open. In `yield`, after an exercise: the amount by which the expiry price passed the strike, as zero or a negative value.

**collateralUnrealized** `string | null`

Unrealized PnL of the collateral. In `cashflow`, for a call: the current value of the locked collateral minus its value at the open. In `yield`: `"0"`.

**realizedPercent** `string | null`

`realized` divided by the total collateral value committed by all opens. `0.1` is 10%.

**unrealizedPercent** `string | null`

`unrealized` divided by the same value.

**totalPercent** `string | null`

`total` divided by the same value.

**unavailableReasons** `string[]`

Zero or more of `missing_lock_price`, `mark_unavailable`, `expiry_window`, `current_collateral_price_unavailable`, `assignment_pending_redemption`, `expiry_price_unavailable`, `inconsistent_history`.

**yield** `object`

PnL against holding the collateral with no option. A price change of the collateral does not count. Same fields as `cashflow`.

**total** `object` *required*

PnL of all positions of the API key, on all pages and in all statuses.

**total fields**

**currency** `string`

`USDC`.

**since** `integer | null`

Time of the first open. `null` when there are no positions.

**asOf** `integer`

Time of the calculation.

**committedCapital** `string | null`

Total collateral value committed by all opens, in `currency`. For a call, the underlying amount at its price at the open. For a put, the USDC amount. `null` when the price at an open is not available.

**cashflow** `object`

Sums of the `pnl.cashflow` values of the positions.

**view fields**

**realized** `string`

Sum of the known `realized` values.

**unrealized** `string`

Sum of the known `unrealized` values.

**total** `string`

`realized` plus `unrealized`.

**realizedPercent** `string | null`

`realized` divided by `committedCapital`. `null` when `committedCapital` is `null` or zero.

**unrealizedPercent** `string | null`

`unrealized` divided by `committedCapital`.

**totalPercent** `string | null`

`total` divided by `committedCapital`.

**unavailableReasons** `string[]`

Reasons why the sums are incomplete. Same values as in `pnl`.

**yield** `object`

Sums of the `pnl.yield` values of the positions. Same fields as `cashflow`.

**nextCursor** `string | null` *required*

Cursor for the next page, or `null` on the last page.

```json theme={null}
{
  "positions": [
    {
      "positionId": "pos-1-0xYOUR_WALLET-0xOPTION_TOKEN",
      "openingQuoteId": "opt-PLACEHOLDER",
      "chainId": 1,
      "instrument": "0xOPTION_TOKEN",
      "takerAddress": "0xYOUR_WALLET",
      "openedAmount": "10000000000000000",
      "closedAmount": "0",
      "remainingAmount": "10000000000000000",
      "premiumReceived": "643000",
      "premiumPaid": "0",
      "status": "open",
      "openingTransactionHash": "0xTRANSACTION_HASH",
      "openedAt": 1793300420,
      "updatedAt": 1793300420,
      "rtBalance": "10000000000000000",
      "redeemable": null,
      "phase": "pre_expiry",
      "redemption": {"redeemedConsideration": "0", "redeemedCollateral": "0"},
      "expiryMoneyness": {"status": "pending", "value": null, "referencePriceUsdc": null},
      "pnl": {
        "currency": "USDC",
        "cashflow": {
          "realized": "0.000000",
          "unrealized": "0.352000",
          "total": "0.352000",
          "optionRealized": "0.000000",
          "optionUnrealized": "0.102000",
          "collateralRealized": "0.000000",
          "collateralUnrealized": "0.250000",
          "realizedPercent": "0.00000000",
          "unrealizedPercent": "0.01497872",
          "totalPercent": "0.01497872",
          "unavailableReasons": []
        },
        "yield": {
          "realized": "0.000000",
          "unrealized": "0.102000",
          "total": "0.102000",
          "optionRealized": "0.000000",
          "optionUnrealized": "0.102000",
          "collateralRealized": "0.000000",
          "collateralUnrealized": "0.000000",
          "realizedPercent": "0.00000000",
          "unrealizedPercent": "0.00434043",
          "totalPercent": "0.00434043",
          "unavailableReasons": []
        }
      }
    }
  ],
  "total": {
    "currency": "USDC",
    "since": 1793300420,
    "asOf": 1793304000,
    "committedCapital": "23.500000",
    "cashflow": {
      "realized": "0.000000",
      "unrealized": "0.352000",
      "total": "0.352000",
      "realizedPercent": "0.00000000",
      "unrealizedPercent": "0.01497872",
      "totalPercent": "0.01497872",
      "unavailableReasons": []
    },
    "yield": {
      "realized": "0.000000",
      "unrealized": "0.102000",
      "total": "0.102000",
      "realizedPercent": "0.00000000",
      "unrealizedPercent": "0.00434043",
      "totalPercent": "0.00434043",
      "unavailableReasons": []
    }
  },
  "nextCursor": null
}
```

### Position status

| Value | Meaning |
| - | - |
| `open` | Before expiry, with a remainder. A partial close stays `open`. |
| `closed` | The full position was closed through Bebop. |
| `expired_pending_exercise` | After `expiration`, in the exercise window, with no exercise yet. |
| `exercised` | Bebop indexed at least one exercise of the instrument. Check `redeemable` for a payout. |
| `expired_unexercised` | The exercise window closed with no exercise. Check `redeemable` for a payout. |
| `redeemed` | The wallet redeemed, and its RT balance is zero. |

A status is not final. For example, RT that the wallet receives later can change a `redeemed` position.

## Get a position

`GET /positions/{positionId}`. One position. The response is one object of `positions` in [List positions](#list-positions). A position that does not exist for the API key returns `404` `NotFound`.

**positionId** `string` *required*

Position ID.

## List position transactions

`GET /positions/{positionId}/transactions`. The Bebop trades of one position, oldest first. Redemptions and exercises are not included.

**positionId** `string` *required*

Position ID.

**positionId** `string` *required*

Position ID.

**transactions** `object[]` *required*

**transaction fields**

**type** `string`

`sell_to_open` or `buy_to_close`.

**amount** `string`

Filled OT amount, raw units.

**premium** `string`

Premium in raw quote token units. On an open, the amount received, after the fee. On a close, the amount paid, including the fee.

**txHash** `string`

Transaction hash.

**timestamp** `integer`

Block time.

**rollId** `string | null`

Roll ID, the same on the close and the open of one roll. `null` for a plain open or close.

```json theme={null}
{
  "positionId": "pos-1-0xYOUR_WALLET-0xOPTION_TOKEN",
  "transactions": [
    {
      "type": "sell_to_open",
      "amount": "10000000000000000",
      "premium": "643000",
      "txHash": "0xTRANSACTION_HASH",
      "timestamp": 1793300420,
      "rollId": null
    }
  ]
}
```

## Amounts

`amount` and the OT and RT balances are in raw collateral units. OT and RT have the decimals of the collateral.

| Option | Collateral | Unit of `amount` | Example |
| - | - | - | - |
| WETH call | WETH | WETH, 18 decimals | 0.01 WETH is `10000000000000000` |
| cbBTC call | cbBTC | cbBTC, 8 decimals | 0.001 cbBTC is `100000` |
| Put | USDC | USDC, 6 decimals | 0.01 WETH at a 2,500 strike is 25 USDC: `25000000` |

For a put, multiply the underlying amount by `strike` to get the USDC amount. Round the collateral up. Premiums and fees are in raw USDC units (6 decimals).

## Limits

| Limit | Value |
| - | - |
| Minimum open, WETH call | 0.001 WETH (`1000000000000000`) |
| Minimum open, cbBTC call | 0.00003 cbBTC (`3000`) |
| Minimum open, put | 1 USDC (`1000000`) |
| Minimum partial close | The same as the minimum open, for the `amount` and for the remainder. The remainder rule does not apply when `amount` is the full RT balance of the wallet. A full close has no minimum. |
| Maximum open | When every eligible maker declared a smaller size, Bebop returns `MaxSize`. |
| Quote validity | Until `expiry`: at most 60 seconds. |
| Last open, close, or roll | 30 seconds before `expiration`. |
| First full close or roll after an open | When the open is confirmed, about 30 seconds after it is mined. Before that, Bebop returns `PositionConfirming`. |
| `GET /instruments`, `GET /assets/{underlying}/summary`, `GET /status` | 120 requests in 4 seconds for each IP address, for each endpoint. |
| `GET /quote` | 20 requests in 3 seconds for each API key and for each IP address. With `validate=true`: 10 requests in 10 seconds. |
| Close and roll quotes | 10 requests in 10 seconds for each API key and for each IP address. |
| Position endpoints | 120 requests in 4 seconds for each API key and for each IP address. |

A request over a rate limit gets `429` with `Retry-After`.

## Approvals

The taker wallet needs ERC-20 allowances and a Greek Factory permission for the Bebop settlement contract. The permission is a bit mask. Grant it with `addPermissions(settlement, mask)` on the Greek Factory of the instrument.

| Trade | Allowance | Greek Factory mask |
| - | - | - |
| Open | Collateral to the Greek Factory, at least `amount` | `3` (`TRANSFER \| MINT`) |
| Close | USDC to the settlement contract, at least `premium` | `4` (`BURN`) |
| Roll | Collateral to the Greek Factory, at least `open.amount`. USDC to the settlement contract, at least `close.premium`. | `7` (`TRANSFER \| MINT \| BURN`) |
| Redeem | None | None |

| Bit | Value | Lets the settlement contract |
| - | - | - |
| `TRANSFER` | 1 | Transfer the wallet's OT. |
| `MINT` | 2 | Mint OT and RT against the wallet's collateral. |
| `BURN` | 4 | Burn matched OT and RT and return the collateral to the wallet. |

`addPermissions` adds bits to the current mask. `setPermissions(operator, mask)` replaces the complete mask. To remove all permissions, call `setPermissions(settlement, 0)`. The wallet never approves OT or RT.

## Contracts

| Contract | Address |
| - | - |
| Bebop settlement | `0xbbbbbBB520d69a9775E85b458C58c648259FAD5F` |
| Greek Factory, current | `0x9999999999906A9a5B3CFB1151Ac6812B3042191` |
| Greek Factory, retired | `0x9999999999995aa18A8944e311ce792a9b90A8b1` |
| WETH | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` |
| cbBTC | `0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf` |
| USDC | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` |

The `factory` field of an instrument gives its Greek Factory. Bebop opens and rolls positions only on the current Greek Factory. A position on the retired Greek Factory can be closed and redeemed. Its permissions and allowance are on the retired contract.

## Quote issues

| Value | Meaning |
| - | - |
| `missing_factory_permissions` | The settlement contract does not have the mask for this trade. |
| `insufficient_collateral_balance` | The wallet holds less collateral than the trade locks. |
| `insufficient_collateral_allowance` | The collateral allowance to the Greek Factory is too low. |
| `insufficient_premium_balance` | The wallet holds less USDC than the close premium. |
| `insufficient_premium_allowance` | The USDC allowance to the settlement contract is too low. |

The values `missing_auto_mint_burn`, `insufficient_factory_allowance`, `missing_operator_approval`, and `insufficient_receipt_balance` are reserved. Bebop does not return them on Ethereum.

## Errors

An error response has this shape:

```json theme={null}
{
  "requestId": "c9ee4c40-925f-4afb-99b5-d6190c6328a2",
  "error": {"code": "MinNotional", "message": "opening amount must be at least 1000000000000000 raw collateral units"}
}
```

| HTTP | Code | Meaning |
| - | - | - |
| `400`, `422` | `InvalidRequest` | A parameter is missing or has a wrong format, or `positionId` has a wrong format. |
| `400` | `InvalidAmount` | `amount` is not a positive integer. |
| `400` | `InvalidAddress` | An address is not valid. |
| `400` | `MinNotional` | The amount, or the remainder after a partial close, is below the minimum. |
| `400` | `MaxSize` | The open is larger than the size that every eligible maker declared. |
| `400`, `409` | `InstrumentExpired` | The instrument expires in less than 30 seconds. |
| `400` | `InvalidRoll` | The roll instrument is the instrument of the position, or it has a different underlying, option type, collateral, quote token, or Greek Factory. |
| `400` | `TakerIsMaker` | The only valid quote is from the taker wallet. |
| `400` | `UnsupportedUnderlying`, `UnsupportedPremiumToken`, `UnsupportedCollateral` | Bebop does not quote the tokens of the instrument. |
| `401` | `Unauthorized` | The API key is missing or not valid. |
| `403` | `Forbidden` | The API key has no options taker access. |
| `404` | `UnknownInstrument` | Bebop does not know the instrument. |
| `404` | `NotFound` | The position does not exist for this API key, or Bebop did not index its first open yet. |
| `404` | `PositionNotFound` | On a close or roll quote: the position is fully closed. |
| `409` | `PositionConfirming` | On a close or roll quote: an open of the position is not confirmed yet. Try again after some seconds. |
| `409` | `InactiveInstrument` | Bebop does not quote the instrument now. |
| `409` | `UnsupportedFactory` | On an open or roll quote: the instrument is not from the current Greek Factory. |
| `409` | `ExistingOptionBalance` | The wallet holds OT of the instrument that it opens. |
| `409` | `InsufficientReceiptBalance` | The wallet holds less RT than the close amount. |
| `409` | `InsufficientPositionAmount` | The close amount is more than the confirmed remainder, or the position changed during the quote. |
| `409` | `CloseQuoteInvalidated` | The position changed while Bebop created the close or roll quote. Request a new quote. |
| `429` | `RateLimited` | Too many requests. Wait for `Retry-After` seconds. |
| `503` | `NoOptionsMakers`, `OptionsMakersExcluded` | No maker that can quote this request is connected. |
| `503` | `NoValidMakerQuote` | No maker returned a valid quote. |
| `503` | `CloseMakerOffline` | A maker that holds the position is not connected. |
| `503` | `QuoteExpired` | The maker quote expired before Bebop could return it. |
| `503` | `MakerGatewayUnavailable`, `PreflightUnavailable`, `OptionsNotReady`, `ServiceUnavailable` | A Bebop service is temporarily unavailable. |
| `500` | `InternalError` | An error occurred in Bebop. Give the `requestId` to Bebop support. |

A `503` is temporary. Request a new quote. Do not send an old `tx` again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.