# Solidity Interface Reference

## ConstantsBS

### FEED\_ID\_FUTURE

```solidity
uint32 FEED_ID_FUTURE
```

### FEED\_ID\_MODEL\_PARAMS

```solidity
uint32 FEED_ID_MODEL_PARAMS
```

### FEED\_ID\_SPOT

```solidity
uint32 FEED_ID_SPOT
```

### FEED\_ID\_INTEREST\_RATE

```solidity
uint32 FEED_ID_INTEREST_RATE
```

### FEED\_ID\_SETTLEMENT\_PRICE

```solidity
uint32 FEED_ID_SETTLEMENT_PRICE
```

### FEED\_ID\_IMPLIED\_VOLATILITY

```solidity
uint32 FEED_ID_IMPLIED_VOLATILITY
```

### FEED\_ID\_OPTION\_MARK\_PRICE

```solidity
uint32 FEED_ID_OPTION_MARK_PRICE
```

### FEED\_ID\_SPOT\_EQUITY

```solidity
uint32 FEED_ID_SPOT_EQUITY
```

### EXPIRY\_TYPE\_TIMESTAMP

```solidity
uint8 EXPIRY_TYPE_TIMESTAMP
```

### EXPIRY\_TYPE\_TENOR

```solidity
uint8 EXPIRY_TYPE_TENOR
```

### EXCHANGE\_BLOCKSCHOLES

```solidity
uint8 EXCHANGE_BLOCKSCHOLES
```

### EXCHANGE\_DERIBIT

```solidity
uint8 EXCHANGE_DERIBIT
```

### EXCHANGE\_BYBIT

```solidity
uint8 EXCHANGE_BYBIT
```

### EXCHANGE\_OKX

```solidity
uint8 EXCHANGE_OKX
```

### BASE\_ASSET\_BTC

```solidity
uint8 BASE_ASSET_BTC
```

### BASE\_ASSET\_ETH

```solidity
uint8 BASE_ASSET_ETH
```

### BASE\_ASSET\_SPY

```solidity
uint8 BASE_ASSET_SPY
```

### BASE\_ASSET\_IBIT

```solidity
uint8 BASE_ASSET_IBIT
```

### OPTION\_TYPE\_CALL

```solidity
uint8 OPTION_TYPE_CALL
```

### OPTION\_TYPE\_PUT

```solidity
uint8 OPTION_TYPE_PUT
```

### IV\_LEVEL\_TYPE\_STRIKE

```solidity
uint8 IV_LEVEL_TYPE_STRIKE
```

### IV\_LEVEL\_TYPE\_MONEYNESS

```solidity
uint8 IV_LEVEL_TYPE_MONEYNESS
```

### SVI\_PARAM\_A

```solidity
uint8 SVI_PARAM_A
```

### SVI\_PARAM\_B

```solidity
uint8 SVI_PARAM_B
```

### SVI\_PARAM\_RHO

```solidity
uint8 SVI_PARAM_RHO
```

### SVI\_PARAM\_M

```solidity
uint8 SVI_PARAM_M
```

### SVI\_PARAM\_SIGMA

```solidity
uint8 SVI_PARAM_SIGMA
```

## IFeedProviderBS

*common interface for feed providers to implement*

### Feed

*identifier for a single feed*

```solidity
struct Feed {
  uint32 id;
  struct IFeedProviderBS.FeedParameters parameters;
}
```

### FeedParameters

*parameters for a feed*

```solidity
struct FeedParameters {
  uint8[] enumerable;
  bytes other;
}
```

### FeedData

*output data for a feed*

```solidity
struct FeedData {
  int64 value;
  uint32 timestamp;
}
```

### getLatestFeedData

```solidity
function getLatestFeedData(struct IFeedProviderBS.Feed feed) external view returns (struct IFeedProviderBS.FeedData)
```

*get the latest feed data*

#### Parameters

| Name | Type                        | Description              |
| ---- | --------------------------- | ------------------------ |
| feed | struct IFeedProviderBS.Feed | the feed to get data for |

#### Return Values

| Name | Type                            | Description          |
| ---- | ------------------------------- | -------------------- |
| \[0] | struct IFeedProviderBS.FeedData | the latest feed data |

## IOracleBS

the public interface for the Oracle as a whole

### OptionParameters

The feed parameters for the option price and SVI feeds - these should be abi encoded and passed in as the "other" feed parameters.

```solidity
struct OptionParameters {
  int64 expiry;
  int64 ivLevelValue;
}
```

### RouteDoesNotExist

```solidity
error RouteDoesNotExist()
```

error emitted when a route does not exist for the specified feed ID

### FeedProviderDoesNotExist

```solidity
error FeedProviderDoesNotExist()
```

error emitted when a feed provider cannot be found for the specified feed ID

*this indicates a configuration error with how the route was set up*

### PermissionDenied

```solidity
error PermissionDenied()
```

error emitted when a client does not have permission to access the specified feed.

*permissions are based on the feed ID and enumerable feed parameters*


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blockscholes.com/blockchain-oracle/push-based-oracle/interface.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
