# Trader API API

> Trader API API on Apizie: 29 endpoints (Get account, All Orders, Order, All Orders, …) returned as clean JSON through one API key. Send your own provider key in the x-upstream-key header. Call it over REST at https://apizie.tech/v1/finance:alpaca/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `finance:alpaca`
- Category: Finance
- Status: byok
- Source: https://alpaca.markets/support
- Page: https://apizie.tech/api/finance/alpaca
- OpenAPI: https://apizie.tech/api/finance/alpaca/openapi.json

Alpaca's Trading API is a modern platform for algorithmic trading. For complete documentation on the Trading API and to obtain your keys head to https://alpaca.markets/docs/api-documentation/api-v2/. Once you have your…

## Endpoints

### Get account
`GET https://apizie.tech/v1/finance:alpaca/get-account` (byok)

### All Orders
`GET https://apizie.tech/v1/finance:alpaca/get-all-orders` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | no | Order status to be queried. open, closed or all. Defaults to open. |
| limit | integer | no | The maximum number of orders in response. Defaults to 50 and max is 500. |
| after | string | no | The response will include only ones submitted after this timestamp (exclusive.) |
| until | string | no | The response will include only ones submitted until this timestamp (exclusive.) |
| direction | string | no | The chronological order of response based on the submission time. asc or desc. Defaults to desc. |
| nested | boolean | no | If true, the result will roll up multi-leg orders under the legs field of primary order. |
| symbols | string | no | A comma-separated list of symbols to filter by (ex. “AAPL,TSLA,MSFT”). A currency pair is required for crypto orders (ex.… |

### Order
`POST https://apizie.tech/v1/finance:alpaca/post-order` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | yes | JSON request body |

### All Orders
`POST https://apizie.tech/v1/finance:alpaca/delete-all-orders` (byok)

### Order by Order ID
`GET https://apizie.tech/v1/finance:alpaca/get-order-by-order-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | string | yes | order id |
| nested | boolean | no | If true, the result will roll up multi-leg orders under the legs field of primary order. |

### Order
`POST https://apizie.tech/v1/finance:alpaca/patch-order-by-order-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | string | yes | order id |
| body | object | yes | JSON request body |

### Order by Order ID
`POST https://apizie.tech/v1/finance:alpaca/delete-order-by-order-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | string | yes | order id |

### All Open Positions
`GET https://apizie.tech/v1/finance:alpaca/get-all-open-positions` (byok)

### All Positions
`POST https://apizie.tech/v1/finance:alpaca/delete-all-open-positions` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| cancel_orders | boolean | no | If true is specified, cancel all open orders before liquidating all positions. |

### Open Position
`GET https://apizie.tech/v1/finance:alpaca/get-open-position` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol_or_asset_id | string | yes | symbol or assetId |

### Position
`POST https://apizie.tech/v1/finance:alpaca/delete-open-position` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol_or_asset_id | string | yes | symbol or assetId |
| qty | number | no | the number of shares to liquidate. Can accept up to 9 decimal points. Cannot work with percentage |
| percentage | number | no | percentage of position to liquidate. Must be between 0 and 100. Would only sell fractional if position is originally fractional. Can… |

### Account Portfolio History
`GET https://apizie.tech/v1/finance:alpaca/get-account-portfolio-history` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| period | string | no | The duration of the data in + , such as 1D, where can be D for day, W for week, M for month and A for year. Defaults to 1M. |
| timeframe | string | no | The resolution of time window. 1Min, 5Min, 15Min, 1H, or 1D. If omitted, 1Min for less than 7 days period, 15Min for less than 30 days, or… |
| date_end | string | no | The date the data is returned up to, in “YYYY-MM-DD” format. Defaults to the current market date (rolls over at the market open if… |
| extended_hours | string | no | If true, include extended hours in the result. This is effective only for timeframe less than 1D. |

### Watchlists
`GET https://apizie.tech/v1/finance:alpaca/get-watchlists` (byok)

### Watchlist
`POST https://apizie.tech/v1/finance:alpaca/post-watchlist` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | yes | JSON request body |

### Get Watchlist by ID
`GET https://apizie.tech/v1/finance:alpaca/get-watchlist-by-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| watchlist_id | string | yes | watchlist id |

### Add Asset to Watchlist
`POST https://apizie.tech/v1/finance:alpaca/add-asset-to-watchlist` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| watchlist_id | string | yes | watchlist id |
| body | object | no | JSON request body |

### Update Watchlist By Id
`POST https://apizie.tech/v1/finance:alpaca/update-watchlist-by-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| watchlist_id | string | yes | watchlist id |
| body | object | no | JSON request body |

### Delete Watchlist By Id
`POST https://apizie.tech/v1/finance:alpaca/delete-watchlist-by-id` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| watchlist_id | string | yes | watchlist id |

### Get Watchlist by Name
`GET https://apizie.tech/v1/finance:alpaca/get-watchlist-by-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | yes | name of the watchlist |

### Add Asset to Watchlist By Name
`POST https://apizie.tech/v1/finance:alpaca/add-asset-to-watchlist-by-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | yes | name of the watchlist |
| body | object | no | JSON request body |

### Update Watchlist By Name
`POST https://apizie.tech/v1/finance:alpaca/update-watchlist-by-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | yes | name of the watchlist |
| body | object | no | JSON request body |

### Delete Watchlist By Name
`POST https://apizie.tech/v1/finance:alpaca/delete-watchlist-by-name` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | yes | name of the watchlist |

### Symbol from Watchlist
`POST https://apizie.tech/v1/finance:alpaca/remove-asset-from-watchlist` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| watchlist_id | string | yes | Watchlist ID |
| symbol | string | yes | symbol name to remove from the watchlist content |

### Account Configurations
`GET https://apizie.tech/v1/finance:alpaca/get-account-config` (byok)

### Account Configurations
`POST https://apizie.tech/v1/finance:alpaca/patch-account-config` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| body | object | no | JSON request body |

### Get account activities of one type
`GET https://apizie.tech/v1/finance:alpaca/get-account-activities` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | no | The date for which you want to see activities. |
| until | string | no | The response will contain only activities submitted before this date. (Cannot be used with date.) |
| after | string | no | The response will contain only activities submitted after this date. (Cannot be used with date.) |
| direction | string | no | asc or desc (default desc if unspecified.) |
| page_size | integer | no | The maximum number of entries to return in the response. (See the section on paging above.) |
| page_token | string | no | The ID of the end of your current page of results. |
| activity_types | string | no | A comma-separated list of the activity types to include in the response. If unspecified, activities of all types will be returned. See… |

### Get account activities of one type
`GET https://apizie.tech/v1/finance:alpaca/get-account-activities-by-activity-type` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| activity_type | string | yes | The activity type you want to view entries for. A list of valid activity types can be found at the bottom of this page. |
| date | string | no | The date for which you want to see activities. |
| until | string | no | The response will contain only activities submitted before this date. (Cannot be used with date.) |
| after | string | no | The response will contain only activities submitted after this date. (Cannot be used with date.) |
| direction | string | no | asc or desc (default desc if unspecified.) |
| page_size | integer | no | The maximum number of entries to return in the response. (See the section on paging above.) |
| page_token | string | no | The ID of the end of your current page of results. |

### Get Market Calendar info
`GET https://apizie.tech/v1/finance:alpaca/get-calendar` (byok)

| Parameter | Type | Required | Description |
|---|---|---|---|
| start | string | no | The first date to retrieve data for (inclusive) |
| end | string | no | The last date to retrieve data for (inclusive) |

### Get Market Clock info
`GET https://apizie.tech/v1/finance:alpaca/get-clock` (byok)

## Example
```
curl "https://apizie.tech/v1/finance:alpaca/get-account" \
  -H "x-api-key: $APIZIE_KEY" \
  -H "x-upstream-key: $PROVIDER_KEY"
```

## FAQ

### How do I call the Trader API API?
Create a free Apizie key, then send GET https://apizie.tech/v1/finance:alpaca/get-account with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the Trader API API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card. Trader API itself also needs your own key from alpaca.

### Can AI agents use the Trader API API?
Yes. Add the Apizie MCP server (https://apizie.tech/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key finance:alpaca.

### What is the status of the Trader API API?
Needs your own provider key (bring your own key)
