# Alpaca + TradePortal Integrations: Connect with Zapier MCP
> zapier.com/apps/alpaca/integrations/tradeportal
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

Integrate Alpaca and TradePortal in minutes. Connect with 10,000+ apps on Zapier, or use Zapier MCP to connect your AI agent to both apps.

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Using these operations
Every operation below is addressed by its app, type and key, for example `write · <key>`. Events from one app can start a run that calls functions in the other.

- **MCP**: connect each app through mcp.zapier.com to expose its operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`, then call `runAction({ app, actionType, action, connection, inputs })`.
- **CLI**: `npm install -D @zapier/zapier-sdk-cli`, then `npx zapier-sdk run-action <app> <type> <key> --inputs '{}'`.

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · add_lead`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "tradeportal", owner: "me" });

const { data } = await zapier.runAction({
  app: "tradeportal",
  actionType: "write",
  action: "add_lead",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action tradeportal write add_lead \
  --inputs '{}'
```

## Alpaca

### Identity
Alpaca is an API for Commission Free stock trading.

- App slug: alpaca
- Operations published here: 8 (2 events, 6 functions)

### Authentication
Zapier connects to Alpaca via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection alpaca
```

### Capabilities

#### Events (2)

Events fire when something happens in Alpaca. Use them to start a run.

##### List Orders
List all the orders.

- Type: read · Key: `list_orders`
- Requires: nothing
- SDK: `runAction({ app: "alpaca", actionType: "read", action: "list_orders" })`
- CLI: `npx zapier-sdk run-action alpaca read list_orders`

##### List Positions
List all the positions.

- Type: read · Key: `list_positions`
- Requires: nothing
- SDK: `runAction({ app: "alpaca", actionType: "read", action: "list_positions" })`
- CLI: `npx zapier-sdk run-action alpaca read list_positions`

#### Functions (6)

Functions change something in Alpaca.

##### Cancel All Order
Cancels all orders.

- Type: write · Key: `cancel_all_orders`
- Requires: nothing
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "cancel_all_orders" })`
- CLI: `npx zapier-sdk run-action alpaca write cancel_all_orders`

##### Cancel Order
Cancels the order.

- Type: write · Key: `cancel_order`
- Requires: order_id
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "cancel_order" })`
- CLI: `npx zapier-sdk run-action alpaca write cancel_order`

##### Close All Postions
Closes all open positions.

- Type: write · Key: `close_all_positions`
- Requires: nothing
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "close_all_positions" })`
- CLI: `npx zapier-sdk run-action alpaca write close_all_positions`

##### Close Position
Closes the position.

- Type: write · Key: `close_position`
- Requires: symbol
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "close_position" })`
- CLI: `npx zapier-sdk run-action alpaca write close_position`

##### Get Account Info
Get the account info.

- Type: write · Key: `get_account`
- Requires: nothing
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "get_account" })`
- CLI: `npx zapier-sdk run-action alpaca write get_account`

##### Place Order
Places a new order.

- Type: write · Key: `place_order`
- Requires: symbol, side
- Optional: qty, notional, type, tif, limit_price, stop_price, extended_hours
- SDK: `runAction({ app: "alpaca", actionType: "write", action: "place_order" })`
- CLI: `npx zapier-sdk run-action alpaca write place_order`

## TradePortal

### Identity
TradePortal is an all-in-one: Sales CRM, Job Management and Invoicing platform for trade business who focus on growth.

- App slug: tradeportal
- Operations published here: 10 (4 events, 5 functions, 1 query)

### Authentication
Zapier connects to TradePortal via oauth. Your code references a connection, not a raw credential.

- Auth type: oauth
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection tradeportal
```

### Capabilities

#### Events (4)

Events fire when something happens in TradePortal. Use them to start a run.

##### Customer Created
Triggers when a new customer is created.

- Type: read · Key: `customer_created`
- Requires: company_id
- SDK: `runAction({ app: "tradeportal", actionType: "read", action: "customer_created" })`
- CLI: `npx zapier-sdk run-action tradeportal read customer_created`

##### Deal Stage Changed
Triggers when a Deal Stage is changed.

- Type: read · Key: `deal_stage_change`
- Requires: company_id, deal_stage_id
- SDK: `runAction({ app: "tradeportal", actionType: "read", action: "deal_stage_change" })`
- CLI: `npx zapier-sdk run-action tradeportal read deal_stage_change`

##### Recurring Deal Created
Triggers when a new Recurring Deal is created.

- Type: read · Key: `recurring_deal_created`
- Requires: company_id
- SDK: `runAction({ app: "tradeportal", actionType: "read", action: "recurring_deal_created" })`
- CLI: `npx zapier-sdk run-action tradeportal read recurring_deal_created`

##### Recurring Deal Triggered
Triggers when a recurring deal is triggered.

- Type: read · Key: `recurring_deal_triggered`
- Requires: company_id
- SDK: `runAction({ app: "tradeportal", actionType: "read", action: "recurring_deal_triggered" })`
- CLI: `npx zapier-sdk run-action tradeportal read recurring_deal_triggered`

#### Functions (5)

Functions change something in TradePortal.

##### Add New Lead
Add a new Customer and create a new Deal. 

- Type: write · Key: `add_lead`
- Requires: company_id, given_name, address, email, deal_source_id
- Optional: mobile, landline, description, deal_type_id
- SDK: `runAction({ app: "tradeportal", actionType: "write", action: "add_lead" })`
- CLI: `npx zapier-sdk run-action tradeportal write add_lead`

##### Create Customer
Create a new customer without a Deal.

- Type: write · Key: `customerCreate`
- Requires: company_id, given_name, address
- Optional: email, mobile, landline
- SDK: `runAction({ app: "tradeportal", actionType: "write", action: "customerCreate" })`
- CLI: `npx zapier-sdk run-action tradeportal write customerCreate`

##### Send Email
Send an Email.

- Type: write · Key: `send_email`
- Requires: nothing
- SDK: `runAction({ app: "tradeportal", actionType: "write", action: "send_email" })`
- CLI: `npx zapier-sdk run-action tradeportal write send_email`

##### Send SMS
Send an SMS message.

- Type: write · Key: `send_sms`
- Requires: company_id, to, from, message_content
- SDK: `runAction({ app: "tradeportal", actionType: "write", action: "send_sms" })`
- CLI: `npx zapier-sdk run-action tradeportal write send_sms`

##### Update Deal
Updates the selected Deal.

- Type: write · Key: `update_deal`
- Requires: company_id, deal_id
- Optional: deal_stage_id, description
- SDK: `runAction({ app: "tradeportal", actionType: "write", action: "update_deal" })`
- CLI: `npx zapier-sdk run-action tradeportal write update_deal`

#### Queries (1)

Queries read from TradePortal and return data. They change nothing.

##### Find Deal
Finds a deal.

- Type: search · Key: `dealSearch`
- Requires: company_id, search_type
- SDK: `runAction({ app: "tradeportal", actionType: "search", action: "dealSearch" })`
- CLI: `npx zapier-sdk run-action tradeportal search dealSearch`

## Links
- Alpaca integrations: zapier.com/apps/alpaca/integrations.md
- TradePortal integrations: zapier.com/apps/tradeportal/integrations.md
- Full page: zapier.com/apps/alpaca/integrations/tradeportal
- SDK: npmjs.com/package/@zapier/zapier-sdk