# Get orders for an account by ID Returns a list of all orders for the account specified by its ID. Endpoint: GET /accounts/{account_id}/orders Version: 1.75.0 Security: oauth-client-credentials ## Path parameters: - `account_id` (string, required) Account unique identifier. ## Header parameters: - `upvest-client-id` (string, required) Tenant Client ID Example: "ebabcf4d-61c3-4942-875c-e265a7c2d062" - `authorization` (string, required) Bearer (access) token from the OAuth flow with correct scopes. https://datatracker.ietf.org/doc/html/rfc6750 Example: "Bearer c2VjcmV0Cg==" - `signature` (string, required) https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-http-header - `signature-input` (string, required) https://tools.ietf.org/id/draft-ietf-httpbis-message-signatures-01.html#name-the-signature-input-http-he - `upvest-api-version` (string) Upvest API version (Note: Do not include quotation marks) Enum: "1" ## Query parameters: - `order` (string) Sort order of the result list if the sort parameter is specified. Use ASC for ascending or DESC for descending sort order. Enum: "ASC", "DESC" - `account_group_id` (string) Account group unique identifier. - `user_id` (string) User unique identifier. - `status` (string) The execution status of the order. * NEW - * PROCESSING - * FILLED - * CANCELLED - Enum: "NEW", "PROCESSING", "FILLED", "CANCELLED" - `date_created_from` (string) date range from Example: "2022-10-14T10:10:10Z" - `date_created_to` (string) date range to Example: "2022-10-14T10:10:10Z" - `offset` (integer) Use the offset argument to specify where in the list of results to start when returning items for a particular query. - `limit` (integer) Use the limit argument to specify the maximum number of items returned. ## Response 200 fields (application/json): - `meta` (object, required) - `meta.offset` (integer, required) Amount of resource to offset in the response. - `meta.limit` (integer, required) Total limit of the response. - `meta.count` (integer, required) Count of the resources returned in the response. - `meta.total_count` (integer, required) Total count of all the resources. - `meta.sort` (string) The field that the list is sorted by. - `meta.order` (string) The ordering of the response. * ASC - Ascending order * DESC - Descending order Enum: "ASC", "DESC" - `data` (array, required) - `data.id` (string, required) - `data.created_at` (string, required) Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html) - `data.updated_at` (string, required) Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html) - `data.user_id` (string, required) The ID of the user - `data.account_id` (string, required) The ID of the account that owns the order - `data.cash_amount` (string, required) Cash amount for a nominal order, not required if a share quantity is specified. - `data.currency` (string, required) Alphabetic three-letter [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. * EUR - Euro * GBP - British Pound Enum: "EUR", "GBP" - `data.side` (string, required) Side of the order. * BUY - * SELL - Enum: "BUY", "SELL" - `data.instrument_id` (string, required) International securities identification number defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number). - `data.instrument_id_type` (string, required) The type of the ID used in the request. * ISIN - Enum: "ISIN" - `data.order_type` (string, required) Type of the order. * MARKET - * LIMIT - * STOP - Enum: "MARKET", "LIMIT", "STOP" - `data.quantity` (string, required) Quantity of securities for the order. Only required if the cash amount is not specified. - `data.status` (string, required) The execution status of the order. * NEW - * PROCESSING - * FILLED - * CANCELLED - Enum: "NEW", "PROCESSING", "FILLED", "CANCELLED" - `data.fee` (string, required) - `data.initiation_flow` (string, required) Initiation flow used during order creation, i.e. what triggered the order. * API - * PORTFOLIO - * CASH_DIVIDEND_REINVESTMENT - * PORTFOLIO_REBALANCING - * SELL_TO_COVER_FEES - * SELL_TO_COVER_TAXES - * ACCOUNT_LIQUIDATION - * UPVEST_OPERATIONS - * SAVINGS_PLAN - Enum: "API", "PORTFOLIO", "CASH_DIVIDEND_REINVESTMENT", "PORTFOLIO_REBALANCING", "SELL_TO_COVER_FEES", "SELL_TO_COVER_TAXES", "ACCOUNT_LIQUIDATION", "UPVEST_OPERATIONS", "SAVINGS_PLAN" - `data.executions` (array, required) Order executions associated with this order - `data.executions.cash_amount` (string, required) - `data.executions.share_quantity` (string, required) - `data.executions.price` (string, required) - `data.executions.transaction_time` (string, required) - `data.executions.taxes` (array, required) - `data.executions.taxes.type` (string, required) Tax type * TOTAL - Enum: "TOTAL" - `data.executions.taxes.amount` (string, required) - `data.executions.order_id` (string, required) - `data.executions.status` (string, required) Execution status of the Execution. * FILLED - * SETTLED - * CANCELLED - Enum: "FILLED", "SETTLED", "CANCELLED" - `data.executions.side` (string, required) Side of the execution. * BUY - * SELL - Enum: "BUY", "SELL" - `data.executions.venue_id` (string, required) The ID of the venue - `data.executions.settlement_date` (string) Order execution settlement date in the YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339) RFC 3339 - `data.client_reference` (string, required) Immutable reference to the API flow that initiated the order. For client initiated API flows, this is a client provided ID. For internal initiations, it is set to the ID of the related object. - `data.user_instrument_fit_acknowledgement` (boolean) Only applicable if the user has failed the instrument fit check for the instrument type being ordered. True if the user has acknowledged their willingness to trade. - `data.limit_price` (string) The limit price for orders of the type 'limit'. - `data.stop_price` (string) The stop price for orders of the type 'stop'. - `data.expiry_date` (string) The order expiration date (last day the order can trade) in the YYYY-MM-DD format. [RFC 3339, section 5.6](https://json-schema.org/draft/2020-12/json-schema-validation.html#RFC3339) RFC 3339. The default value is order creation date + 200 years - `data.cancellation_reason` (string) Reason for Order cancellation. The field is present in case the Order has a status of CANCELLED. * CANCELLED_BY_CLIENT - * CANCELLED_BY_UPVEST_OPERATIONS - * CANCELLED_BY_TRADING_PARTNER - * CANCELLED_BY_UPVEST_PLATFORM - Enum: "CANCELLED_BY_CLIENT", "CANCELLED_BY_UPVEST_OPERATIONS", "CANCELLED_BY_TRADING_PARTNER", "CANCELLED_BY_UPVEST_PLATFORM" - `data.execution_flow` (string) Execution flow that the order processing goes through. If no value is specified, the default value is assumed - STRAIGHT_THROUGH. * STRAIGHT_THROUGH - * BLOCK - Enum: "STRAIGHT_THROUGH", "BLOCK" - `data.fee_configuration` (array) fee configuration - `data.fee_configuration.type` (string, required) Fee type * TRANSACTION_FEE_BUY - * TRANSACTION_FEE_SELL - Enum: "TRANSACTION_FEE_BUY", "TRANSACTION_FEE_SELL" - `data.fee_configuration.value_type` (string, required) The value type must be “ABSOLUTE”. - `data.fee_configuration.charge_method` (string, required) Indicates whether the fee will be charged by client or by other methods. * CHARGED_BY_CLIENT - * COLLECTED_BY_UPVEST - Enum: "CHARGED_BY_CLIENT", "COLLECTED_BY_UPVEST" ## Response 400 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 401 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 403 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 404 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 406 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 429 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 500 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 503 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request. ## Response 504 fields (application/problem+json): - `type` (string, required) URL to a document describing the error condition. - `status` (integer, required) Transmission of the HTTP status code so that all information can be found in one place, but also to correct changes in the status code due to the use of proxy servers. - `title` (string) A short, human-readable title for the general error type; the title should not change for given types. - `detail` (string) A human-readable description of the specific error. - `instance` (string) This optional key may be present, with a unique URI for the specific error; this will often point to an error log for that specific response. - `request_id` (string) Correlation ID for the original request.