# OrdersApi

All URIs are relative to *https://external-api.kalshi.com/trade-api/v2*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**amendOrderV2**](#amendorderv2) | **POST** /portfolio/events/orders/{order_id}/amend | Amend Order (V2)|
|[**batchCancelOrdersV2**](#batchcancelordersv2) | **DELETE** /portfolio/events/orders/batched | Batch Cancel Orders (V2)|
|[**batchCreateOrdersV2**](#batchcreateordersv2) | **POST** /portfolio/events/orders/batched | Batch Create Orders (V2)|
|[**cancelAllOrders**](#cancelallorders) | **DELETE** /portfolio/events/orders | Cancel All Orders|
|[**cancelOrderV2**](#cancelorderv2) | **DELETE** /portfolio/events/orders/{order_id} | Cancel Order (V2)|
|[**createOrderV2**](#createorderv2) | **POST** /portfolio/events/orders | Create Order (V2)|
|[**decreaseOrderV2**](#decreaseorderv2) | **POST** /portfolio/events/orders/{order_id}/decrease | Decrease Order (V2)|
|[**getOrder**](#getorder) | **GET** /portfolio/orders/{order_id} | Get Order|
|[**getOrderQueuePosition**](#getorderqueueposition) | **GET** /portfolio/orders/{order_id}/queue_position | Get Order Queue Position|
|[**getOrderQueuePositions**](#getorderqueuepositions) | **GET** /portfolio/orders/queue_positions | Get Queue Positions for Orders|
|[**getOrders**](#getorders) | **GET** /portfolio/orders | Get Orders|

# **amendOrderV2**
> AmendOrderV2Response amendOrderV2(amendOrderV2Request)

Endpoint for amending the price, max fillable count, and/or expiration time of an existing event-market order. The request `count` is the updated total/max fillable count, equal to already filled count plus desired resting remaining count. This behavior matches the v1 amend endpoints; only the request/response shape differs.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **amendOrderV2Request** | **AmendOrderV2Request**|  | |
| **orderId** | [**string**] | Order ID | defaults to undefined|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. | (optional) defaults to undefined|


### Return type

**AmendOrderV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Order amended successfully |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**403** | Forbidden - insufficient permissions |  -  |
|**404** | Resource not found |  -  |
|**500** | Internal server error |  -  |
|**503** | Service temporarily unavailable |  -  |

# **batchCancelOrdersV2**
> BatchCancelOrdersV2Response batchCancelOrdersV2(batchCancelOrdersV2Request)

Endpoint for cancelling a batch of event-market orders using the V2 response shape. To auto-route a cancellation, provide its `market_ticker` and omit `exchange_index` or set it to `-1`. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits).

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **batchCancelOrdersV2Request** | **BatchCancelOrdersV2Request**|  | |


### Return type

**BatchCancelOrdersV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Batch order cancellation completed |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**403** | Forbidden - insufficient permissions |  -  |
|**500** | Internal server error |  -  |

# **batchCreateOrdersV2**
> BatchCreateOrdersV2Response batchCreateOrdersV2(batchCreateOrdersV2Request)

Endpoint for submitting a batch of event-market orders using the V2 request/response shape. The maximum batch size scales with your tier\'s write budget — see [Rate Limits and Tiers](/getting_started/rate_limits).

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **batchCreateOrdersV2Request** | **BatchCreateOrdersV2Request**|  | |


### Return type

**BatchCreateOrdersV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Batch order creation completed |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**403** | Forbidden - insufficient permissions |  -  |
|**500** | Internal server error |  -  |

# **cancelAllOrders**
> cancelAllOrders()

Cancels all resting event-market orders for the authenticated Direct member across every exchange shard. If `subaccount` is omitted, matching orders may come from any subaccount. If it is provided, only orders for that subaccount are eligible. Newly placed orders may also be cancelled during the minute after the request.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**204** | All matching resting orders were cancelled |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**429** | Rate limit exceeded. The default cost is 10 tokens per request. Use GET /trade-api/v2/account/endpoint_costs to list non-default endpoint costs. |  -  |
|**500** | Internal server error |  -  |

# **cancelOrderV2**
> CancelOrderV2Response cancelOrderV2()

Endpoint for cancelling event-market orders using the V2 response shape. To auto-route the cancellation, provide `market_ticker` and omit `exchange_index` or set it to `-1`. Returns `{order_id, client_order_id, reduced_by}` rather than a full order object.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **orderId** | [**string**] | Order ID | defaults to undefined|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. | (optional) defaults to undefined|
| **exchangeIndex** | [**number**] | Exchange shard index. If omitted, auto-routes when market_ticker is provided; otherwise defaults to 0. Use -1 to require auto-routing. The market_ticker parameter is required for auto-routing. | (optional) defaults to undefined|
| **marketTicker** | [**string**] | Market ticker. Required for auto-routing when exchange_index is omitted or -1. | (optional) defaults to undefined|


### Return type

**CancelOrderV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Order cancelled successfully |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**404** | Resource not found |  -  |
|**500** | Internal server error |  -  |

# **createOrderV2**
> CreateOrderV2Response createOrderV2(createOrderV2Request)

Endpoint for submitting event-market orders using the V2 request/response shape (single-book `bid`/`ask` side and fixed-point dollar prices). The legacy `/portfolio/orders` endpoint will be deprecated no earlier than May 6, 2026 — clients should migrate to this path.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **createOrderV2Request** | **CreateOrderV2Request**|  | |


### Return type

**CreateOrderV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Order created successfully |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**403** | Forbidden - insufficient permissions |  -  |
|**409** | Conflict - resource already exists or cannot be modified |  -  |
|**429** | Rate limit exceeded. The default cost is 10 tokens per request. Use GET /trade-api/v2/account/endpoint_costs to list non-default endpoint costs. |  -  |
|**500** | Internal server error |  -  |
|**503** | Service temporarily unavailable |  -  |

# **decreaseOrderV2**
> DecreaseOrderV2Response decreaseOrderV2(decreaseOrderV2Request)

Endpoint for decreasing the remaining count of an existing event-market order using the V2 request/response shape. Exactly one of `reduce_by` or `reduce_to` must be provided.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **decreaseOrderV2Request** | **DecreaseOrderV2Request**|  | |
| **orderId** | [**string**] | Order ID | defaults to undefined|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. | (optional) defaults to undefined|


### Return type

**DecreaseOrderV2Response**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Order decreased successfully |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**404** | Resource not found |  -  |
|**500** | Internal server error |  -  |

# **getOrder**
> GetOrderResponse getOrder()

 Endpoint for getting a single order.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **orderId** | [**string**] | Order ID | defaults to undefined|


### Return type

**GetOrderResponse**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Order retrieved successfully |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**404** | Resource not found |  -  |
|**500** | Internal server error |  -  |

# **getOrderQueuePosition**
> GetOrderQueuePositionResponse getOrderQueuePosition()

 Endpoint for getting an order\'s queue position in the order book. This represents the amount of orders that need to be matched before this order receives a partial or full match. Queue position is determined using a price-time priority.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **orderId** | [**string**] | Order ID | defaults to undefined|


### Return type

**GetOrderQueuePositionResponse**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Queue position retrieved successfully |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**404** | Resource not found |  -  |
|**500** | Internal server error |  -  |

# **getOrderQueuePositions**
> GetOrderQueuePositionsResponse getOrderQueuePositions()

 Endpoint for getting queue positions for all resting orders. Queue position represents the number of contracts that need to be matched before an order receives a partial or full match, determined using price-time priority.

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **marketTickers** | [**string**] | Comma-separated list of market tickers to filter by | (optional) defaults to undefined|
| **eventTicker** | [**string**] | Event ticker to filter by | (optional) defaults to undefined|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). Defaults to 0. Subaccount-restricted API keys default to their locked subaccount and must omit this parameter or pass their locked subaccount. | (optional) defaults to undefined|


### Return type

**GetOrderQueuePositionsResponse**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Queue positions retrieved successfully |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**500** | Internal server error |  -  |

# **getOrders**
> GetOrdersResponse getOrders()

Restricts the response to orders that have a certain status: resting, canceled, or executed. Orders that have been canceled or fully executed before the historical cutoff are only available via `GET /historical/orders`. Resting orders will always be available through this endpoint. See [Historical Data](https://docs.kalshi.com/getting_started/historical_data) for details. 

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **ticker** | [**string**] | Filter by market ticker | (optional) defaults to undefined|
| **eventTicker** | [**string**] | Event tickers to filter by, as a comma-separated list (maximum 100). Events with no markets return no orders. | (optional) defaults to undefined|
| **minTs** | [**number**] | Filter items after this Unix timestamp | (optional) defaults to undefined|
| **maxTs** | [**number**] | Filter items before this Unix timestamp | (optional) defaults to undefined|
| **status** | [**string**] | Filter by status. Possible values depend on the endpoint. | (optional) defaults to undefined|
| **limit** | [**number**] | Number of results per page. Defaults to 100. | (optional) defaults to 100|
| **cursor** | [**string**] | Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page. | (optional) defaults to undefined|
| **subaccount** | [**number**] | Subaccount number (0 for primary, 1-63 for subaccounts). If omitted, defaults to all subaccounts. | (optional) defaults to undefined|
| **exchangeIndex** | [**number**] | Filter results by exchange shard. Omit to return results from all exchange shards. | (optional) defaults to undefined|


### Return type

**GetOrdersResponse**

### Authorization

[kalshiAccessSignature](../README.md#kalshiAccessSignature), [kalshiAccessKey](../README.md#kalshiAccessKey), [kalshiAccessTimestamp](../README.md#kalshiAccessTimestamp)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Orders retrieved successfully |  -  |
|**400** | Bad request - invalid input |  -  |
|**401** | Unauthorized - authentication required |  -  |
|**500** | Internal server error |  -  |

