### CAISO Only & Generally Leap Managed

Submitting bids is only applicable for the CAISO wholesale marketplace. Most partners leverage Leap to manage bids on their behalf based on their dispatch preferences (frequency & timing). However, this guide and bid endpoints are available for partners that would like to manage their own bids for additional control and flexibility.

## Overview

Bids represent offers to supply energy to the market. Use the Bidding API to configure dispatch frequency, duration, and earnings to match your preferences.

A bid defines the amount of power (in kilowatts) that a meter is willing to provide for a given price (in $/kWh). Bids are structured as a supply curve covering a specific time period. You can offer increasing quantities in exchange for higher prices.

## Understanding Bid Curves

A bid curve is an ascending array of price ($) x quantity (kW) pairs. Each point represents an offer to provide energy over a time period in exchange for a given price. The `curve` allows you to offer higher a `quantity_in_kw` in exchange for a higher `price`.

### Bidding at the Price Floor

In most cases, partners simply want to bid at the price floor for a certain time period in order to try and get dispatch events awarded during that time. In these cases, a multi-point bid curve is not necessary. You can simply have a single kW/price pair within the `curve` array and the price can be set to the minimum `0.01` value.

You can only submit bids for meters with an `ACTIVE` "global_enrollment_status". Bids including non-active meters will fail.

## Bid API Endpoints

### [Place Bid](https://developer.leap.energy/reference/submitbid-1#/)

- Place, modify, or cancel bids for one or more meters for a given time period
  - Modify - Bids can be modified by placing a new bid for the same meter/timeslot combination. The previous curve will be completely replaced by the new curve.
  - Cancel - Submit an empty `curve[]` array or for the same meter/timeslot combination.
- Bids must be in 1-hour increments and all times are in UTC timezone
- The submitted price must be between $ 0.01/kWh and $ 1.00/kWh
- A maximum of 100 meters can be submitted with each Place Bid API call
- All meters must have an `Active` enrollment status for bids to be accepted

### [Search Bids](https://developer.leap.energy/reference/searchbids#/)

- Search for bids that match the input filters

### [Search Standing Bids](https://developer.leap.energy/reference/searchstandingbids#/)

- Search for standing bids that match the input filters
- Standing bids are submitted by Leap based on a combination of 1) market requirements during the 4-10pm PT time period and 2) partner bid preferences (desired frequency and timing of dispatch events)

## Day-Ahead & Hour-Ahead Markets

You can submit bids in day-ahead and/or hour-ahead markets. Below is a summary of each.

### Day-Ahead

- Use `"market_type": "day-ahead"`
- Trading day: midnight-to-midnight Pacific Time (PT)
- Submission deadline: midnight Pacific Time (PT) one day prior
- Example timing:
  - Tuesday - Bids due by midnight PT for Thursday trading day
  - Wednesday - 24-hour downtime for: Leap aggregation, bidding into CAISO, CAISO market awards received, dispatch signal sent out to partners early afternoon PT
  - Thursday - Trading/event day (midnight-to-midnight PT)

### Hour-Ahead

- Use `"market_type": "hour-ahead"`
- Trading hour: each 1-hour block is its own trading time period
- Submission window: 3pm PT day prior up to 90 minutes before trading hour
- Example timing:
  - Tuesday 4pm PT - Submit bid for 6-7pm PT
  - Tuesday 4:30-5:15pm PT - Downtime for Leap aggregation, bidding into CAISO, CAISO market awards received, dispatch signal sent out to partners with ~45 minutes advance notice
  - Tuesday 6-7pm PT - Trading/event hour

## Example Recipe Using Place Bid Endpoint

Place your first bid

```json
{"success":true}
```
