GET
/
api
/
v3
/
brokerage
/
orders
/
historical
/
batch
curl --request GET \
  --url https://api.coinbase.com/api/v3/brokerage/orders/historical/batch
{
  "orders": [
    {
      "order_id": "0000-000000-000000",
      "product_id": "BTC-USD",
      "user_id": "2222-000000-000000",
      "order_configuration": {
        "market_market_ioc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "rfq_disabled": true
        },
        "sor_limit_ioc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "rfq_disabled": true
        },
        "limit_limit_gtc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "post_only": false,
          "rfq_disabled": true
        },
        "limit_limit_gtd": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "end_time": "2021-05-31T09:59:59.000Z",
          "post_only": false
        },
        "limit_limit_fok": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "rfq_disabled": true
        },
        "twap_limit_gtd": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "start_time": "2021-05-31T07:59:59.000Z",
          "end_time": "2021-05-31T09:59:59.000Z",
          "limit_price": "10000.00",
          "number_buckets": "5",
          "bucket_size": "2.00",
          "bucket_duration": "300s"
        },
        "stop_limit_stop_limit_gtc": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_price": "20000.00",
          "stop_direction": "<any>"
        },
        "stop_limit_stop_limit_gtd": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_price": "20000.00",
          "end_time": "2021-05-31T09:59:59.000Z",
          "stop_direction": "<any>"
        },
        "trigger_bracket_gtc": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_trigger_price": "20000.00"
        },
        "trigger_bracket_gtd": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_trigger_price": "20000.00",
          "end_time": "2021-05-31T09:59:59.000Z"
        }
      },
      "side": "<any>",
      "client_order_id": "11111-000000-000000",
      "status": "<any>",
      "time_in_force": "<any>",
      "created_time": "2021-05-31T09:59:59.000Z",
      "completion_percentage": "50",
      "filled_size": "0.001",
      "average_filled_price": "50",
      "fee": "<string>",
      "number_of_fills": "2",
      "filled_value": "10000",
      "pending_cancel": true,
      "size_in_quote": false,
      "total_fees": "5.00",
      "size_inclusive_of_fees": false,
      "total_value_after_fees": "<string>",
      "trigger_status": "<any>",
      "order_type": "<any>",
      "reject_reason": "<any>",
      "settled": true,
      "product_type": "<any>",
      "reject_message": "<string>",
      "cancel_message": "<string>",
      "order_placement_source": "<any>",
      "outstanding_hold_amount": "<string>",
      "is_liquidation": true,
      "last_fill_time": "<string>",
      "edit_history": [
        {
          "price": "19000.00",
          "size": "0.001",
          "replace_accept_timestamp": "<string>"
        }
      ],
      "leverage": "<string>",
      "margin_type": "<any>",
      "retail_portfolio_id": "b87a2d3f-8a1e-49b3-a4ea-402d8c389aca",
      "originating_order_id": "b87a2d3f-8a1e-49b3-a4ea-402d8c389aca",
      "attached_order_id": "b87a2d3f-8a1e-49b3-a4ea-402d8c389aca",
      "attached_order_configuration": {
        "market_market_ioc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "rfq_disabled": true
        },
        "sor_limit_ioc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "rfq_disabled": true
        },
        "limit_limit_gtc": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "post_only": false,
          "rfq_disabled": true
        },
        "limit_limit_gtd": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "end_time": "2021-05-31T09:59:59.000Z",
          "post_only": false
        },
        "limit_limit_fok": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "limit_price": "10000.00",
          "rfq_disabled": true
        },
        "twap_limit_gtd": {
          "quote_size": "10.00",
          "base_size": "0.001",
          "start_time": "2021-05-31T07:59:59.000Z",
          "end_time": "2021-05-31T09:59:59.000Z",
          "limit_price": "10000.00",
          "number_buckets": "5",
          "bucket_size": "2.00",
          "bucket_duration": "300s"
        },
        "stop_limit_stop_limit_gtc": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_price": "20000.00",
          "stop_direction": "<any>"
        },
        "stop_limit_stop_limit_gtd": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_price": "20000.00",
          "end_time": "2021-05-31T09:59:59.000Z",
          "stop_direction": "<any>"
        },
        "trigger_bracket_gtc": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_trigger_price": "20000.00"
        },
        "trigger_bracket_gtd": {
          "base_size": "0.001",
          "limit_price": "10000.00",
          "stop_trigger_price": "20000.00",
          "end_time": "2021-05-31T09:59:59.000Z"
        }
      }
    }
  ],
  "sequence": "<string>",
  "has_next": true,
  "cursor": "789100"
}

Query Parameters

order_ids
string[]

ID(s) of order(s).

product_ids
string[]

Optional string of the product ID(s). Defaults to null, or fetch for all products.

product_type
enum<string>
default:UNKNOWN_PRODUCT_TYPE

Returns orders matching this product type. By default, returns all product types.

Available options:
UNKNOWN_PRODUCT_TYPE,
SPOT,
FUTURE
order_status
enum<string>[]

Only returns orders matching the specified order statuses.

time_in_forces
enum<string>[]

Only orders matching this time in force(s) are returned. Default is to return all time in forces.

order_types
enum<string>[]

Only returns orders matching the specified order types (e.g. MARKET). By default, returns all order types.

order_side
enum<string>

Only returns the orders matching the specified side (e.g. 'BUY', 'SELL'). By default, returns all sides.

Available options:
BUY,
SELL
start_date
string

The start date to fetch orders from (inclusive). If provided, only orders created after this date will be returned.

end_date
string

The end date to fetch orders from (exclusive). If provided, only orders with creation time before this date will be returned.

order_placement_source
enum<string>
default:RETAIL_ADVANCED

Only returns the orders matching this placement source. By default, returns RETAIL_ADVANCED placement source.

Available options:
UNKNOWN_PLACEMENT_SOURCE,
RETAIL_SIMPLE,
RETAIL_ADVANCED
contract_expiry_type
enum<string>
default:UNKNOWN_CONTRACT_EXPIRY_TYPE

Only returns the orders matching the contract expiry type. Only applicable if product_type is set to FUTURE.

Available options:
UNKNOWN_CONTRACT_EXPIRY_TYPE,
EXPIRING,
PERPETUAL
asset_filters
string[]

Only returns the orders where the quote, base or underlying asset matches the provided asset filter(s) (e.g. 'BTC').

retail_portfolio_id
string

(Deprecated) Only orders matching this retail portfolio id are returned. Only applicable for legacy keys. CDP keys will default to the key's permissioned portfolio.

limit
integer

The number of orders to display per page (no default amount). If has_next is true, additional pages of orders are available to be fetched. Use the cursor parameter to start on a specified page.

cursor
string

For paginated responses, returns all responses that come after this value.

sort_by
enum<string>
default:UNKNOWN_SORT_BY

Sort results by a field, results use unstable pagination. Default is to sort by creation time.

Available options:
UNKNOWN_SORT_BY,
LIMIT_PRICE,
LAST_FILL_TIME
user_native_currency
string

(Deprecated) Native currency to fetch order with. Default is USD.

Response

200
application/json

A successful response.

The response is of type object.